No more value in resource
This commit is contained in:
parent
f490dc3555
commit
5f735b6e9d
@ -26,19 +26,6 @@ type AbstractResource struct {
|
|||||||
ResourceModel *ResourceModel `json:"resource_model,omitempty" bson:"resource_model,omitempty"` // ResourceModel is the model of the resource
|
ResourceModel *ResourceModel `json:"resource_model,omitempty" bson:"resource_model,omitempty"` // ResourceModel is the model of the resource
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* GetModelValue returns the value of the model key
|
|
||||||
*/
|
|
||||||
func (abs *AbstractResource) GetModelValue(cat string, key string) interface{} {
|
|
||||||
if abs.ResourceModel == nil || abs.ResourceModel.Model == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if _, ok := abs.ResourceModel.Model[key]; !ok {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return abs.ResourceModel.Model[cat][key].Value
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GetModelType returns the type of the model key
|
* GetModelType returns the type of the model key
|
||||||
*/
|
*/
|
||||||
@ -78,7 +65,6 @@ func (abs *AbstractResource) GetModelReadOnly(cat string, key string) interface{
|
|||||||
|
|
||||||
type Model struct {
|
type Model struct {
|
||||||
Type string `json:"type,omitempty" bson:"type,omitempty"` // Type is the type of the model
|
Type string `json:"type,omitempty" bson:"type,omitempty"` // Type is the type of the model
|
||||||
Value interface{} `json:"value,omitempty" bson:"value,omitempty"` // Value is the value of the model
|
|
||||||
ReadOnly bool `json:"readonly,omitempty" bson:"readonly,omitempty"` // ReadOnly is the readonly of the model
|
ReadOnly bool `json:"readonly,omitempty" bson:"readonly,omitempty"` // ReadOnly is the readonly of the model
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user