packaged every model

This commit is contained in:
pb
2024-07-17 18:02:30 +02:00
parent 2684703da5
commit 2eb74da9d2
16 changed files with 731 additions and 0 deletions

24
storage/storage.go Normal file
View 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
}