oc-lib/models/utils/interfaces.go

16 lines
328 B
Go
Raw Normal View History

2024-07-18 11:51:12 +02:00
package utils
type DBObject interface {
GetName() string
2024-07-18 14:39:54 +02:00
Deserialize(j map[string]interface{}) DBObject
2024-07-18 15:02:39 +02:00
GetAccessor() Accessor
2024-07-18 11:51:12 +02:00
}
type Accessor interface {
SetLogger()
LoadOne(id string) DBObject
DeleteOne(id string) DBObject
StoreOne(data DBObject) DBObject
UpdateOne(set map[string]interface{}, id string) DBObject
}