summaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/infra/db/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator/pkg/infra/db/store.go')
-rw-r--r--src/orchestrator/pkg/infra/db/store.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/orchestrator/pkg/infra/db/store.go b/src/orchestrator/pkg/infra/db/store.go
index 1a9632e7..0cf3ef65 100644
--- a/src/orchestrator/pkg/infra/db/store.go
+++ b/src/orchestrator/pkg/infra/db/store.go
@@ -29,7 +29,6 @@ var DBconn Store
// that wants to use the Store interface. This allows various
// db backends and key types.
type Key interface {
- String() string
}
// Store is an interface for accessing the database
@@ -54,8 +53,14 @@ type Store interface {
// TODO: If tag is empty, it will delete all tags under key.
Delete(table string, key Key, tag string) error
- // Reads all master tables and data from the specified tag in table
- ReadAll(table string, tag string) (map[string][]byte, error)
+ // Inserts and Updates a tag with key and also adds query fields if provided
+ Insert(coll string, key Key, query interface{}, tag string, data interface{}) error
+
+ // Find the document(s) with key and get the tag values from the document(s)
+ Find(coll string, key Key, tag string) ([][]byte, error)
+
+ // Removes the document(s) matching the key
+ Remove(coll string, key Key) error
}
// CreateDBClient creates the DB client