oc-lib/models/utils/interfaces.go

18 lines
392 B
Go
Raw Normal View History

2024-07-18 11:51:12 +02:00
package utils
2024-07-18 14:39:54 +02:00
import "cloud.o-forge.io/core/oc-lib/utils"
2024-07-18 11:51:12 +02:00
type DBObject interface {
GetName() string
2024-07-18 14:39:54 +02:00
Deserialize(j map[string]interface{}) DBObject
GetAccessor(driver utils.Driver) 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
}