Extend for Human Readable
This commit is contained in:
@@ -44,6 +44,24 @@ type AbstractLive struct {
|
||||
ResourcesID []string `json:"resources_id" bson:"resources_id"`
|
||||
}
|
||||
|
||||
func (ri *AbstractLive) Extend(typ ...string) map[string][]tools.DataType {
|
||||
ext := ri.AbstractObject.Extend(typ...)
|
||||
for _, t := range typ {
|
||||
switch t {
|
||||
case "resource":
|
||||
if _, ok := ext[t]; !ok {
|
||||
ext[t] = []tools.DataType{}
|
||||
}
|
||||
ext[t] = append(ext[t], tools.WORKFLOW_RESOURCE)
|
||||
ext[t] = append(ext[t], tools.DATA_RESOURCE)
|
||||
ext[t] = append(ext[t], tools.COMPUTE_RESOURCE)
|
||||
ext[t] = append(ext[t], tools.STORAGE_RESOURCE)
|
||||
ext[t] = append(ext[t], tools.PROCESSING_RESOURCE)
|
||||
}
|
||||
}
|
||||
return ext
|
||||
}
|
||||
|
||||
func (d *AbstractLive) GetMonitorPath() string {
|
||||
return d.MonitorPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user