implement remote call for remote action

This commit is contained in:
mr
2024-08-12 16:11:25 +02:00
parent 4575f9ad3f
commit 2ac24779cd
26 changed files with 312 additions and 144 deletions

View File

@@ -1,6 +1,9 @@
package utils
import "cloud.o-forge.io/core/oc-lib/dbs"
import (
"cloud.o-forge.io/core/oc-lib/dbs"
"cloud.o-forge.io/core/oc-lib/tools"
)
type ShallowDBObject interface {
GenerateID()
@@ -16,12 +19,13 @@ type DBObject interface {
GetName() string
Deserialize(j map[string]interface{}) DBObject
Serialize() map[string]interface{}
GetAccessor() Accessor
GetAccessor(caller *tools.HTTPCaller) Accessor
}
type Accessor interface {
SetLogger(t DataType)
Init(t DataType, caller *tools.HTTPCaller)
GetType() string
GetCaller() *tools.HTTPCaller
Search(filters *dbs.Filters, search string) ([]ShallowDBObject, int, error)
LoadAll() ([]ShallowDBObject, int, error)
LoadOne(id string) (DBObject, int, error)