Improved models' structure
This commit is contained in:
16
storage.go
16
storage.go
@@ -6,17 +6,17 @@ type URL struct {
|
||||
}
|
||||
|
||||
type Storage struct {
|
||||
Resource `json:"resource" required:"true"`
|
||||
AbstractResource `json:"resource" required:"true" bson:"resource"`
|
||||
|
||||
Capacity uint `json:"capacity" required:"true"`
|
||||
Url URL `json:"URL" ` // Will allow to select between several protocols
|
||||
Capacity uint `json:"capacity,omitempty"`
|
||||
Url URL `json:"url,omitempty"` // Will allow to select between several protocols
|
||||
|
||||
Encryption bool `json:"encryption" `
|
||||
Redundancy string `json:"redundancy" `
|
||||
Throughput string `json:"throughput" `
|
||||
BookingPrice uint `json:"bookingPrice" `
|
||||
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{
|
||||
func (s *Storage) GetType() ResourceType {
|
||||
return STORAGE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user