This commit is contained in:
stSolo
2023-03-01 19:05:53 +03:00
parent de12bc2acc
commit 42800ac4fe
573 changed files with 2077 additions and 1844 deletions

View File

@@ -11,15 +11,15 @@ import (
type AddRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
// Name of the location
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Location code typicly used in dns names
// Required: true
LocationCode string `url:"locationcode"`
LocationCode string `url:"locationcode" json:"locationcode"`
}
func (grq AddRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type ChangeSettingsRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"id"`
GID uint64 `url:"id" json:"id"`
// Json data of the new settings will override old data
// Required: true
Settings string `url:"settings"`
Settings string `url:"settings" json:"settings"`
}
func (grq ChangeSettingsRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type CheckVMsRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
}
func (grq CheckVMsRequest) validate() error {

View File

@@ -10,35 +10,35 @@ import (
type CreateSystemSpaceRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"id"`
GID uint64 `url:"id" json:"id"`
// Name of the account/cloudspace to be created for the system
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// ID of the specific image
// Required: true
ImageID uint64 `url:"imageId"`
ImageID uint64 `url:"imageId" json:"imageId"`
// Size of base volume
// Required: true
BootSize uint64 `url:"bootsize"`
BootSize uint64 `url:"bootsize" json:"bootsize"`
// Data disk size in gigabytes
// Required: true
DataDiskSize uint64 `url:"dataDiskSize"`
DataDiskSize uint64 `url:"dataDiskSize" json:"dataDiskSize"`
// ID of the specific size
// Required: false
SizeID uint64 `url:"sizeId,omitempty"`
SizeID uint64 `url:"sizeId,omitempty" json:"sizeId,omitempty"`
// Number of vcpus to provide
// Required: false
VCPUS uint64 `url:"vcpus,omitempty"`
VCPUS uint64 `url:"vcpus,omitempty" json:"vcpus,omitempty"`
// Amount of memory to provide
// Required: false
Memory uint64 `url:"memory,omitempty"`
Memory uint64 `url:"memory,omitempty" json:"memory,omitempty"`
}
func (grq CreateSystemSpaceRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type ExecuteMaintenanceScriptRequest struct {
// Grid (platform) ID
// Required: true
GID string `url:"gid"`
GID string `url:"gid" json:"gid"`
// Type of nodes you want to apply the action on
// Required: true
NodesType string `url:"nodestype"`
NodesType string `url:"nodestype" json:"nodestype"`
// The script you want to run
// Required: true
Script string `url:"script"`
Script string `url:"script" json:"script"`
}
func (grq ExecuteMaintenanceScriptRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gridId"`
GID uint64 `url:"gridId" json:"gridId"`
}
func (grq GetRequest) validate() error {

View File

@@ -10,7 +10,7 @@ import (
type GetBackupRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
}
func (grq GetBackupRequest) validate() error {

View File

@@ -10,7 +10,7 @@ import (
type GetDiagnosisRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
}
func (grq GetDiagnosisRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
type ListRequest struct {
// Page number
// Required: false
Page uint64 `url:"page,omitempty"`
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
// Page size
// Required: false
Size uint64 `url:"size,omitempty"`
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}
// List gets list all locations

View File

@@ -11,11 +11,11 @@ import (
type PurgeLogsRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
// Age of the records to remove, e.g. -1h for records older than 1 hour, -1w - one week, etc
// Required: true
Age string `url:"age"`
Age string `url:"age" json:"age"`
}
func (grq PurgeLogsRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type RenameRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
// New name
// Required: true
Name string `url:"Name"`
Name string `url:"Name" json:"Name"`
}
func (grq RenameRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type ServicesRestartRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
// Node ID
// Required: true
NID uint64 `url:"nid"`
NID uint64 `url:"nid" json:"nid"`
}
func (grq ServicesRestartRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type SetCPUAllocationRatioRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gridId"`
GID uint64 `url:"gridId" json:"gridId"`
// Allocation ratio
// Required: true
Ratio float64 `url:"ratio"`
Ratio float64 `url:"ratio" json:"ratio"`
}
func (grq SetCPUAllocationRatioRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type SetMemAllocationRatioRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gridId"`
GID uint64 `url:"gridId" json:"gridId"`
// Allocation ratio
// Required: true
Ratio float64 `url:"ratio"`
Ratio float64 `url:"ratio" json:"ratio"`
}
func (grq SetMemAllocationRatioRequest) validate() error {