Compare commits
No commits in common. "5f735b6e9db45b6d688ed3e01d9a7e170c851882" and "cdf513c2c454c4c917a788bc2c952ed4aa586dbe" have entirely different histories.
5f735b6e9d
...
cdf513c2c4
@ -26,6 +26,19 @@ type AbstractResource struct {
|
||||
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
|
||||
*/
|
||||
@ -65,6 +78,7 @@ func (abs *AbstractResource) GetModelReadOnly(cat string, key string) interface{
|
||||
|
||||
type Model struct {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ type ProcessingResource struct {
|
||||
Parallel bool `bson:"parallel,omitempty" json:"parallel,omitempty"` // Parallel is a flag that indicates if the processing is parallel
|
||||
ScalingModel uint `bson:"scaling_model,omitempty" json:"scaling_model,omitempty"` // ScalingModel is the scaling model
|
||||
DiskIO string `bson:"disk_io,omitempty" json:"disk_io,omitempty"` // DiskIO is the disk IO
|
||||
Container *Container `bson:"container,omitempty" json:"container,omitempty"` // Container is the container
|
||||
Container Container `bson:"container,omitempty" json:"container,omitempty"` // Container is the container
|
||||
Execute []Execute `bson:"execute,omitempty" json:"execute,omitempty"` // Execute is the execution
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user