19 lines
462 B
Go
19 lines
462 B
Go
package utils
|
|
|
|
import "cloud.o-forge.io/core/oc-lib/models/resources"
|
|
|
|
type DBObject interface {
|
|
GetName() string
|
|
Deserialize(j map[string]interface{}) DBObject
|
|
GetAccessor() Accessor
|
|
}
|
|
|
|
type Accessor interface {
|
|
SetLogger(t resources.ResourceType)
|
|
GetType() string
|
|
LoadOne(id string) (DBObject, error)
|
|
DeleteOne(id string) (DBObject, error)
|
|
StoreOne(data DBObject) (DBObject, error)
|
|
UpdateOne(set map[string]interface{}, id string) (DBObject, error)
|
|
}
|