implement remote call for remote action
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
package rule
|
||||
|
||||
package rule
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Rule struct {
|
||||
utils.AbstractObject
|
||||
Description string `json:"description,omitempty" bson:"description,omitempty"`
|
||||
Condition string `json:"condition,omitempty" bson:"condition,omitempty"`
|
||||
Actions []string `json:"actions,omitempty" bson:"actions,omitempty"`
|
||||
Description string `json:"description,omitempty" bson:"description,omitempty"`
|
||||
Condition string `json:"condition,omitempty" bson:"condition,omitempty"`
|
||||
Actions []string `json:"actions,omitempty" bson:"actions,omitempty"`
|
||||
}
|
||||
|
||||
func (ao *Rule) GetID() string {
|
||||
@@ -26,9 +27,9 @@ func (d *Rule) GetName() string {
|
||||
return d.Name
|
||||
}
|
||||
|
||||
func (d *Rule) GetAccessor() utils.Accessor {
|
||||
func (d *Rule) GetAccessor(caller *tools.HTTPCaller) utils.Accessor {
|
||||
data := New()
|
||||
data.SetLogger(utils.RULE)
|
||||
data.Init(utils.RULE, caller)
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user