oc-lib/storage.go

23 lines
593 B
Go
Raw Normal View History

2024-07-04 16:08:59 +02:00
package oclib
2024-07-16 10:56:36 +02:00
type URL struct {
Protocol string `json:"protocol"`
Path string `json:"path"`
}
type Storage struct {
2024-07-17 17:17:37 +02:00
AbstractResource `json:"resource" required:"true" bson:"resource"`
2024-07-16 10:56:36 +02:00
2024-07-17 17:17:37 +02:00
Capacity uint `json:"capacity,omitempty"`
Url URL `json:"url,omitempty"` // Will allow to select between several protocols
2024-07-16 10:56:36 +02:00
2024-07-17 17:17:37 +02:00
Encryption bool `json:"encryption,omitempty"`
Redundancy string `json:"redundancy,omitempty"`
Throughput string `json:"throughput,omitempty"`
BookingPrice uint `json:"booking_price,omitempty"`
2024-07-16 10:56:36 +02:00
}
2024-07-17 17:17:37 +02:00
func (s *Storage) GetType() ResourceType {
2024-07-16 10:56:36 +02:00
return STORAGE
}