Shallow Get All
This commit is contained in:
@@ -19,6 +19,10 @@ func (ao *AbstractObject) GetID() string {
|
||||
return ao.UUID
|
||||
}
|
||||
|
||||
func (ao *AbstractObject) GetName() string {
|
||||
return ao.Name
|
||||
}
|
||||
|
||||
func (r *AbstractObject) GenerateID() {
|
||||
r.UUID = uuid.New().String()
|
||||
}
|
||||
|
@@ -1,5 +1,11 @@
|
||||
package utils
|
||||
|
||||
type ShallowDBObject interface {
|
||||
GenerateID()
|
||||
GetID() string
|
||||
GetName() string
|
||||
}
|
||||
|
||||
type DBObject interface {
|
||||
GenerateID()
|
||||
GetID() string
|
||||
@@ -12,6 +18,7 @@ type DBObject interface {
|
||||
type Accessor interface {
|
||||
SetLogger(t DataType)
|
||||
GetType() string
|
||||
LoadAll() ([]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