adjust model
This commit is contained in:
@@ -13,9 +13,10 @@ type URL struct {
|
||||
|
||||
type StorageResource struct {
|
||||
utils.AbstractResource
|
||||
|
||||
Capacity uint `bson:"capacity,omitempty" json:"capacity,omitempty"`
|
||||
Url *URL `bson:"url,omitempty" json:"url,omitempty"` // Will allow to select between several protocols
|
||||
Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"`
|
||||
Type string `bson:"type,omitempty" json:"type,omitempty"`
|
||||
Size uint `bson:"size,omitempty" json:"size,omitempty"`
|
||||
Url *URL `bson:"url,omitempty" json:"url,omitempty"` // Will allow to select between several protocols
|
||||
|
||||
Encryption bool `bson:"encryption,omitempty" json:"encryption,omitempty"`
|
||||
Redundancy string `bson:"redundancy,omitempty" json:"redundancy,omitempty"`
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestStoreOneStorage(t *testing.T) {
|
||||
s := StorageResource{Capacity: 123, Url: &URL{Protocol: "http", Path: "azerty.fr"},
|
||||
s := StorageResource{Size: 123, Url: &URL{Protocol: "http", Path: "azerty.fr"},
|
||||
AbstractResource: utils.AbstractResource{
|
||||
AbstractObject: utils.AbstractObject{Name: "testData"},
|
||||
Description: "Lorem Ipsum",
|
||||
@@ -27,7 +27,7 @@ func TestStoreOneStorage(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadOneStorage(t *testing.T) {
|
||||
s := StorageResource{Capacity: 123, Url: &URL{Protocol: "http", Path: "azerty.fr"},
|
||||
s := StorageResource{Size: 123, Url: &URL{Protocol: "http", Path: "azerty.fr"},
|
||||
AbstractResource: utils.AbstractResource{
|
||||
AbstractObject: utils.AbstractObject{Name: "testData"},
|
||||
Description: "Lorem Ipsum",
|
||||
|
Reference in New Issue
Block a user