implement remote call for remote action
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
@@ -15,7 +16,7 @@ type AbstractResource struct {
|
||||
Owner string `json:"owner,omitempty" bson:"owner,omitempty" validate:"required"`
|
||||
OwnerLogo string `json:"owner_logo,omitempty" bson:"owner_logo,omitempty"`
|
||||
SourceUrl string `json:"source_url,omitempty" bson:"source_url,omitempty" validate:"required"`
|
||||
PeerID string `json:"peer_id,omitempty" bson:"peer_id,omitempty" validate:"required"`
|
||||
PeerID string `json:"peer_id,omitempty" bson:"peer_id,omitempty" validate:"required"`
|
||||
Price string `json:"price,omitempty" bson:"price,omitempty"`
|
||||
License string `json:"license,omitempty" bson:"license,omitempty"`
|
||||
ResourceModel *ResourceModel `json:"resource_model,omitempty" bson:"resource_model,omitempty"`
|
||||
@@ -83,9 +84,9 @@ func (d *ResourceModel) GetName() string {
|
||||
return d.UUID
|
||||
}
|
||||
|
||||
func (d *ResourceModel) GetAccessor() utils.Accessor {
|
||||
func (d *ResourceModel) GetAccessor(caller *tools.HTTPCaller) utils.Accessor {
|
||||
data := &ResourceModelMongoAccessor{}
|
||||
data.SetLogger(utils.RESOURCE_MODEL)
|
||||
data.Init(utils.RESOURCE_MODEL, caller)
|
||||
return data
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user