v1.5.0-gamma

This commit is contained in:
2023-06-30 11:21:47 +03:00
parent 29c7f143fe
commit f50f71ab0d
98 changed files with 2369 additions and 1150 deletions

View File

@@ -8,17 +8,33 @@ import (
// Request struct for get list of accounts
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 access control list
// Required: false
ACL string `url:"acl,omitempty" json:"acl,omitempty"`
// Find by status
// Required: false
Status string `url:"status,omitempty" json:"status,omitempty"`
// Page number
// Required: false
Page uint64 `url:"page" json:"page"`
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
// Page size
// Required: false
Size uint64 `url:"size" json:"size"`
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}
// List gets list all accounts the user has access to
func (a Account) List(ctx context.Context, req ListRequest) (ListAccounts, error) {
func (a Account) List(ctx context.Context, req ListRequest) (*ListAccounts, error) {
url := "/cloudapi/account/list"
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
@@ -33,5 +49,5 @@ func (a Account) List(ctx context.Context, req ListRequest) (ListAccounts, error
return nil, err
}
return list, nil
return &list, nil
}