oc-lib/storage.go
2024-07-17 17:17:37 +02:00

23 lines
593 B
Go

package oclib
type URL struct {
Protocol string `json:"protocol"`
Path string `json:"path"`
}
type Storage struct {
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() ResourceType {
return STORAGE
}