light modification
This commit is contained in:
@@ -11,8 +11,8 @@ type ShallowDBObject interface {
|
||||
GenerateID()
|
||||
GetID() string
|
||||
GetName() string
|
||||
Deserialize(j map[string]interface{}, obj DBObject) DBObject
|
||||
Serialize(obj DBObject) map[string]interface{}
|
||||
Deserialize(j map[string]interface{}, obj DBObject) DBObject
|
||||
}
|
||||
|
||||
// DBObject is an interface that defines the basic methods for a DBObject
|
||||
@@ -20,33 +20,33 @@ type DBObject interface {
|
||||
GenerateID()
|
||||
GetID() string
|
||||
GetName() string
|
||||
GetCreatorID() string
|
||||
IsDrafted() bool
|
||||
StoreDraftDefault()
|
||||
CanUpdate(set DBObject) (bool, DBObject)
|
||||
CanDelete() bool
|
||||
StoreDraftDefault()
|
||||
GetCreatorID() string
|
||||
UpToDate(user string, create bool)
|
||||
CanUpdate(set DBObject) (bool, DBObject)
|
||||
VerifyAuth(request *tools.APIRequest) bool
|
||||
Deserialize(j map[string]interface{}, obj DBObject) DBObject
|
||||
Serialize(obj DBObject) map[string]interface{}
|
||||
GetAccessor(request *tools.APIRequest) Accessor
|
||||
Deserialize(j map[string]interface{}, obj DBObject) DBObject
|
||||
}
|
||||
|
||||
// Accessor is an interface that defines the basic methods for an Accessor
|
||||
type Accessor interface {
|
||||
GetRequest() *tools.APIRequest
|
||||
GetType() tools.DataType
|
||||
GetUser() string
|
||||
GetPeerID() string
|
||||
GetGroups() []string
|
||||
ShouldVerifyAuth() bool
|
||||
GetType() tools.DataType
|
||||
GetLogger() *zerolog.Logger
|
||||
GetCaller() *tools.HTTPCaller
|
||||
ShouldVerifyAuth() bool
|
||||
Search(filters *dbs.Filters, search string, isDraft bool) ([]ShallowDBObject, int, error)
|
||||
LoadAll(isDraft bool) ([]ShallowDBObject, int, error)
|
||||
GetRequest() *tools.APIRequest
|
||||
LoadOne(id string) (DBObject, int, error)
|
||||
DeleteOne(id string) (DBObject, int, error)
|
||||
CopyOne(data DBObject) (DBObject, int, error)
|
||||
StoreOne(data DBObject) (DBObject, int, error)
|
||||
LoadAll(isDraft bool) ([]ShallowDBObject, int, error)
|
||||
UpdateOne(set DBObject, id string) (DBObject, int, error)
|
||||
Search(filters *dbs.Filters, search string, isDraft bool) ([]ShallowDBObject, int, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user