25 lines
636 B
Go
25 lines
636 B
Go
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
|
|
}
|