v1.5.0-gamma2

This commit is contained in:
2023-07-07 12:40:03 +03:00
parent 20fd7ab50c
commit 7c787f6fce
111 changed files with 2905 additions and 1505 deletions

View File

@@ -8,6 +8,30 @@ import (
// Request struct for get list/list_deleted of disks
type ListRequest struct {
// Find by id
// Required: false
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
// Find by name
// Required: false
Name string `url:"name,omitempty" json:"name,omitempty"`
// Find by account name
// Required: false
AccountName string `url:"accountName,omitempty" json:"accountName,omitempty"`
// Find by max size disk
// Required: false
DiskMaxSize int64 `url:"diskMaxSize,omitempty" json:"diskMaxSize,omitempty"`
// Find by status
// Required: false
Status string `url:"status,omitempty" json:"status,omitempty"`
// Find by shared, true or false
// Required: false
Shared bool `url:"shared,omitempty" json:"shared,omitempty"`
// ID of the account the disks belong to
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
@@ -26,7 +50,7 @@ type ListRequest struct {
}
// List gets list the created disks belonging to an account
func (d Disks) List(ctx context.Context, req ListRequest) (ListDisks, error) {
func (d Disks) List(ctx context.Context, req ListRequest) (*ListDisks, error) {
url := "/cloudbroker/disks/list"
res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, req)
@@ -41,5 +65,5 @@ func (d Disks) List(ctx context.Context, req ListRequest) (ListDisks, error) {
return nil, err
}
return list, nil
return &list, nil
}