Initial commit for Xapp Orchestration
[ric-plt/appmgr.git] / pkg / resthooks / types.go
index 830576b..1376500 100755 (executable)
 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
+}