Initial commit for Xapp Orchestration
[ric-plt/appmgr.git] / pkg / resthooks / types.go
index e613476..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,7 +35,8 @@ type SubscriptionInfo struct {
 type Resthook struct {
        client        *http.Client
        subscriptions cmap.ConcurrentMap
-       db            *sdl.SdlInstance
+       db            iSdl
+        db2           iSdl
        Seq           int64
 }
 
@@ -47,3 +47,11 @@ type SubscriptionNotification struct {
        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
+}