packaged every model
This commit is contained in:
24
storage/storage.go
Normal file
24
storage/storage.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package storage
|
||||
|
||||
import oclib "oc-lib"
|
||||
|
||||
type URL struct {
|
||||
Protocol string `json:"protocol"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type Storage struct {
|
||||
oclib.AbstractResource `json:"resource" required:"true" bson:"resource"`
|
||||
|
||||
Capacity uint `json:"capacity,omitempty"`
|
||||
Url URL `json:"url,omitempty"` // Will allow to select between several protocols
|
||||
|
||||
Encryption bool `json:"encryption,omitempty"`
|
||||
Redundancy string `json:"redundancy,omitempty"`
|
||||
Throughput string `json:"throughput,omitempty"`
|
||||
BookingPrice uint `json:"booking_price,omitempty"`
|
||||
}
|
||||
|
||||
func (s *Storage) GetType() oclib.ResourceType {
|
||||
return oclib.STORAGE
|
||||
}
|
||||
Reference in New Issue
Block a user