massive draft for payment process (UNCOMPLETE)
This commit is contained in:
@@ -20,23 +20,28 @@ type DBObject interface {
|
||||
GenerateID()
|
||||
GetID() string
|
||||
GetName() string
|
||||
IsDrafted() bool
|
||||
StoreDraftDefault()
|
||||
CanUpdate(set DBObject) (bool, DBObject)
|
||||
CanDelete() bool
|
||||
UpToDate(user string, create bool)
|
||||
VerifyAuth(username string, PeerID string, groups []string) bool
|
||||
VerifyAuth(request *tools.APIRequest) bool
|
||||
Deserialize(j map[string]interface{}, obj DBObject) DBObject
|
||||
Serialize(obj DBObject) map[string]interface{}
|
||||
GetAccessor(username string, peerID string, groups []string, caller *tools.HTTPCaller) Accessor
|
||||
GetAccessor(request *tools.APIRequest) Accessor
|
||||
}
|
||||
|
||||
// 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
|
||||
GetLogger() *zerolog.Logger
|
||||
GetCaller() *tools.HTTPCaller
|
||||
Search(filters *dbs.Filters, search string) ([]ShallowDBObject, int, error)
|
||||
LoadAll() ([]ShallowDBObject, int, error)
|
||||
Search(filters *dbs.Filters, search string, isDraft bool) ([]ShallowDBObject, int, error)
|
||||
LoadAll(isDraft bool) ([]ShallowDBObject, int, error)
|
||||
LoadOne(id string) (DBObject, int, error)
|
||||
DeleteOne(id string) (DBObject, int, error)
|
||||
CopyOne(data DBObject) (DBObject, int, error)
|
||||
|
||||
Reference in New Issue
Block a user