corrected live accessor

This commit is contained in:
mr
2025-06-26 15:57:49 +02:00
parent e600fedcab
commit af0d7807bc
3 changed files with 44 additions and 31 deletions

View File

@@ -1,6 +1,8 @@
package live
import (
"slices"
"cloud.o-forge.io/core/oc-lib/models/resources"
"cloud.o-forge.io/core/oc-lib/models/utils"
"cloud.o-forge.io/core/oc-lib/tools"
@@ -42,6 +44,20 @@ type AbstractLive struct {
ResourcesID []string `json:"resources_id" bson:"resources_id"`
}
func (d *AbstractLive) GetMonitorPath() string {
return d.MonitorPath
}
func (d *AbstractLive) GetResourcesID() []string {
return d.ResourcesID
}
func (d *AbstractLive) SetResourcesID(id string) {
if !slices.Contains(d.ResourcesID, id) {
d.ResourcesID = append(d.ResourcesID, id)
}
}
func (r *AbstractLive) GetResourceType() tools.DataType {
return tools.INVALID
}