cmd

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "1.1.0"
	BuildTime = "unknown"
	Commit    = "unknown"
)

Functions

func BlueHeading

func BlueHeading(text string) string

BlueHeading returns a string formatted as a blue heading

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GreenText

func GreenText(text string) string

GreenText returns a string formatted as green text

func RedText

func RedText(text string) string

RedText returns a string formatted as red text

func WhiteText

func WhiteText(text string) string

WhiteText returns a string formatted as white text

func YellowText

func YellowText(text string) string

YellowText returns a string formatted as yellow text

Types

type AddonTypes

type AddonTypes struct {
	OperatingSystems OperatingSystemsSection `json:"operating_systems"`
	Licenses         LicenseSection          `json:"licenses"`
	SupportLevels    SupportSection          `json:"support_levels"`
}

AddonTypes contains the different types of add-ons

type AddonsResponse

type AddonsResponse struct {
	StatusCode int        `json:"statusCode"`
	Message    string     `json:"message"`
	Data       AddonTypes `json:"data"` // Changed from array to object
}

AddonsResponse represents the response from the add-ons API

type AssignedSSHKey

type AssignedSSHKey struct {
	ID        int    `json:"id"`         // Unique identifier of the SSH key
	Label     string `json:"label"`      // User-defined label for the SSH key
	Key       string `json:"key"`        // The actual SSH public key content
	CreatedAt int64  `json:"created_at"` // Unix timestamp when the key was created
	UpdatedAt int64  `json:"updated_at"` // Unix timestamp when the key was last updated
}

AssignedSSHKey represents an individual SSH key in the API response. Contains information about an SSH key assigned to a server.

type AssignedSSHKeysResponse

type AssignedSSHKeysResponse struct {
	StatusCode int              `json:"statusCode"` // HTTP status code returned by the API
	Message    string           `json:"message"`    // Human-readable message about the response
	Data       []AssignedSSHKey `json:"data"`       // Array of SSH key objects
}

AssignedSSHKeysResponse represents the response from the server SSH keys API. This is returned when listing SSH keys assigned to a server.

type CustomPXEResponse

type CustomPXEResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       int    `json:"data"`       // Result data (typically a success indicator)
}

CustomPXEResponse represents the response from the custom PXE API. This is returned when setting a custom PXE URL for a server.

type FlexibleID added in v1.0.2

type FlexibleID struct {
	// contains filtered or unexported fields
}

FlexibleID is a custom type that can unmarshal both string and numeric JSON values

func (FlexibleID) Int added in v1.0.2

func (f FlexibleID) Int() (int, error)

Int returns the integer representation of the ID

func (FlexibleID) String added in v1.0.2

func (f FlexibleID) String() string

String returns the string representation of the ID

func (*FlexibleID) UnmarshalJSON added in v1.0.2

func (f *FlexibleID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type GenericServerResponse

type GenericServerResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		Success bool `json:"success"` // Whether the operation was successful
	} `json:"data"`
}

GenericServerResponse represents the response from several management APIs. This is returned when performing power operations like power on/off/reboot.

type GroupedInventory

type GroupedInventory struct {
	LocationCode   string
	SkuProductName string
	Price          string
	HourlyEnabled  bool
	HourlyPrice    string
	TotalQuantity  int
}

GroupedInventory represents inventory grouped by location and SKU

type InventoryDetails

type InventoryDetails struct {
	SkuID            int        `json:"sku_id"`
	Quantity         int        `json:"quantity"`
	AutoProvisionQty int        `json:"auto_provision_quantity"`
	DatacenterID     int        `json:"datacenter_id"`
	RegionID         int        `json:"region_id"`
	LocationCode     string     `json:"location_code"`
	CPUBrand         string     `json:"cpu_brand"`
	CPUModel         string     `json:"cpu_model"`
	CPUClockSpeedGhz float64    `json:"cpu_clock_speed_ghz"`
	CPUCores         int        `json:"cpu_cores"`
	CPUCount         int        `json:"cpu_count"`
	TotalSSDSizeGB   int        `json:"total_ssd_size_gb"`
	TotalHDDSizeGB   int        `json:"total_hdd_size_gb"`
	TotalNVMESizeGB  int        `json:"total_nvme_size_gb"`
	RAIDEnabled      bool       `json:"raid_enabled"`
	TotalRAMGB       int        `json:"total_ram_gb"`
	NICSpeedMbps     int        `json:"nic_speed_mbps"`
	QTProductID      int        `json:"qt_product_id"`
	Status           string     `json:"status"`
	Metadata         []Metadata `json:"metadata"`
	CurrencyCode     string     `json:"currency_code"`
	SkuProductName   string     `json:"sku_product_name"`
	Price            string     `json:"price"`
	HourlyEnabled    bool       `json:"hourly_enabled"`
	HourlyPrice      string     `json:"price_hourly"`
}

InventoryDetails represents a server from inventory

type InventoryResponse

type InventoryResponse struct {
	StatusCode int                `json:"statusCode"`
	Message    string             `json:"message"`
	Data       []InventoryDetails `json:"data"`
}

InventoryResponse represents the response from the inventory API

type LicenseProduct

type LicenseProduct struct {
	Name          string  `json:"name"`
	ProductCode   string  `json:"product_code"`
	Price         float64 `json:"price"`
	HourlyEnabled bool    `json:"hourly_enabled"`
	HourlyPrice   float64 `json:"hourly_price"`
}

LicenseProduct represents a license product

type LicenseSection

type LicenseSection struct {
	Name     string           `json:"name"`
	Products []LicenseProduct `json:"products"`
}

LicenseSection contains license options

type Metadata

type Metadata struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Value       string `json:"value"`
}

Metadata represents additional server information

type OS

type OS struct {
	ID       string   `json:"id"`       // Unique identifier of the operating system
	Name     string   `json:"name"`     // Display name of the operating system
	Version  string   `json:"version"`  // Version of the operating system
	Licenses []string `json:"licenses"` // Licenses required for this operating system
}

OS represents an individual operating system in the API response. Contains details about an operating system available for installation.

type OSListResponse

type OSListResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		OSList []OS `json:"osList"` // List of available operating systems
	} `json:"data"`
}

OSListResponse represents the response from the available OS list API. This is returned when fetching available operating systems for a server.

type OSProduct

type OSProduct struct {
	Name          string      `json:"name"`
	OSType        string      `json:"os_type"`
	ProductCode   string      `json:"product_code"`
	Price         float64     `json:"price"`
	PricePerCore  interface{} `json:"price_per_core"`
	HourlyEnabled bool        `json:"hourly_enabled"`
	HourlyPrice   float64     `json:"hourly_price"`
}

OSProduct represents an operating system product

type OperatingSystemsSection

type OperatingSystemsSection struct {
	Name     string      `json:"name"`
	Required string      `json:"required"`
	Products []OSProduct `json:"products"`
}

OperatingSystemsSection contains operating system options

type OrderRequest

type OrderRequest struct {
	SKUProductName             string `json:"sku_product_name"`
	Quantity                   int    `json:"quantity"`
	LocationCode               string `json:"location_code"`
	OperatingSystemProductCode string `json:"operating_system_product_code"`
	LicenseProductCode         string `json:"license_product_code,omitempty"`
	AdditionalBandwidthTB      int    `json:"additional_bandwidth_tb,omitempty"`
	SupportLevelProductCode    string `json:"support_level_product_code,omitempty"`
	SSHKeyIDs                  []int  `json:"ssh_key_ids,omitempty"`
	BillHourly                 bool   `json:"bill_hourly,omitempty"`
}

OrderRequest represents the request body for placing an order

type OrderResponse

type OrderResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		OrderServiceIDs []int `json:"order_service_ids"` // Array of service IDs created by the order
	} `json:"data"`
}

OrderResponse represents the response from the order API This is returned when successfully placing a server order.

type PowerStatusResponse

type PowerStatusResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		IsPoweredOn bool `json:"is_powered_on"` // Whether the server is powered on
	} `json:"data"`
}

PowerStatusResponse represents the power status API response. This is returned when checking the power state of a server.

type RemoteAccessResponse

type RemoteAccessResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		Redirect string `json:"redirect"` // URL to access the remote console
	} `json:"data"`
}

RemoteAccessResponse represents the response from the remote access API. This is returned when requesting console access to a server.

type SSHKey

type SSHKey struct {
	ID              int         `json:"id"`               // Unique identifier of the SSH key
	Label           string      `json:"label"`            // User-defined label for the SSH key
	Key             string      `json:"key"`              // The actual SSH public key content
	CreatedAt       int64       `json:"created_at"`       // Unix timestamp when the key was created
	UpdatedAt       int64       `json:"updated_at"`       // Unix timestamp when the key was last updated
	AssignedServers []SSHServer `json:"assigned_servers"` // List of servers this key is assigned to
}

SSHKey represents an individual SSH key in the API response. Contains detailed information about a single SSH key including assigned servers.

type SSHKeyAddResponse

type SSHKeyAddResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		ID int `json:"id"` // Unique identifier of the newly created SSH key
	} `json:"data"`
}

SSHKeyAddResponse represents the response from adding a new SSH key. This is returned when creating a new SSH key through the API.

type SSHKeyAssignData added in v1.0.2

type SSHKeyAssignData struct {
	ID        int    `json:"id"`         // SSH key ID
	Label     string `json:"label"`      // SSH key label
	Key       string `json:"key"`        // SSH public key content
	CreatedAt int64  `json:"created_at"` // Unix timestamp when created
	UpdatedAt int64  `json:"updated_at"` // Unix timestamp when updated
}

SSHKeyAssignData represents a simplified SSH key in the assign response

type SSHKeyAssignResponse

type SSHKeyAssignResponse struct {
	StatusCode int                `json:"statusCode"` // HTTP status code returned by the API
	Message    string             `json:"message"`    // Human-readable message about the response
	Data       []SSHKeyAssignData `json:"data"`       // Array of assigned SSH keys with basic info
}

SSHKeyAssignResponse represents the response from assigning an SSH key to a server. This is returned when adding an SSH key to a specific server.

type SSHKeyDeleteResponse

type SSHKeyDeleteResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       bool   `json:"data"`       // Success indicator (true if deletion was successful)
}

SSHKeyDeleteResponse represents the response from deleting an SSH key. This is returned when removing an SSH key through the API.

type SSHKeyUnassignResponse

type SSHKeyUnassignResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       bool   `json:"data"`       // Success indicator (true if unassignment was successful)
}

SSHKeyUnassignResponse represents the response from removing an SSH key from a server. This is returned when removing an SSH key from a specific server.

type SSHKeysResponse

type SSHKeysResponse struct {
	StatusCode int      `json:"statusCode"` // HTTP status code returned by the API
	Message    string   `json:"message"`    // Human-readable message about the response
	Data       []SSHKey `json:"data"`       // Array of SSH key objects
}

SSHKeysResponse represents the response from the SSH keys API. This is returned when listing all SSH keys for a customer.

type SSHServer

type SSHServer struct {
	ServerID       string `json:"server_id"`       // Unique identifier of the server
	ServiceID      int    `json:"service_id"`      // Service ID associated with the server
	Domain         string `json:"domain"`          // Domain name associated with the server
	Hostname       string `json:"hostname"`        // Server hostname
	DatacenterName string `json:"datacenter_name"` // Name of the datacenter where the server is located
}

SSHServer represents a server that has the SSH key assigned. Contains basic information about a server associated with an SSH key.

type Server

type Server struct {
	ID             string `json:"id"`              // Unique identifier of the server
	Hostname       string `json:"hostname"`        // Server hostname
	MacAddress     string `json:"mac_address"`     // Primary MAC address of the server
	PublicIP       string `json:"public_ip"`       // Primary public IP address
	ServiceID      int    `json:"service_id"`      // Service ID associated with the server
	DatacenterName string `json:"datacenter_name"` // Name of the datacenter where the server is located
	FriendlyName   string `json:"friendly_name"`   // User-defined friendly name for the server
	ServerType     string `json:"server_type"`     // Type of server (e.g., "dedicated", "cloud")
	HourlyBilling  bool   `json:"hourly_billing"`  // Whether hourly billing is enabled for this server
}

Server represents an individual server in the API response. Contains basic information about a server from the list endpoint.

type ServerDetail

type ServerDetail struct {
	Hostname                string     `json:"hostname"`                  // Server hostname
	MacAddress              string     `json:"mac_address"`               // Primary MAC address of the server
	PublicIP                string     `json:"public_ip"`                 // Primary public IP address
	ServiceID               int        `json:"service_id"`                // Service ID associated with the server
	FriendlyName            string     `json:"friendly_name"`             // User-defined friendly name for the server
	ServerID                FlexibleID `json:"id"`                        // Unique identifier of the server
	OperatingSystemID       string     `json:"operatingSystemId"`         // ID of the installed operating system
	OperatingSystemName     string     `json:"operating_system"`          // Name of the installed operating system
	OperatingSystemUsername string     `json:"operating_system_user"`     // Username for OS login
	OperatingSystemPassword string     `json:"operating_system_password"` // Password for OS login
	DatacenterName          string     `json:"datacenter"`                // Name of the datacenter where the server is located
	HourlyBilling           bool       `json:"hourly_billing"`            // Whether hourly billing is enabled for this server
	HourlyPrice             float64    `json:"hourly_price"`              // Hourly price when hourly billing is enabled

	// IPAddresses contains all IP addresses assigned to the server
	IPAddresses []struct {
		IPAddress string `json:"ipAddress"` // The IP address
		IsPrimary bool   `json:"isPrimary"` // Whether this is the primary IP address
		Gateway   string `json:"gateway"`   // Gateway address for this IP
		Netmask   string `json:"netmask"`   // Network mask for this IP
		VlanID    string `json:"vlanId"`    // VLAN ID if the IP is on a VLAN
	} `json:"ip_addresses"`

	// NetworkPort contains network port information
	NetworkPort []struct {
		ID         int    `json:"id"`         // Port identifier
		PortNumber int    `json:"portNumber"` // Physical port number
		MacAddress string `json:"macAddress"` // MAC address for this port
		IPAddress  string `json:"ipAddress"`  // IP address assigned to this port
		Speed      string `json:"speed"`      // Current port speed
		MaxSpeed   string `json:"maxSpeed"`   // Maximum supported port speed
	} `json:"network_port"`

	// ProvisioningStatus contains information about the server's provisioning state
	ProvisioningStatus struct {
		IsProvisioning bool   `json:"isProvisioning"` // Whether the server is currently being provisioned
		StatusMessage  string `json:"statusMessage"`  // Human-readable status message
	} `json:"provisioning_status"`
}

ServerDetail represents the detailed information about a server. Contains comprehensive information about a specific server.

type ServerDetailResponse

type ServerDetailResponse struct {
	StatusCode int          `json:"statusCode"` // HTTP status code returned by the API
	Message    string       `json:"message"`    // Human-readable message about the response
	Data       ServerDetail `json:"data"`       // Detailed server information
}

ServerDetailResponse represents the server detail API response. This is returned when fetching details for a specific server.

type ServerResponse

type ServerResponse struct {
	StatusCode int      `json:"statusCode"` // HTTP status code returned by the API
	Message    string   `json:"message"`    // Human-readable message about the response
	Data       []Server `json:"data"`       // Array of server objects
}

ServerResponse represents the server list API response. This is returned when listing all servers.

type SupportProduct

type SupportProduct struct {
	Name          string  `json:"name"`
	Description   string  `json:"description"`
	ProductCode   string  `json:"product_code"`
	Price         float64 `json:"price"`
	HourlyEnabled bool    `json:"hourly_enabled"`
	HourlyPrice   float64 `json:"hourly_price"`
}

SupportProduct represents a support product

type SupportSection

type SupportSection struct {
	Name     string           `json:"name"`
	Products []SupportProduct `json:"products"`
}

SupportSection contains support options

type UserResponse

type UserResponse struct {
	Data struct {
		UserProfile struct {
			Username string `json:"username"`
		} `json:"userProfile"`
	} `json:"data"`
}

UserResponse represents the structure of the API response

type VPSBasic added in v1.1.0

type VPSBasic struct {
	ID            int    `json:"id"`             // Unique identifier of the VPS
	ServiceID     int    `json:"service_id"`     // Service ID associated with the VPS
	Label         string `json:"label"`          // User-defined label for the VPS
	Hostname      string `json:"hostname"`       // VPS hostname
	IPAddress     string `json:"ip_address"`     // Primary IP address
	Backups       int    `json:"backups"`        // Whether backups are enabled
	HourlyBilling int    `json:"hourly_billing"` // Whether hourly billing is enabled (0 or 1)
	PlanID        int    `json:"plan_id"`        // Plan ID
	Location      struct {
		ID   int    `json:"id"`   // Location ID
		Name string `json:"name"` // Location name
	} `json:"location"` // Datacenter location information
}

VPSBasic represents an individual VPS in the API response. Contains basic information about a VPS from the list endpoint.

type VPSDeployRequest added in v1.1.0

type VPSDeployRequest struct {
	ProductName     string `json:"product_name"`      // VPS plan/SKU (e.g., "V1", "V2")
	Label           string `json:"label"`             // Friendly name/label for the VPS
	Hostname        string `json:"hostname"`          // Hostname for the VPS
	Backups         bool   `json:"backups"`           // Enable backups
	BillHourly      bool   `json:"bill_hourly"`       // Enable hourly billing
	OSComponentCode string `json:"os_component_code"` // Operating system component code
}

VPSDeployRequest represents the request body for deploying a VPS

type VPSDeployResponse added in v1.1.0

type VPSDeployResponse struct {
	StatusCode int           `json:"status_code"` // HTTP status code returned by the API
	Message    string        `json:"message"`     // Human-readable message about the response
	Data       []interface{} `json:"data"`        // Empty array on success
}

VPSDeployResponse represents the response from the VPS deploy API

type VPSDetail added in v1.1.0

type VPSDetail struct {
	ID                    int    `json:"id"`                      // Unique identifier of the VPS
	Hostname              string `json:"hostname"`                // VPS hostname
	Memory                int    `json:"memory"`                  // RAM in MB
	CPUs                  int    `json:"cpus"`                    // Number of CPU cores
	CreatedAt             string `json:"created_at"`              // Creation timestamp
	Built                 bool   `json:"built"`                   // Whether VPS is built
	Booted                bool   `json:"booted"`                  // Whether VPS is booted
	Label                 string `json:"label"`                   // User-defined label
	OperatingSystem       string `json:"operating_system"`        // Operating system type
	OperatingSystemDistro string `json:"operating_system_distro"` // OS distribution
	Note                  string `json:"note"`                    // User notes
	Suspended             bool   `json:"suspended"`               // Whether VPS is suspended
	Domain                string `json:"domain"`                  // Domain name
	TotalDiskSize         int    `json:"total_disk_size"`         // Total disk size in GB
	InitialRootPassword   string `json:"initial_root_password"`   // Initial root password
	HourlyBilling         int    `json:"hourly_billing"`          // Whether hourly billing is enabled (0 or 1)
	Backups               int    `json:"backups"`                 // Whether backups are enabled (0 or 1)

	// IPAddresses contains all IP addresses assigned to the VPS
	IPAddresses []struct {
		IPAddress struct {
			Address        string `json:"address"`         // The IP address
			Broadcast      string `json:"broadcast"`       // Broadcast address
			NetworkAddress string `json:"network_address"` // Network address
			Gateway        string `json:"gateway"`         // Gateway address
			CreatedAt      string `json:"created_at"`      // Creation timestamp
			RdnsEntry      string `json:"rdnsEntry"`       // Reverse DNS entry
		} `json:"ip_address"`
	} `json:"ip_addresses"`
}

VPSDetail represents the detailed information about a VPS. Contains comprehensive information about a specific VPS.

type VPSDetailResponse added in v1.1.0

type VPSDetailResponse struct {
	StatusCode int       `json:"statusCode"` // HTTP status code returned by the API
	Message    string    `json:"message"`    // Human-readable message about the response
	Data       VPSDetail `json:"data"`       // Detailed VPS information
}

VPSDetailResponse represents the VPS detail API response. This is returned when fetching details for a specific VPS.

type VPSEmptyDataResponse added in v1.1.0

type VPSEmptyDataResponse struct {
	StatusCode int           `json:"status_code"` // HTTP status code returned by the API
	Message    string        `json:"message"`     // Human-readable message about the response
	Data       []interface{} `json:"data"`        // Empty array
}

VPSEmptyDataResponse represents responses that return an empty data array. This is used for operations like reboot that return "data": []

type VPSGenericResponse added in v1.1.0

type VPSGenericResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		Success bool `json:"success"` // Whether the operation was successful
	} `json:"data"`
}

VPSGenericResponse represents the response from several management APIs. This is returned when performing power operations like power on/off/reboot.

type VPSLocation added in v1.1.0

type VPSLocation struct {
	ID   int    `json:"id"`   // Location ID
	Name string `json:"name"` // Location name
}

VPSLocation represents a VPS datacenter location

type VPSLocationResponse added in v1.1.0

type VPSLocationResponse struct {
	StatusCode int           `json:"statusCode"`
	Message    string        `json:"message"`
	Data       []VPSLocation `json:"data"`
}

VPSLocationResponse represents the response from the VPS locations API

type VPSOS added in v1.1.0

type VPSOS struct {
	Name                string  `json:"name"`                  // Display name of the operating system
	ComponentCode       string  `json:"component_code"`        // OS component code
	Price               float64 `json:"price"`                 // Monthly price
	PriceHourly         float64 `json:"price_hourly"`          // Hourly price
	Currency            string  `json:"currency"`              // Currency code
	MinDiskSize         string  `json:"min_disk_size"`         // Minimum disk size in GB
	OperatingSystemArch string  `json:"operating_system_arch"` // Architecture (x64, etc)
	MinMemorySize       string  `json:"min_memory_size"`       // Minimum memory in MB
}

VPSOS represents an operating system available for VPS

type VPSOSResponse added in v1.1.0

type VPSOSResponse struct {
	StatusCode int     `json:"statusCode"`
	Message    string  `json:"message"`
	Data       []VPSOS `json:"data"`
}

VPSOSResponse represents the response from the VPS OS list API

type VPSPlan added in v1.1.0

type VPSPlan struct {
	ID          int    `json:"id"`           // Plan ID
	Label       string `json:"label"`        // Plan description/label
	Price       string `json:"price"`        // Monthly price
	ProductName string `json:"product_name"` // Plan product name/SKU
}

VPSPlan represents a VPS plan/package

type VPSPlanResponse added in v1.1.0

type VPSPlanResponse struct {
	StatusCode int       `json:"statusCode"`
	Message    string    `json:"message"`
	Data       []VPSPlan `json:"data"`
}

VPSPlanResponse represents the response from the VPS plans API

type VPSPowerStatusResponse added in v1.1.0

type VPSPowerStatusResponse struct {
	StatusCode int    `json:"statusCode"` // HTTP status code returned by the API
	Message    string `json:"message"`    // Human-readable message about the response
	Data       struct {
		IsPoweredOn bool `json:"is_powered_on"` // Whether the VPS is powered on
	} `json:"data"`
}

VPSPowerStatusResponse represents the power status API response. This is returned when checking the power state of a VPS.

type VPSResponse added in v1.1.0

type VPSResponse struct {
	StatusCode int        `json:"statusCode"` // HTTP status code returned by the API
	Message    string     `json:"message"`    // Human-readable message about the response
	Data       []VPSBasic `json:"data"`       // Array of VPS objects
}

VPSResponse represents the VPS list API response. This is returned when listing all VPS servers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL