X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fresthooks%2Ftypes.go;h=13765000cbdbbc5adc9f1b7167641c663e979e5f;hb=d872630f520b3883e5cfb1815c36aa60862623f7;hp=830576b39b22d936b1cb3322cea4a905b09aa542;hpb=34e4383c438f87023bc411d9b0baa4a828a7e306;p=ric-plt%2Fappmgr.git diff --git a/pkg/resthooks/types.go b/pkg/resthooks/types.go index 830576b..1376500 100755 --- a/pkg/resthooks/types.go +++ b/pkg/resthooks/types.go @@ -20,11 +20,10 @@ package resthooks import ( - sdl "gerrit.oran-osc.org/r/ric-plt/sdlgo" cmap "github.com/orcaman/concurrent-map" "net/http" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" ) type SubscriptionInfo struct { @@ -36,6 +35,23 @@ type SubscriptionInfo struct { type Resthook struct { client *http.Client subscriptions cmap.ConcurrentMap - db *sdl.SdlInstance + db iSdl + db2 iSdl Seq int64 } + +// TODO: remove this when RTMGR changes done +type SubscriptionNotification struct { + Event string `json:"eventType,omitempty"` + ID string `json:"id,omitempty"` + Version int64 `json:"version,omitempty"` + XApps string `json:"xApps,omitempty"` +} + +type iSdl interface { + Set(pairs ...interface{}) error + Get(keys []string) (map[string]interface{}, error) + GetAll() ([]string, error) + RemoveAll() error + Remove([]string) error +}