Extend for Human Readable

This commit is contained in:
mr
2026-04-21 14:30:45 +02:00
parent 50a5e90f33
commit d57ee0b5e7
11 changed files with 140 additions and 7 deletions

View File

@@ -44,6 +44,20 @@ type AbstractObject struct {
Signature []byte `bson:"signature,omitempty" json:"signature,omitempty"`
}
func (ri *AbstractObject) Extend(typ ...string) map[string][]tools.DataType {
dt := map[string][]tools.DataType{}
for _, t := range typ {
switch t {
case "creator", "user_creator", "user_updater":
if _, ok := dt[t]; !ok {
dt[t] = []tools.DataType{}
}
dt[t] = append(dt[t], tools.PEER)
}
}
return dt
}
func (ri *AbstractObject) GetAccessor(request *tools.APIRequest) Accessor {
return nil
}