Improved models' structure
This commit is contained in:
10
data.go
10
data.go
@@ -1,11 +1,12 @@
|
||||
package oclib
|
||||
|
||||
|
||||
type Data struct {
|
||||
AbstractResource
|
||||
|
||||
Protocols []string `json:"protocol"` //TODO Enum type
|
||||
DataType string `json:"datatype"`
|
||||
Example string `json:"example" required:"true" validate:"required" description:"base64 encoded data"`
|
||||
Protocols []string `json:"protocol,omitempty" bson:"protocol,omitempty"` //TODO Enum type
|
||||
DataType string `json:"datatype" required:"true" bson:"datatype"`
|
||||
Example string `json:"example" bson:"example" required:"true" validate:"required" description:"base64 encoded data"`
|
||||
|
||||
}
|
||||
|
||||
@@ -14,3 +15,6 @@ func (d *Data) GetType() ResourceType{
|
||||
return DATA
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user