v1.2.0
This commit is contained in:
@@ -13,18 +13,18 @@ import (
|
||||
type AddUserRequest struct {
|
||||
// ID of account to add to
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Name of the user to be given rights
|
||||
// Required: true
|
||||
UserID string `url:"userId"`
|
||||
UserID string `url:"userId" json:"userId"`
|
||||
|
||||
// Account permission types:
|
||||
// - 'R' for read only access
|
||||
// - 'RCX' for Write
|
||||
// - 'ARCXDU' for Admin
|
||||
// Required: true
|
||||
AccessType string `url:"accesstype"`
|
||||
AccessType string `url:"accesstype" json:"accesstype"`
|
||||
}
|
||||
|
||||
func (arq AddUserRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type AuditsRequest struct {
|
||||
// ID of the account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq AuditsRequest) validate() error {
|
||||
|
||||
@@ -11,43 +11,43 @@ import (
|
||||
type CreateRequest struct {
|
||||
// Display name
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Name of the account
|
||||
// Required: true
|
||||
Username string `url:"username"`
|
||||
Username string `url:"username" json:"username"`
|
||||
|
||||
// Email
|
||||
// Required: false
|
||||
EmailAddress string `url:"emailaddress,omitempty"`
|
||||
EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"`
|
||||
|
||||
// Max size of memory in MB
|
||||
// Required: false
|
||||
MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty"`
|
||||
MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
|
||||
|
||||
// Max size of aggregated vdisks in GB
|
||||
// Required: false
|
||||
MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty"`
|
||||
MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
|
||||
|
||||
// Max number of CPU cores
|
||||
// Required: false
|
||||
MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty"`
|
||||
MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
|
||||
|
||||
// Max sent/received network transfer peering
|
||||
// Required: false
|
||||
MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty"`
|
||||
MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
|
||||
|
||||
// Max number of assigned public IPs
|
||||
// Required: false
|
||||
MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty"`
|
||||
MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`
|
||||
|
||||
// If true send emails when a user is granted access to resources
|
||||
// Required: false
|
||||
SendAccessEmails bool `url:"sendAccessEmails,omitempty"`
|
||||
SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"`
|
||||
|
||||
// Limit (positive) or disable (0) GPU resources
|
||||
// Required: false
|
||||
GPUUnits int64 `url:"gpu_units,omitempty"`
|
||||
GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
|
||||
}
|
||||
|
||||
func (arq CreateRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type DeleteRequest struct {
|
||||
// ID of account to delete
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Whether to completely delete the account
|
||||
// Required: false
|
||||
Permanently bool `url:"permanently,omitempty"`
|
||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
||||
}
|
||||
|
||||
func (arq DeleteRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type DeleteUserRequest struct {
|
||||
// ID of the account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// ID or emailaddress of the user to remove
|
||||
// Required: true
|
||||
UserID string `url:"userId"`
|
||||
UserID string `url:"userId" json:"userId"`
|
||||
|
||||
// Recursively revoke access rights from owned cloudspaces and vmachines
|
||||
// Required: false
|
||||
RecursiveDelete bool `url:"recursivedelete,omitempty"`
|
||||
RecursiveDelete bool `url:"recursivedelete,omitempty" json:"recursivedelete,omitempty"`
|
||||
}
|
||||
|
||||
func (arq DeleteUserRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DisabelEnableRequest struct {
|
||||
// ID of account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq DisabelEnableRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq GetRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetConsumedAccountUnitsRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq GetConsumedAccountUnitsRequest) validate() error {
|
||||
|
||||
@@ -13,11 +13,11 @@ import (
|
||||
type GetConsumedCloudUnitsByTypeRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Cloud unit resource type
|
||||
// Required: true
|
||||
CUType string `url:"cutype"`
|
||||
CUType string `url:"cutype" json:"cutype"`
|
||||
}
|
||||
|
||||
func (arq GetConsumedCloudUnitsByTypeRequest) validate() error {
|
||||
|
||||
@@ -10,15 +10,15 @@ import (
|
||||
type GetConsumtionRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Epoch represents the start time
|
||||
// Required: true
|
||||
Start uint64 `url:"start"`
|
||||
Start uint64 `url:"start" json:"start"`
|
||||
|
||||
// Epoch represents the end time
|
||||
// Required: true
|
||||
End uint64 `url:"end"`
|
||||
End uint64 `url:"end" json:"end"`
|
||||
}
|
||||
|
||||
func (arq GetConsumtionRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetReservedAccountUnitsRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq GetReservedAccountUnitsRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type ListRequest struct {
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page"`
|
||||
Page uint64 `url:"page" json:"page"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size"`
|
||||
Size uint64 `url:"size" json:"size"`
|
||||
}
|
||||
|
||||
// List gets list all accounts the user has access to
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListComputesRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq ListComputesRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type ListDeletedRequest struct {
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page"`
|
||||
Page uint64 `url:"page" json:"page"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size"`
|
||||
Size uint64 `url:"size" json:"size"`
|
||||
}
|
||||
|
||||
// ListDeleted gets list all deleted accounts the user has access to
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListDisksRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq ListDisksRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListFLIPGroupsRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq ListFLIPGroupsRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListRGRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq ListRGRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type ListTemplatesRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Include deleted images
|
||||
// Required: false
|
||||
IncludeDeleted bool `url:"includedeleted"`
|
||||
IncludeDeleted bool `url:"includedeleted" json:"includedeleted"`
|
||||
}
|
||||
|
||||
func (arq ListTemplatesRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListVINSRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq ListVINSRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type RestoreRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (arq RestoreRequest) validate() error {
|
||||
|
||||
@@ -11,39 +11,39 @@ import (
|
||||
type UpdateRequest struct {
|
||||
// ID an account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Name of the account
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty"`
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Max size of memory in MB
|
||||
// Required: false
|
||||
MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty"`
|
||||
MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
|
||||
|
||||
// Max size of aggregated vdisks in GB
|
||||
// Required: false
|
||||
MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty"`
|
||||
MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
|
||||
|
||||
// Max number of CPU cores
|
||||
// Required: false
|
||||
MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty"`
|
||||
MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
|
||||
|
||||
// Max sent/received network transfer peering
|
||||
// Required: false
|
||||
MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty"`
|
||||
MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
|
||||
|
||||
// Max number of assigned public IPs
|
||||
// Required: false
|
||||
MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty"`
|
||||
MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`
|
||||
|
||||
// If true send emails when a user is granted access to resources
|
||||
// Required: false
|
||||
SendAccessEmails bool `url:"sendAccessEmails,omitempty"`
|
||||
SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"`
|
||||
|
||||
// Limit (positive) or disable (0) GPU resources
|
||||
// Required: false
|
||||
GPUUnits uint64 `url:"gpu_units,omitempty"`
|
||||
GPUUnits uint64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
|
||||
}
|
||||
|
||||
func (arq UpdateRequest) validate() error {
|
||||
|
||||
@@ -13,18 +13,18 @@ import (
|
||||
type UpdateUserRequest struct {
|
||||
// ID of the account
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Userid/Email for registered users or emailaddress for unregistered users
|
||||
// Required: true
|
||||
UserID string `url:"userId"`
|
||||
UserID string `url:"userId" json:"userId"`
|
||||
|
||||
// Account permission types:
|
||||
// - 'R' for read only access
|
||||
// - 'RCX' for Write
|
||||
// - 'ARCXDU' for Admin
|
||||
// Required: true
|
||||
AccessType string `url:"accesstype"`
|
||||
AccessType string `url:"accesstype" json:"accesstype"`
|
||||
}
|
||||
|
||||
func (arq UpdateUserRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user