oc-lib/models/utils/interfaces.go
2024-07-18 15:35:30 +02:00

16 lines
364 B
Go

package utils
type DBObject interface {
GetName() string
Deserialize(j map[string]interface{}) DBObject
GetAccessor() Accessor
}
type Accessor interface {
SetLogger()
LoadOne(id string) (DBObject, error)
DeleteOne(id string) (DBObject, error)
StoreOne(data DBObject) (DBObject, error)
UpdateOne(set map[string]interface{}, id string) (DBObject, error)
}