Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type APIClusterDeleteResponse
- type APIClusterDeleteResponseData
- type APIClusterDeleteResponseOperationCode
- type APIClusterGetResponse
- type APIClusterGetResponseData
- type APIClusterGetResponseOperationCode
- type APIClusterGetSSHKeyResponse
- type APIClusterGetSSHKeyResponseOperationCode
- type APIClusterListResponse
- type APIClusterListResponseData
- type APIClusterListResponseOperationCode
- type APIClusterNewParams
- type APIClusterNewResponse
- type APIClusterNewResponseData
- type APIClusterNewResponseOperationCode
- type APIClusterService
- func (r *APIClusterService) Delete(ctx context.Context, clusterIDOrAlias string, opts ...option.RequestOption) (res *APIClusterDeleteResponse, err error)
- func (r *APIClusterService) Get(ctx context.Context, clusterIDOrAlias string, opts ...option.RequestOption) (res *APIClusterGetResponse, err error)
- func (r *APIClusterService) GetSSHKey(ctx context.Context, clusterIDOrAlias string, opts ...option.RequestOption) (res *APIClusterGetSSHKeyResponse, err error)
- func (r *APIClusterService) List(ctx context.Context, opts ...option.RequestOption) (res *APIClusterListResponse, err error)
- func (r *APIClusterService) New(ctx context.Context, body APIClusterNewParams, opts ...option.RequestOption) (res *APIClusterNewResponse, err error)
- func (r *APIClusterService) Update(ctx context.Context, clusterIDOrAlias string, body APIClusterUpdateParams, ...) (res *APIClusterUpdateResponse, err error)
- type APIClusterUpdateParams
- type APIClusterUpdateResponse
- type APIClusterUpdateResponseData
- type APIClusterUpdateResponseOperationCode
- type APIHealthService
- type APIRootfDeleteResponse
- type APIRootfDeleteResponseData
- type APIRootfDeleteResponseOperationCode
- type APIRootfListResponse
- type APIRootfListResponseData
- type APIRootfListResponseOperationCode
- type APIRootfService
- func (r *APIRootfService) Delete(ctx context.Context, rootfsID string, opts ...option.RequestOption) (res *APIRootfDeleteResponse, err error)
- func (r *APIRootfService) List(ctx context.Context, opts ...option.RequestOption) (res *APIRootfListResponse, err error)
- func (r *APIRootfService) Upload(ctx context.Context, rootfsID string, body APIRootfUploadParams, ...) (res *APIRootfUploadResponse, err error)
- type APIRootfUploadParams
- type APIRootfUploadResponse
- type APIRootfUploadResponseData
- type APIRootfUploadResponseOperationCode
- type APIService
- type APITelemetryService
- type APIVmBranchParams
- type APIVmBranchResponse
- type APIVmBranchResponseData
- type APIVmBranchResponseDataNetworkInfo
- type APIVmBranchResponseDataState
- type APIVmBranchResponseOperationCode
- type APIVmCommitParams
- type APIVmCommitResponse
- type APIVmCommitResponseData
- type APIVmCommitResponseOperationCode
- type APIVmDeleteParams
- type APIVmDeleteResponse
- type APIVmDeleteResponseData
- type APIVmDeleteResponseDataError
- type APIVmDeleteResponseOperationCode
- type APIVmGetResponse
- type APIVmGetResponseData
- type APIVmGetResponseDataNetworkInfo
- type APIVmGetResponseDataState
- type APIVmGetResponseOperationCode
- type APIVmGetSSHKeyResponse
- type APIVmGetSSHKeyResponseOperationCode
- type APIVmListResponse
- type APIVmListResponseData
- type APIVmListResponseDataNetworkInfo
- type APIVmListResponseDataState
- type APIVmListResponseOperationCode
- type APIVmService
- func (r *APIVmService) Branch(ctx context.Context, vmIDOrAlias string, body APIVmBranchParams, ...) (res *APIVmBranchResponse, err error)
- func (r *APIVmService) Commit(ctx context.Context, vmIDOrAlias string, body APIVmCommitParams, ...) (res *APIVmCommitResponse, err error)
- func (r *APIVmService) Delete(ctx context.Context, vmIDOrAlias string, body APIVmDeleteParams, ...) (res *APIVmDeleteResponse, err error)
- func (r *APIVmService) Get(ctx context.Context, vmIDOrAlias string, opts ...option.RequestOption) (res *APIVmGetResponse, err error)
- func (r *APIVmService) GetSSHKey(ctx context.Context, vmIDOrAlias string, opts ...option.RequestOption) (res *APIVmGetSSHKeyResponse, err error)
- func (r *APIVmService) List(ctx context.Context, opts ...option.RequestOption) (res *APIVmListResponse, err error)
- func (r *APIVmService) Update(ctx context.Context, vmIDOrAlias string, body APIVmUpdateParams, ...) (res *APIVmUpdateResponse, err error)
- type APIVmUpdateParams
- type APIVmUpdateResponse
- type APIVmUpdateResponseData
- type APIVmUpdateResponseDataNetworkInfo
- type APIVmUpdateResponseDataState
- type APIVmUpdateResponseOperationCode
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type ClusterCreateRequestClusterFromCommitParamsClusterType
- type ClusterCreateRequestClusterFromCommitParamsParam
- type ClusterCreateRequestClusterFromCommitParamsParamsParam
- type ClusterCreateRequestClusterType
- type ClusterCreateRequestNewClusterParamsClusterType
- type ClusterCreateRequestNewClusterParamsParam
- type ClusterCreateRequestNewClusterParamsParamsParam
- type ClusterCreateRequestParam
- type ClusterCreateRequestUnionParam
- type ClusterPatchRequestParam
- type Error
- type TelemetryDto
- type VmBranchRequestParam
- type VmCommitRequestParam
- type VmDeleteResponse
- type VmDeleteResponseError
- type VmDto
- type VmDtoNetworkInfo
- type VmDtoState
- type VmPatchRequestParam
- type VmPatchRequestState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (VERS_API_KEY, VERS_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type APIClusterDeleteResponse ¶
type APIClusterDeleteResponse struct { // A struct containing information about an attempted cluster deletion request. // Reports information in the event of a partial failure so billing can still be // udpated appropriately. Data APIClusterDeleteResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIClusterDeleteResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiClusterDeleteResponseJSON `json:"-"` }
func (*APIClusterDeleteResponse) UnmarshalJSON ¶
func (r *APIClusterDeleteResponse) UnmarshalJSON(data []byte) (err error)
type APIClusterDeleteResponseData ¶
type APIClusterDeleteResponseData struct { ClusterID string `json:"cluster_id,required"` // A struct containing information about an attempted VM deletion request. Reports // information in the event of a partial failure so billing can still be udpated // appropriately. Vms VmDeleteResponse `json:"vms,required"` FsError string `json:"fs_error,nullable"` JSON apiClusterDeleteResponseDataJSON `json:"-"` }
A struct containing information about an attempted cluster deletion request. Reports information in the event of a partial failure so billing can still be udpated appropriately.
func (*APIClusterDeleteResponseData) UnmarshalJSON ¶
func (r *APIClusterDeleteResponseData) UnmarshalJSON(data []byte) (err error)
type APIClusterDeleteResponseOperationCode ¶
type APIClusterDeleteResponseOperationCode string
const ( APIClusterDeleteResponseOperationCodeListClusters APIClusterDeleteResponseOperationCode = "list_clusters" APIClusterDeleteResponseOperationCodeGetCluster APIClusterDeleteResponseOperationCode = "get_cluster" APIClusterDeleteResponseOperationCodeCreateCluster APIClusterDeleteResponseOperationCode = "create_cluster" APIClusterDeleteResponseOperationCodeDeleteCluster APIClusterDeleteResponseOperationCode = "delete_cluster" APIClusterDeleteResponseOperationCodeUpdateCluster APIClusterDeleteResponseOperationCode = "update_cluster" APIClusterDeleteResponseOperationCodeGetClusterSSHKey APIClusterDeleteResponseOperationCode = "get_cluster_ssh_key" APIClusterDeleteResponseOperationCodeListVms APIClusterDeleteResponseOperationCode = "list_vms" APIClusterDeleteResponseOperationCodeGetVm APIClusterDeleteResponseOperationCode = "get_vm" APIClusterDeleteResponseOperationCodeUpdateVm APIClusterDeleteResponseOperationCode = "update_vm" APIClusterDeleteResponseOperationCodeBranchVm APIClusterDeleteResponseOperationCode = "branch_vm" APIClusterDeleteResponseOperationCodeCommitVm APIClusterDeleteResponseOperationCode = "commit_vm" APIClusterDeleteResponseOperationCodeDeleteVm APIClusterDeleteResponseOperationCode = "delete_vm" APIClusterDeleteResponseOperationCodeGetVmSSHKey APIClusterDeleteResponseOperationCode = "get_vm_ssh_key" APIClusterDeleteResponseOperationCodeUploadRootfs APIClusterDeleteResponseOperationCode = "upload_rootfs" APIClusterDeleteResponseOperationCodeDeleteRootfs APIClusterDeleteResponseOperationCode = "delete_rootfs" APIClusterDeleteResponseOperationCodeListRootfs APIClusterDeleteResponseOperationCode = "list_rootfs" )
func (APIClusterDeleteResponseOperationCode) IsKnown ¶
func (r APIClusterDeleteResponseOperationCode) IsKnown() bool
type APIClusterGetResponse ¶
type APIClusterGetResponse struct { Data APIClusterGetResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIClusterGetResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiClusterGetResponseJSON `json:"-"` }
func (*APIClusterGetResponse) UnmarshalJSON ¶
func (r *APIClusterGetResponse) UnmarshalJSON(data []byte) (err error)
type APIClusterGetResponseData ¶
type APIClusterGetResponseData struct { // The cluster's ID. ID string `json:"id,required"` // The size of the cluster's backing file FsSizeMib int64 `json:"fs_size_mib,required"` // The ID of the cluster's root VM. RootVmID string `json:"root_vm_id,required"` // How many VMs are currently running on this cluster. VmCount int64 `json:"vm_count,required"` // The VMs that are children of the cluster, including the root VM. Vms []VmDto `json:"vms,required"` // Human-readable name assigned to the cluster. Alias string `json:"alias,nullable"` JSON apiClusterGetResponseDataJSON `json:"-"` }
func (*APIClusterGetResponseData) UnmarshalJSON ¶
func (r *APIClusterGetResponseData) UnmarshalJSON(data []byte) (err error)
type APIClusterGetResponseOperationCode ¶
type APIClusterGetResponseOperationCode string
const ( APIClusterGetResponseOperationCodeListClusters APIClusterGetResponseOperationCode = "list_clusters" APIClusterGetResponseOperationCodeGetCluster APIClusterGetResponseOperationCode = "get_cluster" APIClusterGetResponseOperationCodeCreateCluster APIClusterGetResponseOperationCode = "create_cluster" APIClusterGetResponseOperationCodeDeleteCluster APIClusterGetResponseOperationCode = "delete_cluster" APIClusterGetResponseOperationCodeUpdateCluster APIClusterGetResponseOperationCode = "update_cluster" APIClusterGetResponseOperationCodeGetClusterSSHKey APIClusterGetResponseOperationCode = "get_cluster_ssh_key" APIClusterGetResponseOperationCodeListVms APIClusterGetResponseOperationCode = "list_vms" APIClusterGetResponseOperationCodeGetVm APIClusterGetResponseOperationCode = "get_vm" APIClusterGetResponseOperationCodeUpdateVm APIClusterGetResponseOperationCode = "update_vm" APIClusterGetResponseOperationCodeBranchVm APIClusterGetResponseOperationCode = "branch_vm" APIClusterGetResponseOperationCodeCommitVm APIClusterGetResponseOperationCode = "commit_vm" APIClusterGetResponseOperationCodeDeleteVm APIClusterGetResponseOperationCode = "delete_vm" APIClusterGetResponseOperationCodeGetVmSSHKey APIClusterGetResponseOperationCode = "get_vm_ssh_key" APIClusterGetResponseOperationCodeUploadRootfs APIClusterGetResponseOperationCode = "upload_rootfs" APIClusterGetResponseOperationCodeDeleteRootfs APIClusterGetResponseOperationCode = "delete_rootfs" APIClusterGetResponseOperationCodeListRootfs APIClusterGetResponseOperationCode = "list_rootfs" )
func (APIClusterGetResponseOperationCode) IsKnown ¶
func (r APIClusterGetResponseOperationCode) IsKnown() bool
type APIClusterGetSSHKeyResponse ¶
type APIClusterGetSSHKeyResponse struct { Data string `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIClusterGetSSHKeyResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiClusterGetSSHKeyResponseJSON `json:"-"` }
func (*APIClusterGetSSHKeyResponse) UnmarshalJSON ¶
func (r *APIClusterGetSSHKeyResponse) UnmarshalJSON(data []byte) (err error)
type APIClusterGetSSHKeyResponseOperationCode ¶
type APIClusterGetSSHKeyResponseOperationCode string
const ( APIClusterGetSSHKeyResponseOperationCodeListClusters APIClusterGetSSHKeyResponseOperationCode = "list_clusters" APIClusterGetSSHKeyResponseOperationCodeGetCluster APIClusterGetSSHKeyResponseOperationCode = "get_cluster" APIClusterGetSSHKeyResponseOperationCodeCreateCluster APIClusterGetSSHKeyResponseOperationCode = "create_cluster" APIClusterGetSSHKeyResponseOperationCodeDeleteCluster APIClusterGetSSHKeyResponseOperationCode = "delete_cluster" APIClusterGetSSHKeyResponseOperationCodeUpdateCluster APIClusterGetSSHKeyResponseOperationCode = "update_cluster" APIClusterGetSSHKeyResponseOperationCodeGetClusterSSHKey APIClusterGetSSHKeyResponseOperationCode = "get_cluster_ssh_key" APIClusterGetSSHKeyResponseOperationCodeListVms APIClusterGetSSHKeyResponseOperationCode = "list_vms" APIClusterGetSSHKeyResponseOperationCodeGetVm APIClusterGetSSHKeyResponseOperationCode = "get_vm" APIClusterGetSSHKeyResponseOperationCodeUpdateVm APIClusterGetSSHKeyResponseOperationCode = "update_vm" APIClusterGetSSHKeyResponseOperationCodeBranchVm APIClusterGetSSHKeyResponseOperationCode = "branch_vm" APIClusterGetSSHKeyResponseOperationCodeCommitVm APIClusterGetSSHKeyResponseOperationCode = "commit_vm" APIClusterGetSSHKeyResponseOperationCodeDeleteVm APIClusterGetSSHKeyResponseOperationCode = "delete_vm" APIClusterGetSSHKeyResponseOperationCodeGetVmSSHKey APIClusterGetSSHKeyResponseOperationCode = "get_vm_ssh_key" APIClusterGetSSHKeyResponseOperationCodeUploadRootfs APIClusterGetSSHKeyResponseOperationCode = "upload_rootfs" APIClusterGetSSHKeyResponseOperationCodeDeleteRootfs APIClusterGetSSHKeyResponseOperationCode = "delete_rootfs" APIClusterGetSSHKeyResponseOperationCodeListRootfs APIClusterGetSSHKeyResponseOperationCode = "list_rootfs" )
func (APIClusterGetSSHKeyResponseOperationCode) IsKnown ¶
func (r APIClusterGetSSHKeyResponseOperationCode) IsKnown() bool
type APIClusterListResponse ¶
type APIClusterListResponse struct { Data []APIClusterListResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIClusterListResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiClusterListResponseJSON `json:"-"` }
func (*APIClusterListResponse) UnmarshalJSON ¶
func (r *APIClusterListResponse) UnmarshalJSON(data []byte) (err error)
type APIClusterListResponseData ¶
type APIClusterListResponseData struct { // The cluster's ID. ID string `json:"id,required"` // The size of the cluster's backing file FsSizeMib int64 `json:"fs_size_mib,required"` // The ID of the cluster's root VM. RootVmID string `json:"root_vm_id,required"` // How many VMs are currently running on this cluster. VmCount int64 `json:"vm_count,required"` // The VMs that are children of the cluster, including the root VM. Vms []VmDto `json:"vms,required"` // Human-readable name assigned to the cluster. Alias string `json:"alias,nullable"` JSON apiClusterListResponseDataJSON `json:"-"` }
func (*APIClusterListResponseData) UnmarshalJSON ¶
func (r *APIClusterListResponseData) UnmarshalJSON(data []byte) (err error)
type APIClusterListResponseOperationCode ¶
type APIClusterListResponseOperationCode string
const ( APIClusterListResponseOperationCodeListClusters APIClusterListResponseOperationCode = "list_clusters" APIClusterListResponseOperationCodeGetCluster APIClusterListResponseOperationCode = "get_cluster" APIClusterListResponseOperationCodeCreateCluster APIClusterListResponseOperationCode = "create_cluster" APIClusterListResponseOperationCodeDeleteCluster APIClusterListResponseOperationCode = "delete_cluster" APIClusterListResponseOperationCodeUpdateCluster APIClusterListResponseOperationCode = "update_cluster" APIClusterListResponseOperationCodeGetClusterSSHKey APIClusterListResponseOperationCode = "get_cluster_ssh_key" APIClusterListResponseOperationCodeListVms APIClusterListResponseOperationCode = "list_vms" APIClusterListResponseOperationCodeGetVm APIClusterListResponseOperationCode = "get_vm" APIClusterListResponseOperationCodeUpdateVm APIClusterListResponseOperationCode = "update_vm" APIClusterListResponseOperationCodeBranchVm APIClusterListResponseOperationCode = "branch_vm" APIClusterListResponseOperationCodeCommitVm APIClusterListResponseOperationCode = "commit_vm" APIClusterListResponseOperationCodeDeleteVm APIClusterListResponseOperationCode = "delete_vm" APIClusterListResponseOperationCodeGetVmSSHKey APIClusterListResponseOperationCode = "get_vm_ssh_key" APIClusterListResponseOperationCodeUploadRootfs APIClusterListResponseOperationCode = "upload_rootfs" APIClusterListResponseOperationCodeDeleteRootfs APIClusterListResponseOperationCode = "delete_rootfs" APIClusterListResponseOperationCodeListRootfs APIClusterListResponseOperationCode = "list_rootfs" )
func (APIClusterListResponseOperationCode) IsKnown ¶
func (r APIClusterListResponseOperationCode) IsKnown() bool
type APIClusterNewParams ¶
type APIClusterNewParams struct {
ClusterCreateRequest ClusterCreateRequestUnionParam `json:"cluster_create_request,required"`
}
func (APIClusterNewParams) MarshalJSON ¶
func (r APIClusterNewParams) MarshalJSON() (data []byte, err error)
type APIClusterNewResponse ¶
type APIClusterNewResponse struct { Data APIClusterNewResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIClusterNewResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiClusterNewResponseJSON `json:"-"` }
func (*APIClusterNewResponse) UnmarshalJSON ¶
func (r *APIClusterNewResponse) UnmarshalJSON(data []byte) (err error)
type APIClusterNewResponseData ¶
type APIClusterNewResponseData struct { // The cluster's ID. ID string `json:"id,required"` // The size of the cluster's backing file FsSizeMib int64 `json:"fs_size_mib,required"` // The ID of the cluster's root VM. RootVmID string `json:"root_vm_id,required"` // How many VMs are currently running on this cluster. VmCount int64 `json:"vm_count,required"` // The VMs that are children of the cluster, including the root VM. Vms []VmDto `json:"vms,required"` // Human-readable name assigned to the cluster. Alias string `json:"alias,nullable"` JSON apiClusterNewResponseDataJSON `json:"-"` }
func (*APIClusterNewResponseData) UnmarshalJSON ¶
func (r *APIClusterNewResponseData) UnmarshalJSON(data []byte) (err error)
type APIClusterNewResponseOperationCode ¶
type APIClusterNewResponseOperationCode string
const ( APIClusterNewResponseOperationCodeListClusters APIClusterNewResponseOperationCode = "list_clusters" APIClusterNewResponseOperationCodeGetCluster APIClusterNewResponseOperationCode = "get_cluster" APIClusterNewResponseOperationCodeCreateCluster APIClusterNewResponseOperationCode = "create_cluster" APIClusterNewResponseOperationCodeDeleteCluster APIClusterNewResponseOperationCode = "delete_cluster" APIClusterNewResponseOperationCodeUpdateCluster APIClusterNewResponseOperationCode = "update_cluster" APIClusterNewResponseOperationCodeGetClusterSSHKey APIClusterNewResponseOperationCode = "get_cluster_ssh_key" APIClusterNewResponseOperationCodeListVms APIClusterNewResponseOperationCode = "list_vms" APIClusterNewResponseOperationCodeGetVm APIClusterNewResponseOperationCode = "get_vm" APIClusterNewResponseOperationCodeUpdateVm APIClusterNewResponseOperationCode = "update_vm" APIClusterNewResponseOperationCodeBranchVm APIClusterNewResponseOperationCode = "branch_vm" APIClusterNewResponseOperationCodeCommitVm APIClusterNewResponseOperationCode = "commit_vm" APIClusterNewResponseOperationCodeDeleteVm APIClusterNewResponseOperationCode = "delete_vm" APIClusterNewResponseOperationCodeGetVmSSHKey APIClusterNewResponseOperationCode = "get_vm_ssh_key" APIClusterNewResponseOperationCodeUploadRootfs APIClusterNewResponseOperationCode = "upload_rootfs" APIClusterNewResponseOperationCodeDeleteRootfs APIClusterNewResponseOperationCode = "delete_rootfs" APIClusterNewResponseOperationCodeListRootfs APIClusterNewResponseOperationCode = "list_rootfs" )
func (APIClusterNewResponseOperationCode) IsKnown ¶
func (r APIClusterNewResponseOperationCode) IsKnown() bool
type APIClusterService ¶
type APIClusterService struct {
Options []option.RequestOption
}
APIClusterService contains methods and other services that help with interacting with the vers API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPIClusterService method instead.
func NewAPIClusterService ¶
func NewAPIClusterService(opts ...option.RequestOption) (r *APIClusterService)
NewAPIClusterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*APIClusterService) Delete ¶
func (r *APIClusterService) Delete(ctx context.Context, clusterIDOrAlias string, opts ...option.RequestOption) (res *APIClusterDeleteResponse, err error)
Delete a cluster.
func (*APIClusterService) Get ¶
func (r *APIClusterService) Get(ctx context.Context, clusterIDOrAlias string, opts ...option.RequestOption) (res *APIClusterGetResponse, err error)
Retrieve information on a particular cluster.
func (*APIClusterService) GetSSHKey ¶
func (r *APIClusterService) GetSSHKey(ctx context.Context, clusterIDOrAlias string, opts ...option.RequestOption) (res *APIClusterGetSSHKeyResponse, err error)
Get the SSH private key for VM access
func (*APIClusterService) List ¶
func (r *APIClusterService) List(ctx context.Context, opts ...option.RequestOption) (res *APIClusterListResponse, err error)
List all clusters.
func (*APIClusterService) New ¶
func (r *APIClusterService) New(ctx context.Context, body APIClusterNewParams, opts ...option.RequestOption) (res *APIClusterNewResponse, err error)
Create a new cluster.
func (*APIClusterService) Update ¶
func (r *APIClusterService) Update(ctx context.Context, clusterIDOrAlias string, body APIClusterUpdateParams, opts ...option.RequestOption) (res *APIClusterUpdateResponse, err error)
Update a cluster's configuration
type APIClusterUpdateParams ¶
type APIClusterUpdateParams struct {
ClusterPatchRequest ClusterPatchRequestParam `json:"cluster_patch_request,required"`
}
func (APIClusterUpdateParams) MarshalJSON ¶
func (r APIClusterUpdateParams) MarshalJSON() (data []byte, err error)
type APIClusterUpdateResponse ¶
type APIClusterUpdateResponse struct { Data APIClusterUpdateResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIClusterUpdateResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiClusterUpdateResponseJSON `json:"-"` }
func (*APIClusterUpdateResponse) UnmarshalJSON ¶
func (r *APIClusterUpdateResponse) UnmarshalJSON(data []byte) (err error)
type APIClusterUpdateResponseData ¶
type APIClusterUpdateResponseData struct { // The cluster's ID. ID string `json:"id,required"` // The size of the cluster's backing file FsSizeMib int64 `json:"fs_size_mib,required"` // The ID of the cluster's root VM. RootVmID string `json:"root_vm_id,required"` // How many VMs are currently running on this cluster. VmCount int64 `json:"vm_count,required"` // The VMs that are children of the cluster, including the root VM. Vms []VmDto `json:"vms,required"` // Human-readable name assigned to the cluster. Alias string `json:"alias,nullable"` JSON apiClusterUpdateResponseDataJSON `json:"-"` }
func (*APIClusterUpdateResponseData) UnmarshalJSON ¶
func (r *APIClusterUpdateResponseData) UnmarshalJSON(data []byte) (err error)
type APIClusterUpdateResponseOperationCode ¶
type APIClusterUpdateResponseOperationCode string
const ( APIClusterUpdateResponseOperationCodeListClusters APIClusterUpdateResponseOperationCode = "list_clusters" APIClusterUpdateResponseOperationCodeGetCluster APIClusterUpdateResponseOperationCode = "get_cluster" APIClusterUpdateResponseOperationCodeCreateCluster APIClusterUpdateResponseOperationCode = "create_cluster" APIClusterUpdateResponseOperationCodeDeleteCluster APIClusterUpdateResponseOperationCode = "delete_cluster" APIClusterUpdateResponseOperationCodeUpdateCluster APIClusterUpdateResponseOperationCode = "update_cluster" APIClusterUpdateResponseOperationCodeGetClusterSSHKey APIClusterUpdateResponseOperationCode = "get_cluster_ssh_key" APIClusterUpdateResponseOperationCodeListVms APIClusterUpdateResponseOperationCode = "list_vms" APIClusterUpdateResponseOperationCodeGetVm APIClusterUpdateResponseOperationCode = "get_vm" APIClusterUpdateResponseOperationCodeUpdateVm APIClusterUpdateResponseOperationCode = "update_vm" APIClusterUpdateResponseOperationCodeBranchVm APIClusterUpdateResponseOperationCode = "branch_vm" APIClusterUpdateResponseOperationCodeCommitVm APIClusterUpdateResponseOperationCode = "commit_vm" APIClusterUpdateResponseOperationCodeDeleteVm APIClusterUpdateResponseOperationCode = "delete_vm" APIClusterUpdateResponseOperationCodeGetVmSSHKey APIClusterUpdateResponseOperationCode = "get_vm_ssh_key" APIClusterUpdateResponseOperationCodeUploadRootfs APIClusterUpdateResponseOperationCode = "upload_rootfs" APIClusterUpdateResponseOperationCodeDeleteRootfs APIClusterUpdateResponseOperationCode = "delete_rootfs" APIClusterUpdateResponseOperationCodeListRootfs APIClusterUpdateResponseOperationCode = "list_rootfs" )
func (APIClusterUpdateResponseOperationCode) IsKnown ¶
func (r APIClusterUpdateResponseOperationCode) IsKnown() bool
type APIHealthService ¶
type APIHealthService struct {
Options []option.RequestOption
}
APIHealthService contains methods and other services that help with interacting with the vers API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPIHealthService method instead.
func NewAPIHealthService ¶
func NewAPIHealthService(opts ...option.RequestOption) (r *APIHealthService)
NewAPIHealthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*APIHealthService) Check ¶
func (r *APIHealthService) Check(ctx context.Context, opts ...option.RequestOption) (res *string, err error)
Get health of the API.
type APIRootfDeleteResponse ¶
type APIRootfDeleteResponse struct { Data APIRootfDeleteResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIRootfDeleteResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiRootfDeleteResponseJSON `json:"-"` }
func (*APIRootfDeleteResponse) UnmarshalJSON ¶
func (r *APIRootfDeleteResponse) UnmarshalJSON(data []byte) (err error)
type APIRootfDeleteResponseData ¶
type APIRootfDeleteResponseData struct { RootfsName string `json:"rootfs_name,required"` JSON apiRootfDeleteResponseDataJSON `json:"-"` }
func (*APIRootfDeleteResponseData) UnmarshalJSON ¶
func (r *APIRootfDeleteResponseData) UnmarshalJSON(data []byte) (err error)
type APIRootfDeleteResponseOperationCode ¶
type APIRootfDeleteResponseOperationCode string
const ( APIRootfDeleteResponseOperationCodeListClusters APIRootfDeleteResponseOperationCode = "list_clusters" APIRootfDeleteResponseOperationCodeGetCluster APIRootfDeleteResponseOperationCode = "get_cluster" APIRootfDeleteResponseOperationCodeCreateCluster APIRootfDeleteResponseOperationCode = "create_cluster" APIRootfDeleteResponseOperationCodeDeleteCluster APIRootfDeleteResponseOperationCode = "delete_cluster" APIRootfDeleteResponseOperationCodeUpdateCluster APIRootfDeleteResponseOperationCode = "update_cluster" APIRootfDeleteResponseOperationCodeGetClusterSSHKey APIRootfDeleteResponseOperationCode = "get_cluster_ssh_key" APIRootfDeleteResponseOperationCodeListVms APIRootfDeleteResponseOperationCode = "list_vms" APIRootfDeleteResponseOperationCodeGetVm APIRootfDeleteResponseOperationCode = "get_vm" APIRootfDeleteResponseOperationCodeUpdateVm APIRootfDeleteResponseOperationCode = "update_vm" APIRootfDeleteResponseOperationCodeBranchVm APIRootfDeleteResponseOperationCode = "branch_vm" APIRootfDeleteResponseOperationCodeCommitVm APIRootfDeleteResponseOperationCode = "commit_vm" APIRootfDeleteResponseOperationCodeDeleteVm APIRootfDeleteResponseOperationCode = "delete_vm" APIRootfDeleteResponseOperationCodeGetVmSSHKey APIRootfDeleteResponseOperationCode = "get_vm_ssh_key" APIRootfDeleteResponseOperationCodeUploadRootfs APIRootfDeleteResponseOperationCode = "upload_rootfs" APIRootfDeleteResponseOperationCodeDeleteRootfs APIRootfDeleteResponseOperationCode = "delete_rootfs" APIRootfDeleteResponseOperationCodeListRootfs APIRootfDeleteResponseOperationCode = "list_rootfs" )
func (APIRootfDeleteResponseOperationCode) IsKnown ¶
func (r APIRootfDeleteResponseOperationCode) IsKnown() bool
type APIRootfListResponse ¶
type APIRootfListResponse struct { Data APIRootfListResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIRootfListResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiRootfListResponseJSON `json:"-"` }
func (*APIRootfListResponse) UnmarshalJSON ¶
func (r *APIRootfListResponse) UnmarshalJSON(data []byte) (err error)
type APIRootfListResponseData ¶
type APIRootfListResponseData struct { RootfsNames []string `json:"rootfs_names,required"` JSON apiRootfListResponseDataJSON `json:"-"` }
func (*APIRootfListResponseData) UnmarshalJSON ¶
func (r *APIRootfListResponseData) UnmarshalJSON(data []byte) (err error)
type APIRootfListResponseOperationCode ¶
type APIRootfListResponseOperationCode string
const ( APIRootfListResponseOperationCodeListClusters APIRootfListResponseOperationCode = "list_clusters" APIRootfListResponseOperationCodeGetCluster APIRootfListResponseOperationCode = "get_cluster" APIRootfListResponseOperationCodeCreateCluster APIRootfListResponseOperationCode = "create_cluster" APIRootfListResponseOperationCodeDeleteCluster APIRootfListResponseOperationCode = "delete_cluster" APIRootfListResponseOperationCodeUpdateCluster APIRootfListResponseOperationCode = "update_cluster" APIRootfListResponseOperationCodeGetClusterSSHKey APIRootfListResponseOperationCode = "get_cluster_ssh_key" APIRootfListResponseOperationCodeListVms APIRootfListResponseOperationCode = "list_vms" APIRootfListResponseOperationCodeGetVm APIRootfListResponseOperationCode = "get_vm" APIRootfListResponseOperationCodeUpdateVm APIRootfListResponseOperationCode = "update_vm" APIRootfListResponseOperationCodeBranchVm APIRootfListResponseOperationCode = "branch_vm" APIRootfListResponseOperationCodeCommitVm APIRootfListResponseOperationCode = "commit_vm" APIRootfListResponseOperationCodeDeleteVm APIRootfListResponseOperationCode = "delete_vm" APIRootfListResponseOperationCodeGetVmSSHKey APIRootfListResponseOperationCode = "get_vm_ssh_key" APIRootfListResponseOperationCodeUploadRootfs APIRootfListResponseOperationCode = "upload_rootfs" APIRootfListResponseOperationCodeDeleteRootfs APIRootfListResponseOperationCode = "delete_rootfs" APIRootfListResponseOperationCodeListRootfs APIRootfListResponseOperationCode = "list_rootfs" )
func (APIRootfListResponseOperationCode) IsKnown ¶
func (r APIRootfListResponseOperationCode) IsKnown() bool
type APIRootfService ¶
type APIRootfService struct {
Options []option.RequestOption
}
APIRootfService contains methods and other services that help with interacting with the vers API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPIRootfService method instead.
func NewAPIRootfService ¶
func NewAPIRootfService(opts ...option.RequestOption) (r *APIRootfService)
NewAPIRootfService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*APIRootfService) Delete ¶
func (r *APIRootfService) Delete(ctx context.Context, rootfsID string, opts ...option.RequestOption) (res *APIRootfDeleteResponse, err error)
Delete an existing rootfs from the server.
func (*APIRootfService) List ¶
func (r *APIRootfService) List(ctx context.Context, opts ...option.RequestOption) (res *APIRootfListResponse, err error)
List all available rootfs names on the server.
func (*APIRootfService) Upload ¶
func (r *APIRootfService) Upload(ctx context.Context, rootfsID string, body APIRootfUploadParams, opts ...option.RequestOption) (res *APIRootfUploadResponse, err error)
Upload a rootfs tar archive to the server. The archive should contain the Dockerfile and all necessary dependencies.
type APIRootfUploadParams ¶
type APIRootfUploadParams struct { // The path of the Dockerfile contained within the tar archive Dockerfile param.Field[string] `query:"dockerfile"` }
func (APIRootfUploadParams) URLQuery ¶
func (r APIRootfUploadParams) URLQuery() (v url.Values)
URLQuery serializes APIRootfUploadParams's query parameters as `url.Values`.
type APIRootfUploadResponse ¶
type APIRootfUploadResponse struct { Data APIRootfUploadResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIRootfUploadResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiRootfUploadResponseJSON `json:"-"` }
func (*APIRootfUploadResponse) UnmarshalJSON ¶
func (r *APIRootfUploadResponse) UnmarshalJSON(data []byte) (err error)
type APIRootfUploadResponseData ¶
type APIRootfUploadResponseData struct { RootfsName string `json:"rootfs_name,required"` JSON apiRootfUploadResponseDataJSON `json:"-"` }
func (*APIRootfUploadResponseData) UnmarshalJSON ¶
func (r *APIRootfUploadResponseData) UnmarshalJSON(data []byte) (err error)
type APIRootfUploadResponseOperationCode ¶
type APIRootfUploadResponseOperationCode string
const ( APIRootfUploadResponseOperationCodeListClusters APIRootfUploadResponseOperationCode = "list_clusters" APIRootfUploadResponseOperationCodeGetCluster APIRootfUploadResponseOperationCode = "get_cluster" APIRootfUploadResponseOperationCodeCreateCluster APIRootfUploadResponseOperationCode = "create_cluster" APIRootfUploadResponseOperationCodeDeleteCluster APIRootfUploadResponseOperationCode = "delete_cluster" APIRootfUploadResponseOperationCodeUpdateCluster APIRootfUploadResponseOperationCode = "update_cluster" APIRootfUploadResponseOperationCodeGetClusterSSHKey APIRootfUploadResponseOperationCode = "get_cluster_ssh_key" APIRootfUploadResponseOperationCodeListVms APIRootfUploadResponseOperationCode = "list_vms" APIRootfUploadResponseOperationCodeGetVm APIRootfUploadResponseOperationCode = "get_vm" APIRootfUploadResponseOperationCodeUpdateVm APIRootfUploadResponseOperationCode = "update_vm" APIRootfUploadResponseOperationCodeBranchVm APIRootfUploadResponseOperationCode = "branch_vm" APIRootfUploadResponseOperationCodeCommitVm APIRootfUploadResponseOperationCode = "commit_vm" APIRootfUploadResponseOperationCodeDeleteVm APIRootfUploadResponseOperationCode = "delete_vm" APIRootfUploadResponseOperationCodeGetVmSSHKey APIRootfUploadResponseOperationCode = "get_vm_ssh_key" APIRootfUploadResponseOperationCodeUploadRootfs APIRootfUploadResponseOperationCode = "upload_rootfs" APIRootfUploadResponseOperationCodeDeleteRootfs APIRootfUploadResponseOperationCode = "delete_rootfs" APIRootfUploadResponseOperationCodeListRootfs APIRootfUploadResponseOperationCode = "list_rootfs" )
func (APIRootfUploadResponseOperationCode) IsKnown ¶
func (r APIRootfUploadResponseOperationCode) IsKnown() bool
type APIService ¶
type APIService struct { Options []option.RequestOption Cluster *APIClusterService Vm *APIVmService Rootfs *APIRootfService Health *APIHealthService Telemetry *APITelemetryService }
APIService contains methods and other services that help with interacting with the vers API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPIService method instead.
func NewAPIService ¶
func NewAPIService(opts ...option.RequestOption) (r *APIService)
NewAPIService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type APITelemetryService ¶
type APITelemetryService struct {
Options []option.RequestOption
}
APITelemetryService contains methods and other services that help with interacting with the vers API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPITelemetryService method instead.
func NewAPITelemetryService ¶
func NewAPITelemetryService(opts ...option.RequestOption) (r *APITelemetryService)
NewAPITelemetryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*APITelemetryService) GetInfo ¶
func (r *APITelemetryService) GetInfo(ctx context.Context, opts ...option.RequestOption) (res *TelemetryDto, err error)
Get telemetry information
type APIVmBranchParams ¶
type APIVmBranchParams struct {
VmBranchRequest VmBranchRequestParam `json:"vm_branch_request,required"`
}
func (APIVmBranchParams) MarshalJSON ¶
func (r APIVmBranchParams) MarshalJSON() (data []byte, err error)
type APIVmBranchResponse ¶
type APIVmBranchResponse struct { Data APIVmBranchResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmBranchResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmBranchResponseJSON `json:"-"` }
func (*APIVmBranchResponse) UnmarshalJSON ¶
func (r *APIVmBranchResponse) UnmarshalJSON(data []byte) (err error)
type APIVmBranchResponseData ¶
type APIVmBranchResponseData struct { // The ID of the VM. ID string `json:"id,required"` // The IDs of direct children branched from this VM. Children []string `json:"children,required"` // The VM's cluster ID ClusterID string `json:"cluster_id,required"` // What is the size of the "disk" allocated to this VM FsSizeMib int64 `json:"fs_size_mib,required"` // The VM's local IP address on the VM subnet IPAddress string `json:"ip_address,required"` // How much RAM is allocated to this VM MemSizeMib int64 `json:"mem_size_mib,required"` // The VM's network configuration NetworkInfo APIVmBranchResponseDataNetworkInfo `json:"network_info,required"` // Whether the VM is running, paused, or not started. State APIVmBranchResponseDataState `json:"state,required"` // How many vCPUs were allocated to this VM VcpuCount int64 `json:"vcpu_count,required"` // Human-readable name assigned to the VM. Alias string `json:"alias,nullable"` // The parent VM's ID, if present. If None, then this VM is a root VM. ParentID string `json:"parent_id,nullable"` JSON apiVmBranchResponseDataJSON `json:"-"` }
func (*APIVmBranchResponseData) UnmarshalJSON ¶
func (r *APIVmBranchResponseData) UnmarshalJSON(data []byte) (err error)
type APIVmBranchResponseDataNetworkInfo ¶
type APIVmBranchResponseDataNetworkInfo struct { GuestIP string `json:"guest_ip,required"` GuestMac string `json:"guest_mac,required"` SSHPort int64 `json:"ssh_port,required"` Tap0IP string `json:"tap0_ip,required"` Tap0Name string `json:"tap0_name,required"` VmNamespace string `json:"vm_namespace,required"` JSON apiVmBranchResponseDataNetworkInfoJSON `json:"-"` }
The VM's network configuration
func (*APIVmBranchResponseDataNetworkInfo) UnmarshalJSON ¶
func (r *APIVmBranchResponseDataNetworkInfo) UnmarshalJSON(data []byte) (err error)
type APIVmBranchResponseDataState ¶
type APIVmBranchResponseDataState string
Whether the VM is running, paused, or not started.
const ( APIVmBranchResponseDataStateNotStarted APIVmBranchResponseDataState = "Not started" APIVmBranchResponseDataStateRunning APIVmBranchResponseDataState = "Running" APIVmBranchResponseDataStatePaused APIVmBranchResponseDataState = "Paused" )
func (APIVmBranchResponseDataState) IsKnown ¶
func (r APIVmBranchResponseDataState) IsKnown() bool
type APIVmBranchResponseOperationCode ¶
type APIVmBranchResponseOperationCode string
const ( APIVmBranchResponseOperationCodeListClusters APIVmBranchResponseOperationCode = "list_clusters" APIVmBranchResponseOperationCodeGetCluster APIVmBranchResponseOperationCode = "get_cluster" APIVmBranchResponseOperationCodeCreateCluster APIVmBranchResponseOperationCode = "create_cluster" APIVmBranchResponseOperationCodeDeleteCluster APIVmBranchResponseOperationCode = "delete_cluster" APIVmBranchResponseOperationCodeUpdateCluster APIVmBranchResponseOperationCode = "update_cluster" APIVmBranchResponseOperationCodeGetClusterSSHKey APIVmBranchResponseOperationCode = "get_cluster_ssh_key" APIVmBranchResponseOperationCodeListVms APIVmBranchResponseOperationCode = "list_vms" APIVmBranchResponseOperationCodeGetVm APIVmBranchResponseOperationCode = "get_vm" APIVmBranchResponseOperationCodeUpdateVm APIVmBranchResponseOperationCode = "update_vm" APIVmBranchResponseOperationCodeBranchVm APIVmBranchResponseOperationCode = "branch_vm" APIVmBranchResponseOperationCodeCommitVm APIVmBranchResponseOperationCode = "commit_vm" APIVmBranchResponseOperationCodeDeleteVm APIVmBranchResponseOperationCode = "delete_vm" APIVmBranchResponseOperationCodeGetVmSSHKey APIVmBranchResponseOperationCode = "get_vm_ssh_key" APIVmBranchResponseOperationCodeUploadRootfs APIVmBranchResponseOperationCode = "upload_rootfs" APIVmBranchResponseOperationCodeDeleteRootfs APIVmBranchResponseOperationCode = "delete_rootfs" APIVmBranchResponseOperationCodeListRootfs APIVmBranchResponseOperationCode = "list_rootfs" )
func (APIVmBranchResponseOperationCode) IsKnown ¶
func (r APIVmBranchResponseOperationCode) IsKnown() bool
type APIVmCommitParams ¶
type APIVmCommitParams struct {
VmCommitRequest VmCommitRequestParam `json:"vm_commit_request,required"`
}
func (APIVmCommitParams) MarshalJSON ¶
func (r APIVmCommitParams) MarshalJSON() (data []byte, err error)
type APIVmCommitResponse ¶
type APIVmCommitResponse struct { Data APIVmCommitResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmCommitResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmCommitResponseJSON `json:"-"` }
func (*APIVmCommitResponse) UnmarshalJSON ¶
func (r *APIVmCommitResponse) UnmarshalJSON(data []byte) (err error)
type APIVmCommitResponseData ¶
type APIVmCommitResponseData struct { ClusterID string `json:"cluster_id,required"` CommitID string `json:"commit_id,required"` HostArchitecture string `json:"host_architecture,required"` JSON apiVmCommitResponseDataJSON `json:"-"` }
func (*APIVmCommitResponseData) UnmarshalJSON ¶
func (r *APIVmCommitResponseData) UnmarshalJSON(data []byte) (err error)
type APIVmCommitResponseOperationCode ¶
type APIVmCommitResponseOperationCode string
const ( APIVmCommitResponseOperationCodeListClusters APIVmCommitResponseOperationCode = "list_clusters" APIVmCommitResponseOperationCodeGetCluster APIVmCommitResponseOperationCode = "get_cluster" APIVmCommitResponseOperationCodeCreateCluster APIVmCommitResponseOperationCode = "create_cluster" APIVmCommitResponseOperationCodeDeleteCluster APIVmCommitResponseOperationCode = "delete_cluster" APIVmCommitResponseOperationCodeUpdateCluster APIVmCommitResponseOperationCode = "update_cluster" APIVmCommitResponseOperationCodeGetClusterSSHKey APIVmCommitResponseOperationCode = "get_cluster_ssh_key" APIVmCommitResponseOperationCodeListVms APIVmCommitResponseOperationCode = "list_vms" APIVmCommitResponseOperationCodeGetVm APIVmCommitResponseOperationCode = "get_vm" APIVmCommitResponseOperationCodeUpdateVm APIVmCommitResponseOperationCode = "update_vm" APIVmCommitResponseOperationCodeBranchVm APIVmCommitResponseOperationCode = "branch_vm" APIVmCommitResponseOperationCodeCommitVm APIVmCommitResponseOperationCode = "commit_vm" APIVmCommitResponseOperationCodeDeleteVm APIVmCommitResponseOperationCode = "delete_vm" APIVmCommitResponseOperationCodeGetVmSSHKey APIVmCommitResponseOperationCode = "get_vm_ssh_key" APIVmCommitResponseOperationCodeUploadRootfs APIVmCommitResponseOperationCode = "upload_rootfs" APIVmCommitResponseOperationCodeDeleteRootfs APIVmCommitResponseOperationCode = "delete_rootfs" APIVmCommitResponseOperationCodeListRootfs APIVmCommitResponseOperationCode = "list_rootfs" )
func (APIVmCommitResponseOperationCode) IsKnown ¶
func (r APIVmCommitResponseOperationCode) IsKnown() bool
type APIVmDeleteParams ¶
type APIVmDeleteParams struct { // Delete children recursively Recursive param.Field[bool] `query:"recursive,required"` }
func (APIVmDeleteParams) URLQuery ¶
func (r APIVmDeleteParams) URLQuery() (v url.Values)
URLQuery serializes APIVmDeleteParams's query parameters as `url.Values`.
type APIVmDeleteResponse ¶
type APIVmDeleteResponse struct { // A struct containing information about an attempted VM deletion request. Reports // information in the event of a partial failure so billing can still be udpated // appropriately. Data APIVmDeleteResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmDeleteResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmDeleteResponseJSON `json:"-"` }
func (*APIVmDeleteResponse) UnmarshalJSON ¶
func (r *APIVmDeleteResponse) UnmarshalJSON(data []byte) (err error)
type APIVmDeleteResponseData ¶
type APIVmDeleteResponseData struct { DeletedIDs []string `json:"deleted_ids,required"` Errors []APIVmDeleteResponseDataError `json:"errors,required"` JSON apiVmDeleteResponseDataJSON `json:"-"` }
A struct containing information about an attempted VM deletion request. Reports information in the event of a partial failure so billing can still be udpated appropriately.
func (*APIVmDeleteResponseData) UnmarshalJSON ¶
func (r *APIVmDeleteResponseData) UnmarshalJSON(data []byte) (err error)
type APIVmDeleteResponseDataError ¶
type APIVmDeleteResponseDataError struct { ID string `json:"id,required"` Error string `json:"error,required"` JSON apiVmDeleteResponseDataErrorJSON `json:"-"` }
Contains a VM ID and the reason that it could not be deleted.
func (*APIVmDeleteResponseDataError) UnmarshalJSON ¶
func (r *APIVmDeleteResponseDataError) UnmarshalJSON(data []byte) (err error)
type APIVmDeleteResponseOperationCode ¶
type APIVmDeleteResponseOperationCode string
const ( APIVmDeleteResponseOperationCodeListClusters APIVmDeleteResponseOperationCode = "list_clusters" APIVmDeleteResponseOperationCodeGetCluster APIVmDeleteResponseOperationCode = "get_cluster" APIVmDeleteResponseOperationCodeCreateCluster APIVmDeleteResponseOperationCode = "create_cluster" APIVmDeleteResponseOperationCodeDeleteCluster APIVmDeleteResponseOperationCode = "delete_cluster" APIVmDeleteResponseOperationCodeUpdateCluster APIVmDeleteResponseOperationCode = "update_cluster" APIVmDeleteResponseOperationCodeGetClusterSSHKey APIVmDeleteResponseOperationCode = "get_cluster_ssh_key" APIVmDeleteResponseOperationCodeListVms APIVmDeleteResponseOperationCode = "list_vms" APIVmDeleteResponseOperationCodeGetVm APIVmDeleteResponseOperationCode = "get_vm" APIVmDeleteResponseOperationCodeUpdateVm APIVmDeleteResponseOperationCode = "update_vm" APIVmDeleteResponseOperationCodeBranchVm APIVmDeleteResponseOperationCode = "branch_vm" APIVmDeleteResponseOperationCodeCommitVm APIVmDeleteResponseOperationCode = "commit_vm" APIVmDeleteResponseOperationCodeDeleteVm APIVmDeleteResponseOperationCode = "delete_vm" APIVmDeleteResponseOperationCodeGetVmSSHKey APIVmDeleteResponseOperationCode = "get_vm_ssh_key" APIVmDeleteResponseOperationCodeUploadRootfs APIVmDeleteResponseOperationCode = "upload_rootfs" APIVmDeleteResponseOperationCodeDeleteRootfs APIVmDeleteResponseOperationCode = "delete_rootfs" APIVmDeleteResponseOperationCodeListRootfs APIVmDeleteResponseOperationCode = "list_rootfs" )
func (APIVmDeleteResponseOperationCode) IsKnown ¶
func (r APIVmDeleteResponseOperationCode) IsKnown() bool
type APIVmGetResponse ¶
type APIVmGetResponse struct { Data APIVmGetResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmGetResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmGetResponseJSON `json:"-"` }
func (*APIVmGetResponse) UnmarshalJSON ¶
func (r *APIVmGetResponse) UnmarshalJSON(data []byte) (err error)
type APIVmGetResponseData ¶
type APIVmGetResponseData struct { // The ID of the VM. ID string `json:"id,required"` // The IDs of direct children branched from this VM. Children []string `json:"children,required"` // The VM's cluster ID ClusterID string `json:"cluster_id,required"` // What is the size of the "disk" allocated to this VM FsSizeMib int64 `json:"fs_size_mib,required"` // The VM's local IP address on the VM subnet IPAddress string `json:"ip_address,required"` // How much RAM is allocated to this VM MemSizeMib int64 `json:"mem_size_mib,required"` // The VM's network configuration NetworkInfo APIVmGetResponseDataNetworkInfo `json:"network_info,required"` // Whether the VM is running, paused, or not started. State APIVmGetResponseDataState `json:"state,required"` // How many vCPUs were allocated to this VM VcpuCount int64 `json:"vcpu_count,required"` // Human-readable name assigned to the VM. Alias string `json:"alias,nullable"` // The parent VM's ID, if present. If None, then this VM is a root VM. ParentID string `json:"parent_id,nullable"` JSON apiVmGetResponseDataJSON `json:"-"` }
func (*APIVmGetResponseData) UnmarshalJSON ¶
func (r *APIVmGetResponseData) UnmarshalJSON(data []byte) (err error)
type APIVmGetResponseDataNetworkInfo ¶
type APIVmGetResponseDataNetworkInfo struct { GuestIP string `json:"guest_ip,required"` GuestMac string `json:"guest_mac,required"` SSHPort int64 `json:"ssh_port,required"` Tap0IP string `json:"tap0_ip,required"` Tap0Name string `json:"tap0_name,required"` VmNamespace string `json:"vm_namespace,required"` JSON apiVmGetResponseDataNetworkInfoJSON `json:"-"` }
The VM's network configuration
func (*APIVmGetResponseDataNetworkInfo) UnmarshalJSON ¶
func (r *APIVmGetResponseDataNetworkInfo) UnmarshalJSON(data []byte) (err error)
type APIVmGetResponseDataState ¶
type APIVmGetResponseDataState string
Whether the VM is running, paused, or not started.
const ( APIVmGetResponseDataStateNotStarted APIVmGetResponseDataState = "Not started" APIVmGetResponseDataStateRunning APIVmGetResponseDataState = "Running" APIVmGetResponseDataStatePaused APIVmGetResponseDataState = "Paused" )
func (APIVmGetResponseDataState) IsKnown ¶
func (r APIVmGetResponseDataState) IsKnown() bool
type APIVmGetResponseOperationCode ¶
type APIVmGetResponseOperationCode string
const ( APIVmGetResponseOperationCodeListClusters APIVmGetResponseOperationCode = "list_clusters" APIVmGetResponseOperationCodeGetCluster APIVmGetResponseOperationCode = "get_cluster" APIVmGetResponseOperationCodeCreateCluster APIVmGetResponseOperationCode = "create_cluster" APIVmGetResponseOperationCodeDeleteCluster APIVmGetResponseOperationCode = "delete_cluster" APIVmGetResponseOperationCodeUpdateCluster APIVmGetResponseOperationCode = "update_cluster" APIVmGetResponseOperationCodeGetClusterSSHKey APIVmGetResponseOperationCode = "get_cluster_ssh_key" APIVmGetResponseOperationCodeListVms APIVmGetResponseOperationCode = "list_vms" APIVmGetResponseOperationCodeGetVm APIVmGetResponseOperationCode = "get_vm" APIVmGetResponseOperationCodeUpdateVm APIVmGetResponseOperationCode = "update_vm" APIVmGetResponseOperationCodeBranchVm APIVmGetResponseOperationCode = "branch_vm" APIVmGetResponseOperationCodeCommitVm APIVmGetResponseOperationCode = "commit_vm" APIVmGetResponseOperationCodeDeleteVm APIVmGetResponseOperationCode = "delete_vm" APIVmGetResponseOperationCodeGetVmSSHKey APIVmGetResponseOperationCode = "get_vm_ssh_key" APIVmGetResponseOperationCodeUploadRootfs APIVmGetResponseOperationCode = "upload_rootfs" APIVmGetResponseOperationCodeDeleteRootfs APIVmGetResponseOperationCode = "delete_rootfs" APIVmGetResponseOperationCodeListRootfs APIVmGetResponseOperationCode = "list_rootfs" )
func (APIVmGetResponseOperationCode) IsKnown ¶
func (r APIVmGetResponseOperationCode) IsKnown() bool
type APIVmGetSSHKeyResponse ¶
type APIVmGetSSHKeyResponse struct { Data string `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmGetSSHKeyResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmGetSSHKeyResponseJSON `json:"-"` }
func (*APIVmGetSSHKeyResponse) UnmarshalJSON ¶
func (r *APIVmGetSSHKeyResponse) UnmarshalJSON(data []byte) (err error)
type APIVmGetSSHKeyResponseOperationCode ¶
type APIVmGetSSHKeyResponseOperationCode string
const ( APIVmGetSSHKeyResponseOperationCodeListClusters APIVmGetSSHKeyResponseOperationCode = "list_clusters" APIVmGetSSHKeyResponseOperationCodeGetCluster APIVmGetSSHKeyResponseOperationCode = "get_cluster" APIVmGetSSHKeyResponseOperationCodeCreateCluster APIVmGetSSHKeyResponseOperationCode = "create_cluster" APIVmGetSSHKeyResponseOperationCodeDeleteCluster APIVmGetSSHKeyResponseOperationCode = "delete_cluster" APIVmGetSSHKeyResponseOperationCodeUpdateCluster APIVmGetSSHKeyResponseOperationCode = "update_cluster" APIVmGetSSHKeyResponseOperationCodeGetClusterSSHKey APIVmGetSSHKeyResponseOperationCode = "get_cluster_ssh_key" APIVmGetSSHKeyResponseOperationCodeListVms APIVmGetSSHKeyResponseOperationCode = "list_vms" APIVmGetSSHKeyResponseOperationCodeGetVm APIVmGetSSHKeyResponseOperationCode = "get_vm" APIVmGetSSHKeyResponseOperationCodeUpdateVm APIVmGetSSHKeyResponseOperationCode = "update_vm" APIVmGetSSHKeyResponseOperationCodeBranchVm APIVmGetSSHKeyResponseOperationCode = "branch_vm" APIVmGetSSHKeyResponseOperationCodeCommitVm APIVmGetSSHKeyResponseOperationCode = "commit_vm" APIVmGetSSHKeyResponseOperationCodeDeleteVm APIVmGetSSHKeyResponseOperationCode = "delete_vm" APIVmGetSSHKeyResponseOperationCodeGetVmSSHKey APIVmGetSSHKeyResponseOperationCode = "get_vm_ssh_key" APIVmGetSSHKeyResponseOperationCodeUploadRootfs APIVmGetSSHKeyResponseOperationCode = "upload_rootfs" APIVmGetSSHKeyResponseOperationCodeDeleteRootfs APIVmGetSSHKeyResponseOperationCode = "delete_rootfs" APIVmGetSSHKeyResponseOperationCodeListRootfs APIVmGetSSHKeyResponseOperationCode = "list_rootfs" )
func (APIVmGetSSHKeyResponseOperationCode) IsKnown ¶
func (r APIVmGetSSHKeyResponseOperationCode) IsKnown() bool
type APIVmListResponse ¶
type APIVmListResponse struct { Data []APIVmListResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmListResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmListResponseJSON `json:"-"` }
func (*APIVmListResponse) UnmarshalJSON ¶
func (r *APIVmListResponse) UnmarshalJSON(data []byte) (err error)
type APIVmListResponseData ¶
type APIVmListResponseData struct { // The ID of the VM. ID string `json:"id,required"` // The IDs of direct children branched from this VM. Children []string `json:"children,required"` // The VM's cluster ID ClusterID string `json:"cluster_id,required"` // What is the size of the "disk" allocated to this VM FsSizeMib int64 `json:"fs_size_mib,required"` // The VM's local IP address on the VM subnet IPAddress string `json:"ip_address,required"` // How much RAM is allocated to this VM MemSizeMib int64 `json:"mem_size_mib,required"` // The VM's network configuration NetworkInfo APIVmListResponseDataNetworkInfo `json:"network_info,required"` // Whether the VM is running, paused, or not started. State APIVmListResponseDataState `json:"state,required"` // How many vCPUs were allocated to this VM VcpuCount int64 `json:"vcpu_count,required"` // Human-readable name assigned to the VM. Alias string `json:"alias,nullable"` // The parent VM's ID, if present. If None, then this VM is a root VM. ParentID string `json:"parent_id,nullable"` JSON apiVmListResponseDataJSON `json:"-"` }
func (*APIVmListResponseData) UnmarshalJSON ¶
func (r *APIVmListResponseData) UnmarshalJSON(data []byte) (err error)
type APIVmListResponseDataNetworkInfo ¶
type APIVmListResponseDataNetworkInfo struct { GuestIP string `json:"guest_ip,required"` GuestMac string `json:"guest_mac,required"` SSHPort int64 `json:"ssh_port,required"` Tap0IP string `json:"tap0_ip,required"` Tap0Name string `json:"tap0_name,required"` VmNamespace string `json:"vm_namespace,required"` JSON apiVmListResponseDataNetworkInfoJSON `json:"-"` }
The VM's network configuration
func (*APIVmListResponseDataNetworkInfo) UnmarshalJSON ¶
func (r *APIVmListResponseDataNetworkInfo) UnmarshalJSON(data []byte) (err error)
type APIVmListResponseDataState ¶
type APIVmListResponseDataState string
Whether the VM is running, paused, or not started.
const ( APIVmListResponseDataStateNotStarted APIVmListResponseDataState = "Not started" APIVmListResponseDataStateRunning APIVmListResponseDataState = "Running" APIVmListResponseDataStatePaused APIVmListResponseDataState = "Paused" )
func (APIVmListResponseDataState) IsKnown ¶
func (r APIVmListResponseDataState) IsKnown() bool
type APIVmListResponseOperationCode ¶
type APIVmListResponseOperationCode string
const ( APIVmListResponseOperationCodeListClusters APIVmListResponseOperationCode = "list_clusters" APIVmListResponseOperationCodeGetCluster APIVmListResponseOperationCode = "get_cluster" APIVmListResponseOperationCodeCreateCluster APIVmListResponseOperationCode = "create_cluster" APIVmListResponseOperationCodeDeleteCluster APIVmListResponseOperationCode = "delete_cluster" APIVmListResponseOperationCodeUpdateCluster APIVmListResponseOperationCode = "update_cluster" APIVmListResponseOperationCodeGetClusterSSHKey APIVmListResponseOperationCode = "get_cluster_ssh_key" APIVmListResponseOperationCodeListVms APIVmListResponseOperationCode = "list_vms" APIVmListResponseOperationCodeGetVm APIVmListResponseOperationCode = "get_vm" APIVmListResponseOperationCodeUpdateVm APIVmListResponseOperationCode = "update_vm" APIVmListResponseOperationCodeBranchVm APIVmListResponseOperationCode = "branch_vm" APIVmListResponseOperationCodeCommitVm APIVmListResponseOperationCode = "commit_vm" APIVmListResponseOperationCodeDeleteVm APIVmListResponseOperationCode = "delete_vm" APIVmListResponseOperationCodeGetVmSSHKey APIVmListResponseOperationCode = "get_vm_ssh_key" APIVmListResponseOperationCodeUploadRootfs APIVmListResponseOperationCode = "upload_rootfs" APIVmListResponseOperationCodeDeleteRootfs APIVmListResponseOperationCode = "delete_rootfs" APIVmListResponseOperationCodeListRootfs APIVmListResponseOperationCode = "list_rootfs" )
func (APIVmListResponseOperationCode) IsKnown ¶
func (r APIVmListResponseOperationCode) IsKnown() bool
type APIVmService ¶
type APIVmService struct {
Options []option.RequestOption
}
APIVmService contains methods and other services that help with interacting with the vers API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPIVmService method instead.
func NewAPIVmService ¶
func NewAPIVmService(opts ...option.RequestOption) (r *APIVmService)
NewAPIVmService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*APIVmService) Branch ¶
func (r *APIVmService) Branch(ctx context.Context, vmIDOrAlias string, body APIVmBranchParams, opts ...option.RequestOption) (res *APIVmBranchResponse, err error)
Branch a VM.
func (*APIVmService) Commit ¶
func (r *APIVmService) Commit(ctx context.Context, vmIDOrAlias string, body APIVmCommitParams, opts ...option.RequestOption) (res *APIVmCommitResponse, err error)
Commit a VM.
func (*APIVmService) Delete ¶
func (r *APIVmService) Delete(ctx context.Context, vmIDOrAlias string, body APIVmDeleteParams, opts ...option.RequestOption) (res *APIVmDeleteResponse, err error)
Delete a VM.
func (*APIVmService) Get ¶
func (r *APIVmService) Get(ctx context.Context, vmIDOrAlias string, opts ...option.RequestOption) (res *APIVmGetResponse, err error)
Retrieve information on a particular VM.
func (*APIVmService) GetSSHKey ¶
func (r *APIVmService) GetSSHKey(ctx context.Context, vmIDOrAlias string, opts ...option.RequestOption) (res *APIVmGetSSHKeyResponse, err error)
Get the SSH private key for VM access
func (*APIVmService) List ¶
func (r *APIVmService) List(ctx context.Context, opts ...option.RequestOption) (res *APIVmListResponse, err error)
List all VMs.
func (*APIVmService) Update ¶
func (r *APIVmService) Update(ctx context.Context, vmIDOrAlias string, body APIVmUpdateParams, opts ...option.RequestOption) (res *APIVmUpdateResponse, err error)
Update VM state.
type APIVmUpdateParams ¶
type APIVmUpdateParams struct {
VmPatchRequest VmPatchRequestParam `json:"vm_patch_request,required"`
}
func (APIVmUpdateParams) MarshalJSON ¶
func (r APIVmUpdateParams) MarshalJSON() (data []byte, err error)
type APIVmUpdateResponse ¶
type APIVmUpdateResponse struct { Data APIVmUpdateResponseData `json:"data,required"` DurationNs int64 `json:"duration_ns,required"` OperationCode APIVmUpdateResponseOperationCode `json:"operation_code,required"` OperationID string `json:"operation_id,required"` // Unix epoch time (secs) TimeStart int64 `json:"time_start,required"` JSON apiVmUpdateResponseJSON `json:"-"` }
func (*APIVmUpdateResponse) UnmarshalJSON ¶
func (r *APIVmUpdateResponse) UnmarshalJSON(data []byte) (err error)
type APIVmUpdateResponseData ¶
type APIVmUpdateResponseData struct { // The ID of the VM. ID string `json:"id,required"` // The IDs of direct children branched from this VM. Children []string `json:"children,required"` // The VM's cluster ID ClusterID string `json:"cluster_id,required"` // What is the size of the "disk" allocated to this VM FsSizeMib int64 `json:"fs_size_mib,required"` // The VM's local IP address on the VM subnet IPAddress string `json:"ip_address,required"` // How much RAM is allocated to this VM MemSizeMib int64 `json:"mem_size_mib,required"` // The VM's network configuration NetworkInfo APIVmUpdateResponseDataNetworkInfo `json:"network_info,required"` // Whether the VM is running, paused, or not started. State APIVmUpdateResponseDataState `json:"state,required"` // How many vCPUs were allocated to this VM VcpuCount int64 `json:"vcpu_count,required"` // Human-readable name assigned to the VM. Alias string `json:"alias,nullable"` // The parent VM's ID, if present. If None, then this VM is a root VM. ParentID string `json:"parent_id,nullable"` JSON apiVmUpdateResponseDataJSON `json:"-"` }
func (*APIVmUpdateResponseData) UnmarshalJSON ¶
func (r *APIVmUpdateResponseData) UnmarshalJSON(data []byte) (err error)
type APIVmUpdateResponseDataNetworkInfo ¶
type APIVmUpdateResponseDataNetworkInfo struct { GuestIP string `json:"guest_ip,required"` GuestMac string `json:"guest_mac,required"` SSHPort int64 `json:"ssh_port,required"` Tap0IP string `json:"tap0_ip,required"` Tap0Name string `json:"tap0_name,required"` VmNamespace string `json:"vm_namespace,required"` JSON apiVmUpdateResponseDataNetworkInfoJSON `json:"-"` }
The VM's network configuration
func (*APIVmUpdateResponseDataNetworkInfo) UnmarshalJSON ¶
func (r *APIVmUpdateResponseDataNetworkInfo) UnmarshalJSON(data []byte) (err error)
type APIVmUpdateResponseDataState ¶
type APIVmUpdateResponseDataState string
Whether the VM is running, paused, or not started.
const ( APIVmUpdateResponseDataStateNotStarted APIVmUpdateResponseDataState = "Not started" APIVmUpdateResponseDataStateRunning APIVmUpdateResponseDataState = "Running" APIVmUpdateResponseDataStatePaused APIVmUpdateResponseDataState = "Paused" )
func (APIVmUpdateResponseDataState) IsKnown ¶
func (r APIVmUpdateResponseDataState) IsKnown() bool
type APIVmUpdateResponseOperationCode ¶
type APIVmUpdateResponseOperationCode string
const ( APIVmUpdateResponseOperationCodeListClusters APIVmUpdateResponseOperationCode = "list_clusters" APIVmUpdateResponseOperationCodeGetCluster APIVmUpdateResponseOperationCode = "get_cluster" APIVmUpdateResponseOperationCodeCreateCluster APIVmUpdateResponseOperationCode = "create_cluster" APIVmUpdateResponseOperationCodeDeleteCluster APIVmUpdateResponseOperationCode = "delete_cluster" APIVmUpdateResponseOperationCodeUpdateCluster APIVmUpdateResponseOperationCode = "update_cluster" APIVmUpdateResponseOperationCodeGetClusterSSHKey APIVmUpdateResponseOperationCode = "get_cluster_ssh_key" APIVmUpdateResponseOperationCodeListVms APIVmUpdateResponseOperationCode = "list_vms" APIVmUpdateResponseOperationCodeGetVm APIVmUpdateResponseOperationCode = "get_vm" APIVmUpdateResponseOperationCodeUpdateVm APIVmUpdateResponseOperationCode = "update_vm" APIVmUpdateResponseOperationCodeBranchVm APIVmUpdateResponseOperationCode = "branch_vm" APIVmUpdateResponseOperationCodeCommitVm APIVmUpdateResponseOperationCode = "commit_vm" APIVmUpdateResponseOperationCodeDeleteVm APIVmUpdateResponseOperationCode = "delete_vm" APIVmUpdateResponseOperationCodeGetVmSSHKey APIVmUpdateResponseOperationCode = "get_vm_ssh_key" APIVmUpdateResponseOperationCodeUploadRootfs APIVmUpdateResponseOperationCode = "upload_rootfs" APIVmUpdateResponseOperationCodeDeleteRootfs APIVmUpdateResponseOperationCode = "delete_rootfs" APIVmUpdateResponseOperationCodeListRootfs APIVmUpdateResponseOperationCode = "list_rootfs" )
func (APIVmUpdateResponseOperationCode) IsKnown ¶
func (r APIVmUpdateResponseOperationCode) IsKnown() bool
type Client ¶
type Client struct { Options []option.RequestOption API *APIService }
Client creates a struct with services and top level methods that help with interacting with the vers API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (VERS_API_KEY, VERS_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type ClusterCreateRequestClusterFromCommitParamsClusterType ¶
type ClusterCreateRequestClusterFromCommitParamsClusterType string
const (
ClusterCreateRequestClusterFromCommitParamsClusterTypeFromCommit ClusterCreateRequestClusterFromCommitParamsClusterType = "from_commit"
)
func (ClusterCreateRequestClusterFromCommitParamsClusterType) IsKnown ¶
func (r ClusterCreateRequestClusterFromCommitParamsClusterType) IsKnown() bool
type ClusterCreateRequestClusterFromCommitParamsParam ¶
type ClusterCreateRequestClusterFromCommitParamsParam struct { ClusterType param.Field[ClusterCreateRequestClusterFromCommitParamsClusterType] `json:"cluster_type,required"` Params param.Field[ClusterCreateRequestClusterFromCommitParamsParamsParam] `json:"params,required"` }
func (ClusterCreateRequestClusterFromCommitParamsParam) MarshalJSON ¶
func (r ClusterCreateRequestClusterFromCommitParamsParam) MarshalJSON() (data []byte, err error)
type ClusterCreateRequestClusterFromCommitParamsParamsParam ¶
type ClusterCreateRequestClusterFromCommitParamsParamsParam struct { CommitKey param.Field[string] `json:"commit_key,required"` ClusterAlias param.Field[string] `json:"cluster_alias"` FsSizeClusterMib param.Field[int64] `json:"fs_size_cluster_mib"` VmAlias param.Field[string] `json:"vm_alias"` }
func (ClusterCreateRequestClusterFromCommitParamsParamsParam) MarshalJSON ¶
func (r ClusterCreateRequestClusterFromCommitParamsParamsParam) MarshalJSON() (data []byte, err error)
type ClusterCreateRequestClusterType ¶
type ClusterCreateRequestClusterType string
const ( ClusterCreateRequestClusterTypeNew ClusterCreateRequestClusterType = "new" ClusterCreateRequestClusterTypeFromCommit ClusterCreateRequestClusterType = "from_commit" )
func (ClusterCreateRequestClusterType) IsKnown ¶
func (r ClusterCreateRequestClusterType) IsKnown() bool
type ClusterCreateRequestNewClusterParamsClusterType ¶
type ClusterCreateRequestNewClusterParamsClusterType string
const (
ClusterCreateRequestNewClusterParamsClusterTypeNew ClusterCreateRequestNewClusterParamsClusterType = "new"
)
func (ClusterCreateRequestNewClusterParamsClusterType) IsKnown ¶
func (r ClusterCreateRequestNewClusterParamsClusterType) IsKnown() bool
type ClusterCreateRequestNewClusterParamsParam ¶
type ClusterCreateRequestNewClusterParamsParam struct { ClusterType param.Field[ClusterCreateRequestNewClusterParamsClusterType] `json:"cluster_type,required"` Params param.Field[ClusterCreateRequestNewClusterParamsParamsParam] `json:"params,required"` }
func (ClusterCreateRequestNewClusterParamsParam) MarshalJSON ¶
func (r ClusterCreateRequestNewClusterParamsParam) MarshalJSON() (data []byte, err error)
type ClusterCreateRequestNewClusterParamsParamsParam ¶
type ClusterCreateRequestNewClusterParamsParamsParam struct { ClusterAlias param.Field[string] `json:"cluster_alias"` // The amount of total space to allocate to the cluster FsSizeClusterMib param.Field[int64] `json:"fs_size_cluster_mib"` // The size of the VM filesystem (if smaller than the base image + overhead, will // cause an error) FsSizeVmMib param.Field[int64] `json:"fs_size_vm_mib"` KernelName param.Field[string] `json:"kernel_name"` MemSizeMib param.Field[int64] `json:"mem_size_mib"` RootfsName param.Field[string] `json:"rootfs_name"` VcpuCount param.Field[int64] `json:"vcpu_count"` VmAlias param.Field[string] `json:"vm_alias"` }
func (ClusterCreateRequestNewClusterParamsParamsParam) MarshalJSON ¶
func (r ClusterCreateRequestNewClusterParamsParamsParam) MarshalJSON() (data []byte, err error)
type ClusterCreateRequestParam ¶
type ClusterCreateRequestParam struct { ClusterType param.Field[ClusterCreateRequestClusterType] `json:"cluster_type,required"` Params param.Field[interface{}] `json:"params,required"` }
func (ClusterCreateRequestParam) MarshalJSON ¶
func (r ClusterCreateRequestParam) MarshalJSON() (data []byte, err error)
type ClusterCreateRequestUnionParam ¶
type ClusterCreateRequestUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by ClusterCreateRequestNewClusterParamsParam, ClusterCreateRequestClusterFromCommitParamsParam, ClusterCreateRequestParam.
type ClusterPatchRequestParam ¶
func (ClusterPatchRequestParam) MarshalJSON ¶
func (r ClusterPatchRequestParam) MarshalJSON() (data []byte, err error)
type TelemetryDto ¶
type TelemetryDto struct { ID string `json:"id,required"` FsMibCurrent int64 `json:"fs_mib_current,required"` FsMibMax int64 `json:"fs_mib_max,required"` MemMibCurrent int64 `json:"mem_mib_current,required"` MemMibMax int64 `json:"mem_mib_max,required"` VcpuCurrent int64 `json:"vcpu_current,required"` VcpuMax int64 `json:"vcpu_max,required"` VmNetworkCountInUse int64 `json:"vm_network_count_in_use,required"` VmNetworkCountTotal int64 `json:"vm_network_count_total,required"` JSON telemetryDtoJSON `json:"-"` }
func (*TelemetryDto) UnmarshalJSON ¶
func (r *TelemetryDto) UnmarshalJSON(data []byte) (err error)
type VmBranchRequestParam ¶
func (VmBranchRequestParam) MarshalJSON ¶
func (r VmBranchRequestParam) MarshalJSON() (data []byte, err error)
type VmCommitRequestParam ¶
func (VmCommitRequestParam) MarshalJSON ¶
func (r VmCommitRequestParam) MarshalJSON() (data []byte, err error)
type VmDeleteResponse ¶
type VmDeleteResponse struct { DeletedIDs []string `json:"deleted_ids,required"` Errors []VmDeleteResponseError `json:"errors,required"` JSON vmDeleteResponseJSON `json:"-"` }
A struct containing information about an attempted VM deletion request. Reports information in the event of a partial failure so billing can still be udpated appropriately.
func (*VmDeleteResponse) UnmarshalJSON ¶
func (r *VmDeleteResponse) UnmarshalJSON(data []byte) (err error)
type VmDeleteResponseError ¶
type VmDeleteResponseError struct { ID string `json:"id,required"` Error string `json:"error,required"` JSON vmDeleteResponseErrorJSON `json:"-"` }
Contains a VM ID and the reason that it could not be deleted.
func (*VmDeleteResponseError) UnmarshalJSON ¶
func (r *VmDeleteResponseError) UnmarshalJSON(data []byte) (err error)
type VmDto ¶
type VmDto struct { // The ID of the VM. ID string `json:"id,required"` // The IDs of direct children branched from this VM. Children []string `json:"children,required"` // The VM's cluster ID ClusterID string `json:"cluster_id,required"` // What is the size of the "disk" allocated to this VM FsSizeMib int64 `json:"fs_size_mib,required"` // The VM's local IP address on the VM subnet IPAddress string `json:"ip_address,required"` // How much RAM is allocated to this VM MemSizeMib int64 `json:"mem_size_mib,required"` // The VM's network configuration NetworkInfo VmDtoNetworkInfo `json:"network_info,required"` // Whether the VM is running, paused, or not started. State VmDtoState `json:"state,required"` // How many vCPUs were allocated to this VM VcpuCount int64 `json:"vcpu_count,required"` // Human-readable name assigned to the VM. Alias string `json:"alias,nullable"` // The parent VM's ID, if present. If None, then this VM is a root VM. ParentID string `json:"parent_id,nullable"` JSON vmDtoJSON `json:"-"` }
func (*VmDto) UnmarshalJSON ¶
type VmDtoNetworkInfo ¶
type VmDtoNetworkInfo struct { GuestIP string `json:"guest_ip,required"` GuestMac string `json:"guest_mac,required"` SSHPort int64 `json:"ssh_port,required"` Tap0IP string `json:"tap0_ip,required"` Tap0Name string `json:"tap0_name,required"` VmNamespace string `json:"vm_namespace,required"` JSON vmDtoNetworkInfoJSON `json:"-"` }
The VM's network configuration
func (*VmDtoNetworkInfo) UnmarshalJSON ¶
func (r *VmDtoNetworkInfo) UnmarshalJSON(data []byte) (err error)
type VmDtoState ¶
type VmDtoState string
Whether the VM is running, paused, or not started.
const ( VmDtoStateNotStarted VmDtoState = "Not started" VmDtoStateRunning VmDtoState = "Running" VmDtoStatePaused VmDtoState = "Paused" )
func (VmDtoState) IsKnown ¶
func (r VmDtoState) IsKnown() bool
type VmPatchRequestParam ¶
type VmPatchRequestParam struct { Alias param.Field[string] `json:"alias"` State param.Field[VmPatchRequestState] `json:"state"` }
func (VmPatchRequestParam) MarshalJSON ¶
func (r VmPatchRequestParam) MarshalJSON() (data []byte, err error)
type VmPatchRequestState ¶
type VmPatchRequestState string
const ( VmPatchRequestStateRunning VmPatchRequestState = "Running" VmPatchRequestStatePaused VmPatchRequestState = "Paused" )
func (VmPatchRequestState) IsKnown ¶
func (r VmPatchRequestState) IsKnown() bool