v1.12.3
This commit is contained in:
@@ -29,7 +29,7 @@ type CreateRequest struct {
|
||||
|
||||
// Storage policies
|
||||
// Required: false
|
||||
StoragePolicies []StoragePolicy `url:"-" json:"storage_policies" validate:"required"`
|
||||
StoragePolicies []StoragePolicy `url:"-" json:"storage_policies,omitempty"`
|
||||
|
||||
// Max size of memory in MB
|
||||
// Required: false
|
||||
@@ -79,8 +79,8 @@ type CreateRequest struct {
|
||||
}
|
||||
|
||||
type StoragePolicy struct {
|
||||
ID int64 `url:"id" json:"id"`
|
||||
Limit int `url:"limit" json:"limit"`
|
||||
ID uint64 `url:"id" json:"id"`
|
||||
Limit int `url:"limit" json:"limit"`
|
||||
}
|
||||
|
||||
// Create creates account
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
var accounts = ListAccounts{
|
||||
Data: []ItemAccount{
|
||||
{
|
||||
Meta: []interface{}{},
|
||||
InfoAccount: InfoAccount{
|
||||
CreatedTime: 1676878820,
|
||||
DeletedTime: 0,
|
||||
@@ -28,7 +27,6 @@ var accounts = ListAccounts{
|
||||
},
|
||||
},
|
||||
{
|
||||
Meta: []interface{}{},
|
||||
InfoAccount: InfoAccount{
|
||||
CreatedTime: 1676645275,
|
||||
DeletedTime: 1677723401,
|
||||
@@ -49,7 +47,6 @@ var accounts = ListAccounts{
|
||||
},
|
||||
},
|
||||
{
|
||||
Meta: []interface{}{},
|
||||
InfoAccount: InfoAccount{
|
||||
CreatedTime: 1676883850,
|
||||
DeletedTime: 1676883899,
|
||||
|
||||
@@ -46,6 +46,18 @@ type ListResources struct {
|
||||
EntryCount uint64 `json:"entryCount"`
|
||||
}
|
||||
|
||||
// Policy
|
||||
type Policy struct {
|
||||
// Size of the disk
|
||||
DiskSize float64 `json:"disksize"`
|
||||
|
||||
// Max size of the disk
|
||||
DiskSizeMax float64 `json:"disksizemax"`
|
||||
|
||||
// SEPs used
|
||||
SEPs map[string]map[string]DiskUsage `json:"seps"`
|
||||
}
|
||||
|
||||
type Resource struct {
|
||||
// Number of cores
|
||||
CPU int64 `json:"cpu"`
|
||||
@@ -70,6 +82,9 @@ type Resource struct {
|
||||
|
||||
// SEPs
|
||||
SEPs map[string]map[string]DiskUsage `json:"seps"`
|
||||
|
||||
// Policies
|
||||
Policies map[string]Policy `json:"policies"`
|
||||
}
|
||||
|
||||
// Disk usage
|
||||
@@ -143,9 +158,6 @@ type InfoAccount struct {
|
||||
// DCLocation
|
||||
DCLocation string `json:"DCLocation"`
|
||||
|
||||
// CKey
|
||||
CKey string `json:"_ckey"`
|
||||
|
||||
// Company
|
||||
Company string `json:"company"`
|
||||
|
||||
@@ -245,8 +257,6 @@ type RecordAccount struct {
|
||||
|
||||
// More information about account
|
||||
type ItemAccount struct {
|
||||
// Meta
|
||||
Meta []interface{} `json:"_meta"`
|
||||
|
||||
// Access Control List
|
||||
ACL []ACL `json:"acl"`
|
||||
|
||||
Reference in New Issue
Block a user