genesiscloud

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

Genesis Cloud Go Client

The Genesis Cloud Go client provides the ability to manage each services resources programmatically from scripts or applications.

This repository is licensed under Mozilla Public License 2.0 (no copyleft exception) (see LICENSE.txt).

Maintainers

This client is maintained by Genesis Cloud. If you encounter any problems, feel free to create issues or pull requests.

Requirements

  • Go >= 1.19

Installation

go get github.com/genesiscloud/genesiscloud-go

Getting Started

import "github.com/genesiscloud/genesiscloud-go"

// Generic pointer in Go 1.18+. Alternatively use "k8s.io/utils/pointer"
func pointer[T any](v T) *T {
	return &v
}

client, err := genesiscloud.NewGenesisCloudClient(genesiscloud.ClientConfig{
	Token: os.Getenv("GENESISCLOUD_TOKEN"),
})
if err != nil {
	// ...
}

resp, err := client.ListInstancesWithResponse(ctx, &genesiscloud.ListInstancesParams{
	Page:    pointer(1),
	PerPage: pointer(100),
})
if err != nil {
	// ...
}

Examples

You can find additional examples in the GoDoc or check the examples folder.

GENESISCLOUD_TOKEN="XXXX" go run ./examples/list-instances

Development or update of OpenAPI document

# Update openapi.yaml (./codegen/openapi.yaml)

# Generate code
go generate ./...

Documentation

Overview

Package genesiscloud provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT.

Package genesiscloud provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT.

Index

Constants

View Source
const (
	ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
View Source
const DefaultEndpoint = "https://api.genesiscloud.com/compute/v1"

Variables

View Source
var AllVolumeTypes = []VolumeType{
	VolumeTypeHdd,
	VolumeTypeSsd,
}

Functions

func NewCreateFloatingIPRequest

func NewCreateFloatingIPRequest(server string, body CreateFloatingIPJSONRequestBody) (*http.Request, error)

NewCreateFloatingIPRequest calls the generic CreateFloatingIP builder with application/json body

func NewCreateFloatingIPRequestWithBody

func NewCreateFloatingIPRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateFloatingIPRequestWithBody generates requests for CreateFloatingIP with any type of body

func NewCreateInstanceRequest

func NewCreateInstanceRequest(server string, body CreateInstanceJSONRequestBody) (*http.Request, error)

NewCreateInstanceRequest calls the generic CreateInstance builder with application/json body

func NewCreateInstanceRequestWithBody

func NewCreateInstanceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateInstanceRequestWithBody generates requests for CreateInstance with any type of body

func NewCreateSSHKeyRequest

func NewCreateSSHKeyRequest(server string, body CreateSSHKeyJSONRequestBody) (*http.Request, error)

NewCreateSSHKeyRequest calls the generic CreateSSHKey builder with application/json body

func NewCreateSSHKeyRequestWithBody

func NewCreateSSHKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateSSHKeyRequestWithBody generates requests for CreateSSHKey with any type of body

func NewCreateSecurityGroupRequest

func NewCreateSecurityGroupRequest(server string, body CreateSecurityGroupJSONRequestBody) (*http.Request, error)

NewCreateSecurityGroupRequest calls the generic CreateSecurityGroup builder with application/json body

func NewCreateSecurityGroupRequestWithBody

func NewCreateSecurityGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateSecurityGroupRequestWithBody generates requests for CreateSecurityGroup with any type of body

func NewCreateSnapshotRequest

func NewCreateSnapshotRequest(server string, instanceId string, body CreateSnapshotJSONRequestBody) (*http.Request, error)

NewCreateSnapshotRequest calls the generic CreateSnapshot builder with application/json body

func NewCreateSnapshotRequestWithBody

func NewCreateSnapshotRequestWithBody(server string, instanceId string, contentType string, body io.Reader) (*http.Request, error)

NewCreateSnapshotRequestWithBody generates requests for CreateSnapshot with any type of body

func NewCreateVolumeRequest

func NewCreateVolumeRequest(server string, body CreateVolumeJSONRequestBody) (*http.Request, error)

NewCreateVolumeRequest calls the generic CreateVolume builder with application/json body

func NewCreateVolumeRequestWithBody

func NewCreateVolumeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateVolumeRequestWithBody generates requests for CreateVolume with any type of body

func NewDeleteFloatingIPRequest

func NewDeleteFloatingIPRequest(server string, floatingIpId string) (*http.Request, error)

NewDeleteFloatingIPRequest generates requests for DeleteFloatingIP

func NewDeleteInstanceRequest

func NewDeleteInstanceRequest(server string, instanceId string) (*http.Request, error)

NewDeleteInstanceRequest generates requests for DeleteInstance

func NewDeleteSSHKeyRequest

func NewDeleteSSHKeyRequest(server string, sshKeyId string) (*http.Request, error)

NewDeleteSSHKeyRequest generates requests for DeleteSSHKey

func NewDeleteSecurityGroupRequest

func NewDeleteSecurityGroupRequest(server string, securityGroupId string) (*http.Request, error)

NewDeleteSecurityGroupRequest generates requests for DeleteSecurityGroup

func NewDeleteSnapshotRequest

func NewDeleteSnapshotRequest(server string, snapshotId string) (*http.Request, error)

NewDeleteSnapshotRequest generates requests for DeleteSnapshot

func NewDeleteVolumeRequest

func NewDeleteVolumeRequest(server string, volumeId string) (*http.Request, error)

NewDeleteVolumeRequest generates requests for DeleteVolume

func NewGetFloatingIPRequest

func NewGetFloatingIPRequest(server string, floatingIpId string) (*http.Request, error)

NewGetFloatingIPRequest generates requests for GetFloatingIP

func NewGetInstanceRequest

func NewGetInstanceRequest(server string, instanceId string) (*http.Request, error)

NewGetInstanceRequest generates requests for GetInstance

func NewGetInstancesAvailabilityRequest

func NewGetInstancesAvailabilityRequest(server string, region Region, params *GetInstancesAvailabilityParams) (*http.Request, error)

NewGetInstancesAvailabilityRequest generates requests for GetInstancesAvailability

func NewGetSSHKeyRequest

func NewGetSSHKeyRequest(server string, sshKeyId string) (*http.Request, error)

NewGetSSHKeyRequest generates requests for GetSSHKey

func NewGetSecurityGroupRequest

func NewGetSecurityGroupRequest(server string, securityGroupId string) (*http.Request, error)

NewGetSecurityGroupRequest generates requests for GetSecurityGroup

func NewGetSnapshotRequest

func NewGetSnapshotRequest(server string, snapshotId string) (*http.Request, error)

NewGetSnapshotRequest generates requests for GetSnapshot

func NewGetVolumeRequest

func NewGetVolumeRequest(server string, volumeId string) (*http.Request, error)

NewGetVolumeRequest generates requests for GetVolume

func NewListFloatingIPsRequest

func NewListFloatingIPsRequest(server string, params *ListFloatingIPsParams) (*http.Request, error)

NewListFloatingIPsRequest generates requests for ListFloatingIPs

func NewListImagesRequest

func NewListImagesRequest(server string, params *ListImagesParams) (*http.Request, error)

NewListImagesRequest generates requests for ListImages

func NewListInstanceActionsRequest

func NewListInstanceActionsRequest(server string, instanceId string) (*http.Request, error)

NewListInstanceActionsRequest generates requests for ListInstanceActions

func NewListInstanceSnapshotsRequest

func NewListInstanceSnapshotsRequest(server string, instanceId string, params *ListInstanceSnapshotsParams) (*http.Request, error)

NewListInstanceSnapshotsRequest generates requests for ListInstanceSnapshots

func NewListInstancesRequest

func NewListInstancesRequest(server string, params *ListInstancesParams) (*http.Request, error)

NewListInstancesRequest generates requests for ListInstances

func NewListSSHKeysRequest

func NewListSSHKeysRequest(server string, params *ListSSHKeysParams) (*http.Request, error)

NewListSSHKeysRequest generates requests for ListSSHKeys

func NewListSecurityGroupsRequest

func NewListSecurityGroupsRequest(server string, params *ListSecurityGroupsParams) (*http.Request, error)

NewListSecurityGroupsRequest generates requests for ListSecurityGroups

func NewListSnapshotsRequest

func NewListSnapshotsRequest(server string, params *ListSnapshotsParams) (*http.Request, error)

NewListSnapshotsRequest generates requests for ListSnapshots

func NewListVolumesRequest

func NewListVolumesRequest(server string, params *ListVolumesParams) (*http.Request, error)

NewListVolumesRequest generates requests for ListVolumes

func NewPerformInstanceActionRequest

func NewPerformInstanceActionRequest(server string, instanceId string, body PerformInstanceActionJSONRequestBody) (*http.Request, error)

NewPerformInstanceActionRequest calls the generic PerformInstanceAction builder with application/json body

func NewPerformInstanceActionRequestWithBody

func NewPerformInstanceActionRequestWithBody(server string, instanceId string, contentType string, body io.Reader) (*http.Request, error)

NewPerformInstanceActionRequestWithBody generates requests for PerformInstanceAction with any type of body

func NewUpdateInstanceRequest

func NewUpdateInstanceRequest(server string, instanceId string, body UpdateInstanceJSONRequestBody) (*http.Request, error)

NewUpdateInstanceRequest calls the generic UpdateInstance builder with application/json body

func NewUpdateInstanceRequestWithBody

func NewUpdateInstanceRequestWithBody(server string, instanceId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateInstanceRequestWithBody generates requests for UpdateInstance with any type of body

func NewUpdateSSHKeyRequest

func NewUpdateSSHKeyRequest(server string, sshKeyId string, body UpdateSSHKeyJSONRequestBody) (*http.Request, error)

NewUpdateSSHKeyRequest calls the generic UpdateSSHKey builder with application/json body

func NewUpdateSSHKeyRequestWithBody

func NewUpdateSSHKeyRequestWithBody(server string, sshKeyId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateSSHKeyRequestWithBody generates requests for UpdateSSHKey with any type of body

func NewUpdateSecurityGroupRequest

func NewUpdateSecurityGroupRequest(server string, securityGroupId string, body UpdateSecurityGroupJSONRequestBody) (*http.Request, error)

NewUpdateSecurityGroupRequest calls the generic UpdateSecurityGroup builder with application/json body

func NewUpdateSecurityGroupRequestWithBody

func NewUpdateSecurityGroupRequestWithBody(server string, securityGroupId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateSecurityGroupRequestWithBody generates requests for UpdateSecurityGroup with any type of body

func NewUpdateSnapshotRequest

func NewUpdateSnapshotRequest(server string, snapshotId string, body UpdateSnapshotJSONRequestBody) (*http.Request, error)

NewUpdateSnapshotRequest calls the generic UpdateSnapshot builder with application/json body

func NewUpdateSnapshotRequestWithBody

func NewUpdateSnapshotRequestWithBody(server string, snapshotId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateSnapshotRequestWithBody generates requests for UpdateSnapshot with any type of body

func NewUpdateVolumeRequest

func NewUpdateVolumeRequest(server string, volumeId string, body UpdateVolumeJSONRequestBody) (*http.Request, error)

NewUpdateVolumeRequest calls the generic UpdateVolume builder with application/json body

func NewUpdateVolumeRequestWithBody

func NewUpdateVolumeRequestWithBody(server string, volumeId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateVolumeRequestWithBody generates requests for UpdateVolume with any type of body

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateFloatingIP

func (c *Client) CreateFloatingIP(ctx context.Context, body CreateFloatingIPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateFloatingIPWithBody

func (c *Client) CreateFloatingIPWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateInstance

func (c *Client) CreateInstance(ctx context.Context, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateInstanceWithBody

func (c *Client) CreateInstanceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSSHKey

func (c *Client) CreateSSHKey(ctx context.Context, body CreateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSSHKeyWithBody

func (c *Client) CreateSSHKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSecurityGroup

func (c *Client) CreateSecurityGroup(ctx context.Context, body CreateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSecurityGroupWithBody

func (c *Client) CreateSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSnapshot

func (c *Client) CreateSnapshot(ctx context.Context, instanceId string, body CreateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSnapshotWithBody

func (c *Client) CreateSnapshotWithBody(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateVolume

func (c *Client) CreateVolume(ctx context.Context, body CreateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateVolumeWithBody

func (c *Client) CreateVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteFloatingIP

func (c *Client) DeleteFloatingIP(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteInstance

func (c *Client) DeleteInstance(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteSSHKey

func (c *Client) DeleteSSHKey(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteSecurityGroup

func (c *Client) DeleteSecurityGroup(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteSnapshot

func (c *Client) DeleteSnapshot(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteVolume

func (c *Client) DeleteVolume(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetFloatingIP

func (c *Client) GetFloatingIP(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetInstance

func (c *Client) GetInstance(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetInstancesAvailability

func (c *Client) GetInstancesAvailability(ctx context.Context, region Region, params *GetInstancesAvailabilityParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSSHKey

func (c *Client) GetSSHKey(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSecurityGroup

func (c *Client) GetSecurityGroup(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSnapshot

func (c *Client) GetSnapshot(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetVolume

func (c *Client) GetVolume(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListFloatingIPs

func (c *Client) ListFloatingIPs(ctx context.Context, params *ListFloatingIPsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListImages

func (c *Client) ListImages(ctx context.Context, params *ListImagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInstanceActions

func (c *Client) ListInstanceActions(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInstanceSnapshots

func (c *Client) ListInstanceSnapshots(ctx context.Context, instanceId string, params *ListInstanceSnapshotsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInstances

func (c *Client) ListInstances(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListSSHKeys

func (c *Client) ListSSHKeys(ctx context.Context, params *ListSSHKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListSecurityGroups

func (c *Client) ListSecurityGroups(ctx context.Context, params *ListSecurityGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListSnapshots

func (c *Client) ListSnapshots(ctx context.Context, params *ListSnapshotsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListVolumes

func (c *Client) ListVolumes(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PerformInstanceAction

func (c *Client) PerformInstanceAction(ctx context.Context, instanceId string, body PerformInstanceActionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PerformInstanceActionWithBody

func (c *Client) PerformInstanceActionWithBody(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateInstance

func (c *Client) UpdateInstance(ctx context.Context, instanceId string, body UpdateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateInstanceWithBody

func (c *Client) UpdateInstanceWithBody(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSSHKey

func (c *Client) UpdateSSHKey(ctx context.Context, sshKeyId string, body UpdateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSSHKeyWithBody

func (c *Client) UpdateSSHKeyWithBody(ctx context.Context, sshKeyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSecurityGroup

func (c *Client) UpdateSecurityGroup(ctx context.Context, securityGroupId string, body UpdateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSecurityGroupWithBody

func (c *Client) UpdateSecurityGroupWithBody(ctx context.Context, securityGroupId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSnapshot

func (c *Client) UpdateSnapshot(ctx context.Context, snapshotId string, body UpdateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateSnapshotWithBody

func (c *Client) UpdateSnapshotWithBody(ctx context.Context, snapshotId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateVolume

func (c *Client) UpdateVolume(ctx context.Context, volumeId string, body UpdateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateVolumeWithBody

func (c *Client) UpdateVolumeWithBody(ctx context.Context, volumeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientConfig

type ClientConfig struct {
	Endpoint string
	Token    string
}

type ClientInterface

type ClientInterface interface {
	// GetInstancesAvailability request
	GetInstancesAvailability(ctx context.Context, region Region, params *GetInstancesAvailabilityParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListFloatingIPs request
	ListFloatingIPs(ctx context.Context, params *ListFloatingIPsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateFloatingIPWithBody request with any body
	CreateFloatingIPWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateFloatingIP(ctx context.Context, body CreateFloatingIPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteFloatingIP request
	DeleteFloatingIP(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetFloatingIP request
	GetFloatingIP(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListImages request
	ListImages(ctx context.Context, params *ListImagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInstances request
	ListInstances(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateInstanceWithBody request with any body
	CreateInstanceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateInstance(ctx context.Context, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteInstance request
	DeleteInstance(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetInstance request
	GetInstance(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateInstanceWithBody request with any body
	UpdateInstanceWithBody(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateInstance(ctx context.Context, instanceId string, body UpdateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInstanceActions request
	ListInstanceActions(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PerformInstanceActionWithBody request with any body
	PerformInstanceActionWithBody(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PerformInstanceAction(ctx context.Context, instanceId string, body PerformInstanceActionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInstanceSnapshots request
	ListInstanceSnapshots(ctx context.Context, instanceId string, params *ListInstanceSnapshotsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSnapshotWithBody request with any body
	CreateSnapshotWithBody(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateSnapshot(ctx context.Context, instanceId string, body CreateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListSecurityGroups request
	ListSecurityGroups(ctx context.Context, params *ListSecurityGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSecurityGroupWithBody request with any body
	CreateSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateSecurityGroup(ctx context.Context, body CreateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSecurityGroup request
	DeleteSecurityGroup(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSecurityGroup request
	GetSecurityGroup(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateSecurityGroupWithBody request with any body
	UpdateSecurityGroupWithBody(ctx context.Context, securityGroupId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateSecurityGroup(ctx context.Context, securityGroupId string, body UpdateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListSnapshots request
	ListSnapshots(ctx context.Context, params *ListSnapshotsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSnapshot request
	DeleteSnapshot(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSnapshot request
	GetSnapshot(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateSnapshotWithBody request with any body
	UpdateSnapshotWithBody(ctx context.Context, snapshotId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateSnapshot(ctx context.Context, snapshotId string, body UpdateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListSSHKeys request
	ListSSHKeys(ctx context.Context, params *ListSSHKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSSHKeyWithBody request with any body
	CreateSSHKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateSSHKey(ctx context.Context, body CreateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSSHKey request
	DeleteSSHKey(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSSHKey request
	GetSSHKey(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateSSHKeyWithBody request with any body
	UpdateSSHKeyWithBody(ctx context.Context, sshKeyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateSSHKey(ctx context.Context, sshKeyId string, body UpdateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListVolumes request
	ListVolumes(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateVolumeWithBody request with any body
	CreateVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateVolume(ctx context.Context, body CreateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteVolume request
	DeleteVolume(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVolume request
	GetVolume(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateVolumeWithBody request with any body
	UpdateVolumeWithBody(ctx context.Context, volumeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateVolume(ctx context.Context, volumeId string, body UpdateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func NewGenesisCloudClient

func NewGenesisCloudClient(config ClientConfig, opts ...ClientOption) (*ClientWithResponses, error)

func (*ClientWithResponses) CreateFloatingIPWithBodyWithResponse

func (c *ClientWithResponses) CreateFloatingIPWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFloatingIPResponse, error)

CreateFloatingIPWithBodyWithResponse request with arbitrary body returning *CreateFloatingIPResponse

func (*ClientWithResponses) CreateFloatingIPWithResponse

func (c *ClientWithResponses) CreateFloatingIPWithResponse(ctx context.Context, body CreateFloatingIPJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFloatingIPResponse, error)

func (*ClientWithResponses) CreateInstanceWithBodyWithResponse

func (c *ClientWithResponses) CreateInstanceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)

CreateInstanceWithBodyWithResponse request with arbitrary body returning *CreateInstanceResponse

func (*ClientWithResponses) CreateInstanceWithResponse

func (c *ClientWithResponses) CreateInstanceWithResponse(ctx context.Context, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)

func (*ClientWithResponses) CreateSSHKeyWithBodyWithResponse

func (c *ClientWithResponses) CreateSSHKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSSHKeyResponse, error)

CreateSSHKeyWithBodyWithResponse request with arbitrary body returning *CreateSSHKeyResponse

func (*ClientWithResponses) CreateSSHKeyWithResponse

func (c *ClientWithResponses) CreateSSHKeyWithResponse(ctx context.Context, body CreateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSSHKeyResponse, error)

func (*ClientWithResponses) CreateSecurityGroupWithBodyWithResponse

func (c *ClientWithResponses) CreateSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecurityGroupResponse, error)

CreateSecurityGroupWithBodyWithResponse request with arbitrary body returning *CreateSecurityGroupResponse

func (*ClientWithResponses) CreateSecurityGroupWithResponse

func (c *ClientWithResponses) CreateSecurityGroupWithResponse(ctx context.Context, body CreateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecurityGroupResponse, error)

func (*ClientWithResponses) CreateSnapshotWithBodyWithResponse

func (c *ClientWithResponses) CreateSnapshotWithBodyWithResponse(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSnapshotResponse, error)

CreateSnapshotWithBodyWithResponse request with arbitrary body returning *CreateSnapshotResponse

func (*ClientWithResponses) CreateSnapshotWithResponse

func (c *ClientWithResponses) CreateSnapshotWithResponse(ctx context.Context, instanceId string, body CreateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSnapshotResponse, error)

func (*ClientWithResponses) CreateVolumeWithBodyWithResponse

func (c *ClientWithResponses) CreateVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVolumeResponse, error)

CreateVolumeWithBodyWithResponse request with arbitrary body returning *CreateVolumeResponse

func (*ClientWithResponses) CreateVolumeWithResponse

func (c *ClientWithResponses) CreateVolumeWithResponse(ctx context.Context, body CreateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVolumeResponse, error)

func (*ClientWithResponses) DeleteFloatingIPWithResponse

func (c *ClientWithResponses) DeleteFloatingIPWithResponse(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*DeleteFloatingIPResponse, error)

DeleteFloatingIPWithResponse request returning *DeleteFloatingIPResponse

func (*ClientWithResponses) DeleteInstanceWithResponse

func (c *ClientWithResponses) DeleteInstanceWithResponse(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*DeleteInstanceResponse, error)

DeleteInstanceWithResponse request returning *DeleteInstanceResponse

func (*ClientWithResponses) DeleteSSHKeyWithResponse

func (c *ClientWithResponses) DeleteSSHKeyWithResponse(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*DeleteSSHKeyResponse, error)

DeleteSSHKeyWithResponse request returning *DeleteSSHKeyResponse

func (*ClientWithResponses) DeleteSecurityGroupWithResponse

func (c *ClientWithResponses) DeleteSecurityGroupWithResponse(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error)

DeleteSecurityGroupWithResponse request returning *DeleteSecurityGroupResponse

func (*ClientWithResponses) DeleteSnapshotWithResponse

func (c *ClientWithResponses) DeleteSnapshotWithResponse(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*DeleteSnapshotResponse, error)

DeleteSnapshotWithResponse request returning *DeleteSnapshotResponse

func (*ClientWithResponses) DeleteVolumeWithResponse

func (c *ClientWithResponses) DeleteVolumeWithResponse(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*DeleteVolumeResponse, error)

DeleteVolumeWithResponse request returning *DeleteVolumeResponse

func (*ClientWithResponses) GetFloatingIPWithResponse

func (c *ClientWithResponses) GetFloatingIPWithResponse(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*GetFloatingIPResponse, error)

GetFloatingIPWithResponse request returning *GetFloatingIPResponse

func (*ClientWithResponses) GetInstanceWithResponse

func (c *ClientWithResponses) GetInstanceWithResponse(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*GetInstanceResponse, error)

GetInstanceWithResponse request returning *GetInstanceResponse

func (*ClientWithResponses) GetInstancesAvailabilityWithResponse

func (c *ClientWithResponses) GetInstancesAvailabilityWithResponse(ctx context.Context, region Region, params *GetInstancesAvailabilityParams, reqEditors ...RequestEditorFn) (*GetInstancesAvailabilityResponse, error)

GetInstancesAvailabilityWithResponse request returning *GetInstancesAvailabilityResponse

func (*ClientWithResponses) GetSSHKeyWithResponse

func (c *ClientWithResponses) GetSSHKeyWithResponse(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*GetSSHKeyResponse, error)

GetSSHKeyWithResponse request returning *GetSSHKeyResponse

func (*ClientWithResponses) GetSecurityGroupWithResponse

func (c *ClientWithResponses) GetSecurityGroupWithResponse(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*GetSecurityGroupResponse, error)

GetSecurityGroupWithResponse request returning *GetSecurityGroupResponse

func (*ClientWithResponses) GetSnapshotWithResponse

func (c *ClientWithResponses) GetSnapshotWithResponse(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*GetSnapshotResponse, error)

GetSnapshotWithResponse request returning *GetSnapshotResponse

func (*ClientWithResponses) GetVolumeWithResponse

func (c *ClientWithResponses) GetVolumeWithResponse(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*GetVolumeResponse, error)

GetVolumeWithResponse request returning *GetVolumeResponse

func (*ClientWithResponses) ListFloatingIPsWithResponse

func (c *ClientWithResponses) ListFloatingIPsWithResponse(ctx context.Context, params *ListFloatingIPsParams, reqEditors ...RequestEditorFn) (*ListFloatingIPsResponse, error)

ListFloatingIPsWithResponse request returning *ListFloatingIPsResponse

func (*ClientWithResponses) ListImagesWithResponse

func (c *ClientWithResponses) ListImagesWithResponse(ctx context.Context, params *ListImagesParams, reqEditors ...RequestEditorFn) (*ListImagesResponse, error)

ListImagesWithResponse request returning *ListImagesResponse

func (*ClientWithResponses) ListInstanceActionsWithResponse

func (c *ClientWithResponses) ListInstanceActionsWithResponse(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*ListInstanceActionsResponse, error)

ListInstanceActionsWithResponse request returning *ListInstanceActionsResponse

func (*ClientWithResponses) ListInstanceSnapshotsWithResponse

func (c *ClientWithResponses) ListInstanceSnapshotsWithResponse(ctx context.Context, instanceId string, params *ListInstanceSnapshotsParams, reqEditors ...RequestEditorFn) (*ListInstanceSnapshotsResponse, error)

ListInstanceSnapshotsWithResponse request returning *ListInstanceSnapshotsResponse

func (*ClientWithResponses) ListInstancesWithResponse

func (c *ClientWithResponses) ListInstancesWithResponse(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*ListInstancesResponse, error)

ListInstancesWithResponse request returning *ListInstancesResponse

func (*ClientWithResponses) ListSSHKeysWithResponse

func (c *ClientWithResponses) ListSSHKeysWithResponse(ctx context.Context, params *ListSSHKeysParams, reqEditors ...RequestEditorFn) (*ListSSHKeysResponse, error)

ListSSHKeysWithResponse request returning *ListSSHKeysResponse

func (*ClientWithResponses) ListSecurityGroupsWithResponse

func (c *ClientWithResponses) ListSecurityGroupsWithResponse(ctx context.Context, params *ListSecurityGroupsParams, reqEditors ...RequestEditorFn) (*ListSecurityGroupsResponse, error)

ListSecurityGroupsWithResponse request returning *ListSecurityGroupsResponse

func (*ClientWithResponses) ListSnapshotsWithResponse

func (c *ClientWithResponses) ListSnapshotsWithResponse(ctx context.Context, params *ListSnapshotsParams, reqEditors ...RequestEditorFn) (*ListSnapshotsResponse, error)

ListSnapshotsWithResponse request returning *ListSnapshotsResponse

func (*ClientWithResponses) ListVolumesWithResponse

func (c *ClientWithResponses) ListVolumesWithResponse(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*ListVolumesResponse, error)

ListVolumesWithResponse request returning *ListVolumesResponse

func (*ClientWithResponses) PerformInstanceActionWithBodyWithResponse

func (c *ClientWithResponses) PerformInstanceActionWithBodyWithResponse(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PerformInstanceActionResponse, error)

PerformInstanceActionWithBodyWithResponse request with arbitrary body returning *PerformInstanceActionResponse

func (*ClientWithResponses) PerformInstanceActionWithResponse

func (c *ClientWithResponses) PerformInstanceActionWithResponse(ctx context.Context, instanceId string, body PerformInstanceActionJSONRequestBody, reqEditors ...RequestEditorFn) (*PerformInstanceActionResponse, error)

func (*ClientWithResponses) UpdateInstanceWithBodyWithResponse

func (c *ClientWithResponses) UpdateInstanceWithBodyWithResponse(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInstanceResponse, error)

UpdateInstanceWithBodyWithResponse request with arbitrary body returning *UpdateInstanceResponse

func (*ClientWithResponses) UpdateInstanceWithResponse

func (c *ClientWithResponses) UpdateInstanceWithResponse(ctx context.Context, instanceId string, body UpdateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInstanceResponse, error)

func (*ClientWithResponses) UpdateSSHKeyWithBodyWithResponse

func (c *ClientWithResponses) UpdateSSHKeyWithBodyWithResponse(ctx context.Context, sshKeyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSSHKeyResponse, error)

UpdateSSHKeyWithBodyWithResponse request with arbitrary body returning *UpdateSSHKeyResponse

func (*ClientWithResponses) UpdateSSHKeyWithResponse

func (c *ClientWithResponses) UpdateSSHKeyWithResponse(ctx context.Context, sshKeyId string, body UpdateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSSHKeyResponse, error)

func (*ClientWithResponses) UpdateSecurityGroupWithBodyWithResponse

func (c *ClientWithResponses) UpdateSecurityGroupWithBodyWithResponse(ctx context.Context, securityGroupId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecurityGroupResponse, error)

UpdateSecurityGroupWithBodyWithResponse request with arbitrary body returning *UpdateSecurityGroupResponse

func (*ClientWithResponses) UpdateSecurityGroupWithResponse

func (c *ClientWithResponses) UpdateSecurityGroupWithResponse(ctx context.Context, securityGroupId string, body UpdateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecurityGroupResponse, error)

func (*ClientWithResponses) UpdateSnapshotWithBodyWithResponse

func (c *ClientWithResponses) UpdateSnapshotWithBodyWithResponse(ctx context.Context, snapshotId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSnapshotResponse, error)

UpdateSnapshotWithBodyWithResponse request with arbitrary body returning *UpdateSnapshotResponse

func (*ClientWithResponses) UpdateSnapshotWithResponse

func (c *ClientWithResponses) UpdateSnapshotWithResponse(ctx context.Context, snapshotId string, body UpdateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSnapshotResponse, error)

func (*ClientWithResponses) UpdateVolumeWithBodyWithResponse

func (c *ClientWithResponses) UpdateVolumeWithBodyWithResponse(ctx context.Context, volumeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateVolumeResponse, error)

UpdateVolumeWithBodyWithResponse request with arbitrary body returning *UpdateVolumeResponse

func (*ClientWithResponses) UpdateVolumeWithResponse

func (c *ClientWithResponses) UpdateVolumeWithResponse(ctx context.Context, volumeId string, body UpdateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateVolumeResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetInstancesAvailabilityWithResponse request
	GetInstancesAvailabilityWithResponse(ctx context.Context, region Region, params *GetInstancesAvailabilityParams, reqEditors ...RequestEditorFn) (*GetInstancesAvailabilityResponse, error)

	// ListFloatingIPsWithResponse request
	ListFloatingIPsWithResponse(ctx context.Context, params *ListFloatingIPsParams, reqEditors ...RequestEditorFn) (*ListFloatingIPsResponse, error)

	// CreateFloatingIPWithBodyWithResponse request with any body
	CreateFloatingIPWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFloatingIPResponse, error)

	CreateFloatingIPWithResponse(ctx context.Context, body CreateFloatingIPJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFloatingIPResponse, error)

	// DeleteFloatingIPWithResponse request
	DeleteFloatingIPWithResponse(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*DeleteFloatingIPResponse, error)

	// GetFloatingIPWithResponse request
	GetFloatingIPWithResponse(ctx context.Context, floatingIpId string, reqEditors ...RequestEditorFn) (*GetFloatingIPResponse, error)

	// ListImagesWithResponse request
	ListImagesWithResponse(ctx context.Context, params *ListImagesParams, reqEditors ...RequestEditorFn) (*ListImagesResponse, error)

	// ListInstancesWithResponse request
	ListInstancesWithResponse(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*ListInstancesResponse, error)

	// CreateInstanceWithBodyWithResponse request with any body
	CreateInstanceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)

	CreateInstanceWithResponse(ctx context.Context, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)

	// DeleteInstanceWithResponse request
	DeleteInstanceWithResponse(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*DeleteInstanceResponse, error)

	// GetInstanceWithResponse request
	GetInstanceWithResponse(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*GetInstanceResponse, error)

	// UpdateInstanceWithBodyWithResponse request with any body
	UpdateInstanceWithBodyWithResponse(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInstanceResponse, error)

	UpdateInstanceWithResponse(ctx context.Context, instanceId string, body UpdateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInstanceResponse, error)

	// ListInstanceActionsWithResponse request
	ListInstanceActionsWithResponse(ctx context.Context, instanceId string, reqEditors ...RequestEditorFn) (*ListInstanceActionsResponse, error)

	// PerformInstanceActionWithBodyWithResponse request with any body
	PerformInstanceActionWithBodyWithResponse(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PerformInstanceActionResponse, error)

	PerformInstanceActionWithResponse(ctx context.Context, instanceId string, body PerformInstanceActionJSONRequestBody, reqEditors ...RequestEditorFn) (*PerformInstanceActionResponse, error)

	// ListInstanceSnapshotsWithResponse request
	ListInstanceSnapshotsWithResponse(ctx context.Context, instanceId string, params *ListInstanceSnapshotsParams, reqEditors ...RequestEditorFn) (*ListInstanceSnapshotsResponse, error)

	// CreateSnapshotWithBodyWithResponse request with any body
	CreateSnapshotWithBodyWithResponse(ctx context.Context, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSnapshotResponse, error)

	CreateSnapshotWithResponse(ctx context.Context, instanceId string, body CreateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSnapshotResponse, error)

	// ListSecurityGroupsWithResponse request
	ListSecurityGroupsWithResponse(ctx context.Context, params *ListSecurityGroupsParams, reqEditors ...RequestEditorFn) (*ListSecurityGroupsResponse, error)

	// CreateSecurityGroupWithBodyWithResponse request with any body
	CreateSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSecurityGroupResponse, error)

	CreateSecurityGroupWithResponse(ctx context.Context, body CreateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSecurityGroupResponse, error)

	// DeleteSecurityGroupWithResponse request
	DeleteSecurityGroupWithResponse(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error)

	// GetSecurityGroupWithResponse request
	GetSecurityGroupWithResponse(ctx context.Context, securityGroupId string, reqEditors ...RequestEditorFn) (*GetSecurityGroupResponse, error)

	// UpdateSecurityGroupWithBodyWithResponse request with any body
	UpdateSecurityGroupWithBodyWithResponse(ctx context.Context, securityGroupId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSecurityGroupResponse, error)

	UpdateSecurityGroupWithResponse(ctx context.Context, securityGroupId string, body UpdateSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecurityGroupResponse, error)

	// ListSnapshotsWithResponse request
	ListSnapshotsWithResponse(ctx context.Context, params *ListSnapshotsParams, reqEditors ...RequestEditorFn) (*ListSnapshotsResponse, error)

	// DeleteSnapshotWithResponse request
	DeleteSnapshotWithResponse(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*DeleteSnapshotResponse, error)

	// GetSnapshotWithResponse request
	GetSnapshotWithResponse(ctx context.Context, snapshotId string, reqEditors ...RequestEditorFn) (*GetSnapshotResponse, error)

	// UpdateSnapshotWithBodyWithResponse request with any body
	UpdateSnapshotWithBodyWithResponse(ctx context.Context, snapshotId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSnapshotResponse, error)

	UpdateSnapshotWithResponse(ctx context.Context, snapshotId string, body UpdateSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSnapshotResponse, error)

	// ListSSHKeysWithResponse request
	ListSSHKeysWithResponse(ctx context.Context, params *ListSSHKeysParams, reqEditors ...RequestEditorFn) (*ListSSHKeysResponse, error)

	// CreateSSHKeyWithBodyWithResponse request with any body
	CreateSSHKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSSHKeyResponse, error)

	CreateSSHKeyWithResponse(ctx context.Context, body CreateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSSHKeyResponse, error)

	// DeleteSSHKeyWithResponse request
	DeleteSSHKeyWithResponse(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*DeleteSSHKeyResponse, error)

	// GetSSHKeyWithResponse request
	GetSSHKeyWithResponse(ctx context.Context, sshKeyId string, reqEditors ...RequestEditorFn) (*GetSSHKeyResponse, error)

	// UpdateSSHKeyWithBodyWithResponse request with any body
	UpdateSSHKeyWithBodyWithResponse(ctx context.Context, sshKeyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSSHKeyResponse, error)

	UpdateSSHKeyWithResponse(ctx context.Context, sshKeyId string, body UpdateSSHKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSSHKeyResponse, error)

	// ListVolumesWithResponse request
	ListVolumesWithResponse(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*ListVolumesResponse, error)

	// CreateVolumeWithBodyWithResponse request with any body
	CreateVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVolumeResponse, error)

	CreateVolumeWithResponse(ctx context.Context, body CreateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVolumeResponse, error)

	// DeleteVolumeWithResponse request
	DeleteVolumeWithResponse(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*DeleteVolumeResponse, error)

	// GetVolumeWithResponse request
	GetVolumeWithResponse(ctx context.Context, volumeId string, reqEditors ...RequestEditorFn) (*GetVolumeResponse, error)

	// UpdateVolumeWithBodyWithResponse request with any body
	UpdateVolumeWithBodyWithResponse(ctx context.Context, volumeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateVolumeResponse, error)

	UpdateVolumeWithResponse(ctx context.Context, volumeId string, body UpdateVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateVolumeResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateFloatingIPJSONBody

type CreateFloatingIPJSONBody struct {
	// Description The human-readable description set for the volume.
	Description *string `json:"description,omitempty"`

	// IsPublic Whether the floating IP is public or private.
	IsPublic bool `json:"is_public"`

	// Name The human-readable name set for the volume.
	Name string `json:"name"`

	// Region The region identifier.
	Region Region `json:"region"`

	// Version The IP version of the floating IP.
	Version CreateFloatingIPJSONBodyVersion `json:"version"`
}

CreateFloatingIPJSONBody defines parameters for CreateFloatingIP.

type CreateFloatingIPJSONBodyVersion

type CreateFloatingIPJSONBodyVersion string

CreateFloatingIPJSONBodyVersion defines parameters for CreateFloatingIP.

const (
	CreateFloatingIPJSONBodyVersionIpv4 CreateFloatingIPJSONBodyVersion = "ipv4"
	CreateFloatingIPJSONBodyVersionIpv6 CreateFloatingIPJSONBodyVersion = "ipv6"
)

Defines values for CreateFloatingIPJSONBodyVersion.

type CreateFloatingIPJSONRequestBody

type CreateFloatingIPJSONRequestBody CreateFloatingIPJSONBody

CreateFloatingIPJSONRequestBody defines body for CreateFloatingIP for application/json ContentType.

type CreateFloatingIPResponse

type CreateFloatingIPResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SingleFloatingIPResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateFloatingIPResponse

func ParseCreateFloatingIPResponse(rsp *http.Response) (*CreateFloatingIPResponse, error)

ParseCreateFloatingIPResponse parses an HTTP response from a CreateFloatingIPWithResponse call

func (CreateFloatingIPResponse) Status

func (r CreateFloatingIPResponse) Status() string

Status returns HTTPResponse.Status

func (CreateFloatingIPResponse) StatusCode

func (r CreateFloatingIPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateInstanceJSONBody

type CreateInstanceJSONBody struct {
	// Hostname The hostname of your instance.
	Hostname InstanceHostname `json:"hostname"`

	// Image A unique number that can be used to identify and reference a specific image.
	Image ImageId `json:"image"`

	// IsProtected Specifies if the instance is termination protected.
	// When set to `true`, it"s not possible to destroy the instance until it"s switched to `false`.
	// Set to `true` automatically for long-term billed instances.
	IsProtected *InstanceIsProtected `json:"is_protected,omitempty"`

	// Metadata Option to provide metadata.
	Metadata *struct {
		// StartupScript A plain text bash script or "cloud-config" file that will be executed after the first instance boot.
		// It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the **NVIDIA GPU driver**.
		// Learn more about [startup scripts and installing the GPU driver](https://support.com/support/solutions/articles/47001122478).
		StartupScript *string           `json:"startup_script,omitempty"`
		UserData      *InstanceUserData `json:"userData,omitempty"`
	} `json:"metadata,omitempty"`

	// Name The human-readable name set for the instance.
	Name InstanceName `json:"name"`

	// Password The password to access the instance.
	// Your password must have upper and lower chars, digits and length between 8-72.
	// **Please Note**: Only one of `ssh_keys` or `password` can be provided.
	// Password is less secure - we recommend you use an SSH key-pair.
	Password *string `json:"password,omitempty"`

	// PlacementOption The placement option identifier in which instances are physically located relative to each other within a zone.
	PlacementOption *string `json:"placement_option,omitempty"`

	// PublicIpType When set to `static`, the instance's public IP will not change between start and stop actions.
	PublicIpType *InstancePublicIPType `json:"public_ip_type,omitempty"`

	// Region The region identifier.
	Region Region `json:"region"`

	// SecurityGroups An array of security group ids.
	// **Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups.
	// You can override this behavior by providing a different Security Group.
	SecurityGroups *InstanceSecurityGroupIds `json:"security_groups,omitempty"`

	// SshKeys An array of ssh key ids.
	// This should not be provided if `password` authentication method is desired.
	SshKeys *[]InstanceSSHKeyId `json:"ssh_keys,omitempty"`

	// Type The instance type identifier.
	Type InstanceType `json:"type"`

	// Volumes An array of volume ids.
	Volumes *[]VolumeId `json:"volumes,omitempty"`
}

CreateInstanceJSONBody defines parameters for CreateInstance.

type CreateInstanceJSONRequestBody

type CreateInstanceJSONRequestBody CreateInstanceJSONBody

CreateInstanceJSONRequestBody defines body for CreateInstance for application/json ContentType.

type CreateInstanceResponse

type CreateInstanceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SingleInstanceResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateInstanceResponse

func ParseCreateInstanceResponse(rsp *http.Response) (*CreateInstanceResponse, error)

ParseCreateInstanceResponse parses an HTTP response from a CreateInstanceWithResponse call

func (CreateInstanceResponse) Status

func (r CreateInstanceResponse) Status() string

Status returns HTTPResponse.Status

func (CreateInstanceResponse) StatusCode

func (r CreateInstanceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSSHKeyJSONBody

type CreateSSHKeyJSONBody struct {
	// Name The human-readable name for your ssh key.
	Name string `json:"name"`

	// Value SSH public key
	Value string `json:"value"`
}

CreateSSHKeyJSONBody defines parameters for CreateSSHKey.

type CreateSSHKeyJSONRequestBody

type CreateSSHKeyJSONRequestBody CreateSSHKeyJSONBody

CreateSSHKeyJSONRequestBody defines body for CreateSSHKey for application/json ContentType.

type CreateSSHKeyResponse

type CreateSSHKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SingleSSHKeyResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateSSHKeyResponse

func ParseCreateSSHKeyResponse(rsp *http.Response) (*CreateSSHKeyResponse, error)

ParseCreateSSHKeyResponse parses an HTTP response from a CreateSSHKeyWithResponse call

func (CreateSSHKeyResponse) Status

func (r CreateSSHKeyResponse) Status() string

Status returns HTTPResponse.Status

func (CreateSSHKeyResponse) StatusCode

func (r CreateSSHKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSecurityGroupJSONBody

type CreateSecurityGroupJSONBody struct {
	// Description he human-readable description set for the security group.
	Description *string `json:"description,omitempty"`

	// Name The human-readable name set for the security group. **Please Note**: `default` and `standard` are not allowed names (reserved words).
	Name string `json:"name"`

	// Region The region identifier.
	Region Region `json:"region"`

	// Rules The list of rules of the security group.
	Rules []SecurityGroupRule `json:"rules"`
}

CreateSecurityGroupJSONBody defines parameters for CreateSecurityGroup.

type CreateSecurityGroupJSONRequestBody

type CreateSecurityGroupJSONRequestBody CreateSecurityGroupJSONBody

CreateSecurityGroupJSONRequestBody defines body for CreateSecurityGroup for application/json ContentType.

type CreateSecurityGroupResponse

type CreateSecurityGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SingleSecurityGroupResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateSecurityGroupResponse

func ParseCreateSecurityGroupResponse(rsp *http.Response) (*CreateSecurityGroupResponse, error)

ParseCreateSecurityGroupResponse parses an HTTP response from a CreateSecurityGroupWithResponse call

func (CreateSecurityGroupResponse) Status

Status returns HTTPResponse.Status

func (CreateSecurityGroupResponse) StatusCode

func (r CreateSecurityGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSnapshotJSONBody

type CreateSnapshotJSONBody struct {
	// Name Name of the snapshot
	Name string `json:"name"`
}

CreateSnapshotJSONBody defines parameters for CreateSnapshot.

type CreateSnapshotJSONRequestBody

type CreateSnapshotJSONRequestBody CreateSnapshotJSONBody

CreateSnapshotJSONRequestBody defines body for CreateSnapshot for application/json ContentType.

type CreateSnapshotResponse

type CreateSnapshotResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SingleSnapshotResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateSnapshotResponse

func ParseCreateSnapshotResponse(rsp *http.Response) (*CreateSnapshotResponse, error)

ParseCreateSnapshotResponse parses an HTTP response from a CreateSnapshotWithResponse call

func (CreateSnapshotResponse) Status

func (r CreateSnapshotResponse) Status() string

Status returns HTTPResponse.Status

func (CreateSnapshotResponse) StatusCode

func (r CreateSnapshotResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateVolumeJSONBody

type CreateVolumeJSONBody struct {
	// Description The human-readable description set for the volume.
	Description *string `json:"description,omitempty"`

	// Name The human-readable name set for the volume.
	Name string `json:"name"`

	// Region The region identifier.
	Region Region `json:"region"`

	// Size The storage size of this volume given in GiB (Min: 1GiB).
	Size int `json:"size"`

	// Type The volume type.
	Type *VolumeType `json:"type,omitempty"`
}

CreateVolumeJSONBody defines parameters for CreateVolume.

type CreateVolumeJSONRequestBody

type CreateVolumeJSONRequestBody CreateVolumeJSONBody

CreateVolumeJSONRequestBody defines body for CreateVolume for application/json ContentType.

type CreateVolumeResponse

type CreateVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SingleVolumeResponse
	JSONDefault  *ErrorResponse
}

func ParseCreateVolumeResponse

func ParseCreateVolumeResponse(rsp *http.Response) (*CreateVolumeResponse, error)

ParseCreateVolumeResponse parses an HTTP response from a CreateVolumeWithResponse call

func (CreateVolumeResponse) Status

func (r CreateVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (CreateVolumeResponse) StatusCode

func (r CreateVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteFloatingIPResponse

type DeleteFloatingIPResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParseDeleteFloatingIPResponse

func ParseDeleteFloatingIPResponse(rsp *http.Response) (*DeleteFloatingIPResponse, error)

ParseDeleteFloatingIPResponse parses an HTTP response from a DeleteFloatingIPWithResponse call

func (DeleteFloatingIPResponse) Status

func (r DeleteFloatingIPResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteFloatingIPResponse) StatusCode

func (r DeleteFloatingIPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteInstanceResponse

type DeleteInstanceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParseDeleteInstanceResponse

func ParseDeleteInstanceResponse(rsp *http.Response) (*DeleteInstanceResponse, error)

ParseDeleteInstanceResponse parses an HTTP response from a DeleteInstanceWithResponse call

func (DeleteInstanceResponse) Status

func (r DeleteInstanceResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteInstanceResponse) StatusCode

func (r DeleteInstanceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSSHKeyResponse

type DeleteSSHKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParseDeleteSSHKeyResponse

func ParseDeleteSSHKeyResponse(rsp *http.Response) (*DeleteSSHKeyResponse, error)

ParseDeleteSSHKeyResponse parses an HTTP response from a DeleteSSHKeyWithResponse call

func (DeleteSSHKeyResponse) Status

func (r DeleteSSHKeyResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSSHKeyResponse) StatusCode

func (r DeleteSSHKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSecurityGroupResponse

type DeleteSecurityGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParseDeleteSecurityGroupResponse

func ParseDeleteSecurityGroupResponse(rsp *http.Response) (*DeleteSecurityGroupResponse, error)

ParseDeleteSecurityGroupResponse parses an HTTP response from a DeleteSecurityGroupWithResponse call

func (DeleteSecurityGroupResponse) Status

Status returns HTTPResponse.Status

func (DeleteSecurityGroupResponse) StatusCode

func (r DeleteSecurityGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSnapshotResponse

type DeleteSnapshotResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParseDeleteSnapshotResponse

func ParseDeleteSnapshotResponse(rsp *http.Response) (*DeleteSnapshotResponse, error)

ParseDeleteSnapshotResponse parses an HTTP response from a DeleteSnapshotWithResponse call

func (DeleteSnapshotResponse) Status

func (r DeleteSnapshotResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSnapshotResponse) StatusCode

func (r DeleteSnapshotResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteVolumeResponse

type DeleteVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParseDeleteVolumeResponse

func ParseDeleteVolumeResponse(rsp *http.Response) (*DeleteVolumeResponse, error)

ParseDeleteVolumeResponse parses an HTTP response from a DeleteVolumeWithResponse call

func (DeleteVolumeResponse) Status

func (r DeleteVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteVolumeResponse) StatusCode

func (r DeleteVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	// Code The Genesis Cloud error code.
	// Check the [developer documentation](https://developers.com/#error-codes) for more information on error codes.
	Code string `json:"code"`

	// Message An explanation of what went wrong.
	Message string `json:"message"`
}

Error defines model for Error.

type ErrorResponse

type ErrorResponse = Error

ErrorResponse defines model for ErrorResponse.

type FloatingIP

type FloatingIP struct {
	CreatedAt Timestamp `json:"created_at"`

	// Description The human-readable description for the floating IP.
	Description string `json:"description"`

	// Id A unique identifier for each floating IP. This is automatically generated.
	Id string `json:"id"`

	// IpAddress The IP address of the floating IP.
	IpAddress *string `json:"ip_address,omitempty"`

	// IsPublic A boolean value indicating whether the floating IP is public or private.
	IsPublic bool `json:"is_public"`

	// Name The human-readable name for the floating IP.
	Name string `json:"name"`

	// Region The region identifier.
	Region    Region    `json:"region"`
	UpdatedAt Timestamp `json:"updated_at"`

	// Version The IP version of the floating IP.
	Version *FloatingIPVersion `json:"version,omitempty"`
}

FloatingIP defines model for FloatingIP.

type FloatingIPVersion

type FloatingIPVersion string

FloatingIPVersion The IP version of the floating IP.

const (
	FloatingIPVersionIpv4 FloatingIPVersion = "ipv4"
	FloatingIPVersionIpv6 FloatingIPVersion = "ipv6"
)

Defines values for FloatingIPVersion.

type GetFloatingIPResponse

type GetFloatingIPResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleFloatingIPResponse
	JSONDefault  *ErrorResponse
}

func ParseGetFloatingIPResponse

func ParseGetFloatingIPResponse(rsp *http.Response) (*GetFloatingIPResponse, error)

ParseGetFloatingIPResponse parses an HTTP response from a GetFloatingIPWithResponse call

func (GetFloatingIPResponse) Status

func (r GetFloatingIPResponse) Status() string

Status returns HTTPResponse.Status

func (GetFloatingIPResponse) StatusCode

func (r GetFloatingIPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInstanceResponse

type GetInstanceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleInstanceResponse
	JSONDefault  *ErrorResponse
}

func ParseGetInstanceResponse

func ParseGetInstanceResponse(rsp *http.Response) (*GetInstanceResponse, error)

ParseGetInstanceResponse parses an HTTP response from a GetInstanceWithResponse call

func (GetInstanceResponse) Status

func (r GetInstanceResponse) Status() string

Status returns HTTPResponse.Status

func (GetInstanceResponse) StatusCode

func (r GetInstanceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInstancesAvailabilityParams

type GetInstancesAvailabilityParams struct {
	Placement *string `form:"placement,omitempty" json:"placement,omitempty"`
}

GetInstancesAvailabilityParams defines parameters for GetInstancesAvailability.

type GetInstancesAvailabilityResponse

type GetInstancesAvailabilityResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InstancesAvailabilityResponse
	JSONDefault  *ErrorResponse
}

func ParseGetInstancesAvailabilityResponse

func ParseGetInstancesAvailabilityResponse(rsp *http.Response) (*GetInstancesAvailabilityResponse, error)

ParseGetInstancesAvailabilityResponse parses an HTTP response from a GetInstancesAvailabilityWithResponse call

func (GetInstancesAvailabilityResponse) Status

Status returns HTTPResponse.Status

func (GetInstancesAvailabilityResponse) StatusCode

func (r GetInstancesAvailabilityResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSSHKeyResponse

type GetSSHKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleSSHKeyResponse
	JSONDefault  *ErrorResponse
}

func ParseGetSSHKeyResponse

func ParseGetSSHKeyResponse(rsp *http.Response) (*GetSSHKeyResponse, error)

ParseGetSSHKeyResponse parses an HTTP response from a GetSSHKeyWithResponse call

func (GetSSHKeyResponse) Status

func (r GetSSHKeyResponse) Status() string

Status returns HTTPResponse.Status

func (GetSSHKeyResponse) StatusCode

func (r GetSSHKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSecurityGroupResponse

type GetSecurityGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleSecurityGroupResponse
	JSONDefault  *ErrorResponse
}

func ParseGetSecurityGroupResponse

func ParseGetSecurityGroupResponse(rsp *http.Response) (*GetSecurityGroupResponse, error)

ParseGetSecurityGroupResponse parses an HTTP response from a GetSecurityGroupWithResponse call

func (GetSecurityGroupResponse) Status

func (r GetSecurityGroupResponse) Status() string

Status returns HTTPResponse.Status

func (GetSecurityGroupResponse) StatusCode

func (r GetSecurityGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSnapshotResponse

type GetSnapshotResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleSnapshotResponse
	JSONDefault  *ErrorResponse
}

func ParseGetSnapshotResponse

func ParseGetSnapshotResponse(rsp *http.Response) (*GetSnapshotResponse, error)

ParseGetSnapshotResponse parses an HTTP response from a GetSnapshotWithResponse call

func (GetSnapshotResponse) Status

func (r GetSnapshotResponse) Status() string

Status returns HTTPResponse.Status

func (GetSnapshotResponse) StatusCode

func (r GetSnapshotResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVolumeResponse

type GetVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleVolumeResponse
	JSONDefault  *ErrorResponse
}

func ParseGetVolumeResponse

func ParseGetVolumeResponse(rsp *http.Response) (*GetVolumeResponse, error)

ParseGetVolumeResponse parses an HTTP response from a GetVolumeWithResponse call

func (GetVolumeResponse) Status

func (r GetVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (GetVolumeResponse) StatusCode

func (r GetVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Image

type Image struct {
	CreatedAt Timestamp `json:"created_at"`

	// Id A unique number that can be used to identify and reference a specific image.
	Id ImageId `json:"id"`

	// Name The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.
	Name string `json:"name"`

	// Regions The list of regions in which this image can be used in.
	Regions []Region `json:"regions"`

	// Type Describes the kind of image.
	Type ImageType `json:"type"`
}

Image defines model for Image.

type ImageId

type ImageId = string

ImageId A unique number that can be used to identify and reference a specific image.

type ImageType

type ImageType string

ImageType Describes the kind of image.

const (
	ImageTypeBaseOs        ImageType = "base-os"
	ImageTypePreconfigured ImageType = "preconfigured"
	ImageTypeSnapshot      ImageType = "snapshot"
)

Defines values for ImageType.

type Instance

type Instance struct {
	CreatedAt Timestamp `json:"created_at"`

	// Hostname The hostname of your instance.
	Hostname InstanceHostname `json:"hostname"`

	// Id The unique ID of the instance.
	Id string `json:"id"`

	// Image The image of the instance.
	Image struct {
		// Id A unique number that can be used to identify and reference a specific image.
		Id ImageId `json:"id"`

		// Name The image name.
		Name string `json:"name"`
	} `json:"image"`

	// Name The human-readable name set for the instance.
	Name InstanceName `json:"name"`

	// PlacementOption The placement option identifier in which instances are physically located relative to each other within a zone.
	PlacementOption string `json:"placement_option"`

	// PrivateIp The private IPv4 IP-Address (IPv4 address).
	PrivateIp *string `json:"private_ip"`

	// PublicIp The public IPv4 IP-Address (IPv4 address).
	PublicIp *string `json:"public_ip"`

	// PublicIpType When set to `static`, the instance's public IP will not change between start and stop actions.
	PublicIpType InstancePublicIPType `json:"public_ip_type"`

	// Region The region identifier.
	Region Region `json:"region"`

	// SecurityGroups The security groups of the instance.
	SecurityGroups []struct {
		// Id The security group ID.
		Id InstanceSecurityGroupId `json:"id"`

		// Name The name of the security group.
		Name string `json:"name"`
	} `json:"security_groups"`

	// SshKeys The ssh keys of the instance.
	SshKeys []struct {
		// Id The ssh key ID.
		Id InstanceSSHKeyId `json:"id"`

		// Name The name of the ssh key.
		Name string `json:"name"`
	} `json:"ssh_keys"`

	// Status The instance status
	Status InstanceStatus `json:"status"`

	// Type The instance type identifier.
	Type      InstanceType `json:"type"`
	UpdatedAt Timestamp    `json:"updated_at"`

	// Volumes The volumes of the instance
	Volumes []struct {
		// Id A unique identifier for each volume. This is automatically generated.
		Id VolumeId `json:"id"`

		// Name The volume name.
		Name string `json:"name"`
	} `json:"volumes"`
}

Instance defines model for Instance.

type InstanceAction

type InstanceAction string

InstanceAction defines model for Instance.Action.

const (
	InstanceActionReset InstanceAction = "reset"
	InstanceActionStart InstanceAction = "start"
	InstanceActionStop  InstanceAction = "stop"
)

Defines values for InstanceAction.

type InstanceHostname

type InstanceHostname = string

InstanceHostname The hostname of your instance.

type InstanceIsProtected

type InstanceIsProtected = bool

InstanceIsProtected Specifies if the instance is termination protected. When set to `true`, it"s not possible to destroy the instance until it"s switched to `false`. Set to `true` automatically for long-term billed instances.

type InstanceListActionsResponse

type InstanceListActionsResponse struct {
	Actions []InstanceAction `json:"actions"`
}

InstanceListActionsResponse defines model for Instance.ListActionsResponse.

type InstanceName

type InstanceName = string

InstanceName The human-readable name set for the instance.

type InstancePublicIPType

type InstancePublicIPType string

InstancePublicIPType When set to `static`, the instance's public IP will not change between start and stop actions.

const (
	InstancePublicIPTypeDynamic InstancePublicIPType = "dynamic"
	InstancePublicIPTypeStatic  InstancePublicIPType = "static"
)

Defines values for InstancePublicIPType.

type InstanceSSHKeyId

type InstanceSSHKeyId = string

InstanceSSHKeyId The ssh key ID.

type InstanceSecurityGroupId

type InstanceSecurityGroupId = string

InstanceSecurityGroupId The security group ID.

type InstanceSecurityGroupIds

type InstanceSecurityGroupIds = []InstanceSecurityGroupId

InstanceSecurityGroupIds An array of security group ids. **Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups. You can override this behavior by providing a different Security Group.

type InstanceStatus

type InstanceStatus string

InstanceStatus The instance status

const (
	InstanceStatusActive         InstanceStatus = "active"
	InstanceStatusBuild          InstanceStatus = "build"
	InstanceStatusCopying        InstanceStatus = "copying"
	InstanceStatusCreating       InstanceStatus = "creating"
	InstanceStatusDeleting       InstanceStatus = "deleting"
	InstanceStatusEnqueued       InstanceStatus = "enqueued"
	InstanceStatusError          InstanceStatus = "error"
	InstanceStatusPendingPayment InstanceStatus = "pending_payment"
	InstanceStatusResetting      InstanceStatus = "resetting"
	InstanceStatusRestarting     InstanceStatus = "restarting"
	InstanceStatusShutoff        InstanceStatus = "shutoff"
	InstanceStatusStarting       InstanceStatus = "starting"
	InstanceStatusStopped        InstanceStatus = "stopped"
	InstanceStatusStopping       InstanceStatus = "stopping"
	InstanceStatusUnknown        InstanceStatus = "unknown"
	InstanceStatusUpdating       InstanceStatus = "updating"
)

Defines values for InstanceStatus.

type InstanceType

type InstanceType = string

InstanceType The instance type identifier.

type InstanceUserData

type InstanceUserData = []struct {
	Content  string  `json:"content"`
	Filename *string `json:"filename,omitempty"`
	Type     string  `json:"type"`
}

InstanceUserData defines model for Instance.UserData.

type InstancesAvailability

type InstancesAvailability struct {
	Availability struct {
		InstanceTypes []struct {
			Available bool     `json:"available"`
			Count     *float32 `json:"count,omitempty"`

			// Type The instance type identifier.
			Type InstanceType `json:"type"`
		} `json:"instance_types"`
		Placement *string `json:"placement,omitempty"`

		// Region The region identifier.
		Region Region `json:"region"`
		Type   string `json:"type"`
	} `json:"availability"`
}

InstancesAvailability defines model for InstancesAvailability.

type InstancesAvailabilityResponse

type InstancesAvailabilityResponse = InstancesAvailability

InstancesAvailabilityResponse defines model for InstancesAvailabilityResponse.

type ListFloatingIPsParams

type ListFloatingIPsParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListFloatingIPsParams defines parameters for ListFloatingIPs.

type ListFloatingIPsResponse

type ListFloatingIPsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedFloatingIPsResponse
	JSONDefault  *ErrorResponse
}

func ParseListFloatingIPsResponse

func ParseListFloatingIPsResponse(rsp *http.Response) (*ListFloatingIPsResponse, error)

ParseListFloatingIPsResponse parses an HTTP response from a ListFloatingIPsWithResponse call

func (ListFloatingIPsResponse) Status

func (r ListFloatingIPsResponse) Status() string

Status returns HTTPResponse.Status

func (ListFloatingIPsResponse) StatusCode

func (r ListFloatingIPsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListImagesParams

type ListImagesParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
	Type    *ImageType             `form:"type,omitempty" json:"type,omitempty"`
}

ListImagesParams defines parameters for ListImages.

type ListImagesResponse

type ListImagesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedImagesResponse
	JSONDefault  *ErrorResponse
}

func ParseListImagesResponse

func ParseListImagesResponse(rsp *http.Response) (*ListImagesResponse, error)

ParseListImagesResponse parses an HTTP response from a ListImagesWithResponse call

func (ListImagesResponse) Status

func (r ListImagesResponse) Status() string

Status returns HTTPResponse.Status

func (ListImagesResponse) StatusCode

func (r ListImagesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInstanceActionsResponse

type ListInstanceActionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InstanceListActionsResponse
	JSONDefault  *ErrorResponse
}

func ParseListInstanceActionsResponse

func ParseListInstanceActionsResponse(rsp *http.Response) (*ListInstanceActionsResponse, error)

ParseListInstanceActionsResponse parses an HTTP response from a ListInstanceActionsWithResponse call

func (ListInstanceActionsResponse) Status

Status returns HTTPResponse.Status

func (ListInstanceActionsResponse) StatusCode

func (r ListInstanceActionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInstanceSnapshotsParams

type ListInstanceSnapshotsParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListInstanceSnapshotsParams defines parameters for ListInstanceSnapshots.

type ListInstanceSnapshotsResponse

type ListInstanceSnapshotsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedSnapshotsResponse
	JSONDefault  *ErrorResponse
}

func ParseListInstanceSnapshotsResponse

func ParseListInstanceSnapshotsResponse(rsp *http.Response) (*ListInstanceSnapshotsResponse, error)

ParseListInstanceSnapshotsResponse parses an HTTP response from a ListInstanceSnapshotsWithResponse call

func (ListInstanceSnapshotsResponse) Status

Status returns HTTPResponse.Status

func (ListInstanceSnapshotsResponse) StatusCode

func (r ListInstanceSnapshotsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInstancesParams

type ListInstancesParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListInstancesParams defines parameters for ListInstances.

type ListInstancesResponse

type ListInstancesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedInstancesResponse
	JSONDefault  *ErrorResponse
}

func ParseListInstancesResponse

func ParseListInstancesResponse(rsp *http.Response) (*ListInstancesResponse, error)

ParseListInstancesResponse parses an HTTP response from a ListInstancesWithResponse call

func (ListInstancesResponse) Status

func (r ListInstancesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInstancesResponse) StatusCode

func (r ListInstancesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSSHKeysParams

type ListSSHKeysParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListSSHKeysParams defines parameters for ListSSHKeys.

type ListSSHKeysResponse

type ListSSHKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedSSHKeysResponse
	JSONDefault  *ErrorResponse
}

func ParseListSSHKeysResponse

func ParseListSSHKeysResponse(rsp *http.Response) (*ListSSHKeysResponse, error)

ParseListSSHKeysResponse parses an HTTP response from a ListSSHKeysWithResponse call

func (ListSSHKeysResponse) Status

func (r ListSSHKeysResponse) Status() string

Status returns HTTPResponse.Status

func (ListSSHKeysResponse) StatusCode

func (r ListSSHKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSecurityGroupsParams

type ListSecurityGroupsParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListSecurityGroupsParams defines parameters for ListSecurityGroups.

type ListSecurityGroupsResponse

type ListSecurityGroupsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedSecurityGroupsResponse
	JSONDefault  *ErrorResponse
}

func ParseListSecurityGroupsResponse

func ParseListSecurityGroupsResponse(rsp *http.Response) (*ListSecurityGroupsResponse, error)

ParseListSecurityGroupsResponse parses an HTTP response from a ListSecurityGroupsWithResponse call

func (ListSecurityGroupsResponse) Status

Status returns HTTPResponse.Status

func (ListSecurityGroupsResponse) StatusCode

func (r ListSecurityGroupsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSnapshotsParams

type ListSnapshotsParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListSnapshotsParams defines parameters for ListSnapshots.

type ListSnapshotsResponse

type ListSnapshotsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedSnapshotsResponse
	JSONDefault  *ErrorResponse
}

func ParseListSnapshotsResponse

func ParseListSnapshotsResponse(rsp *http.Response) (*ListSnapshotsResponse, error)

ParseListSnapshotsResponse parses an HTTP response from a ListSnapshotsWithResponse call

func (ListSnapshotsResponse) Status

func (r ListSnapshotsResponse) Status() string

Status returns HTTPResponse.Status

func (ListSnapshotsResponse) StatusCode

func (r ListSnapshotsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListVolumesParams

type ListVolumesParams struct {
	Page    *PageQueryParameter    `form:"page,omitempty" json:"page,omitempty"`
	PerPage *PerPageQueryParameter `form:"per_page,omitempty" json:"per_page,omitempty"`
}

ListVolumesParams defines parameters for ListVolumes.

type ListVolumesResponse

type ListVolumesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedVolumesResponse
	JSONDefault  *ErrorResponse
}

func ParseListVolumesResponse

func ParseListVolumesResponse(rsp *http.Response) (*ListVolumesResponse, error)

ParseListVolumesResponse parses an HTTP response from a ListVolumesWithResponse call

func (ListVolumesResponse) Status

func (r ListVolumesResponse) Status() string

Status returns HTTPResponse.Status

func (ListVolumesResponse) StatusCode

func (r ListVolumesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PageQueryParameter

type PageQueryParameter = int

PageQueryParameter A positive integer to choose the page to return.

type PaginatedFloatingIPsResponse

type PaginatedFloatingIPsResponse struct {
	FloatingIps []FloatingIP `json:"floating_ips"`
	Page        int          `json:"page"`
	PerPage     int          `json:"per_page"`
	TotalCount  int          `json:"total_count"`
}

PaginatedFloatingIPsResponse defines model for PaginatedFloatingIPsResponse.

type PaginatedImagesResponse

type PaginatedImagesResponse struct {
	Images     []Image `json:"images"`
	Page       int     `json:"page"`
	PerPage    int     `json:"per_page"`
	TotalCount int     `json:"total_count"`
}

PaginatedImagesResponse defines model for PaginatedImagesResponse.

type PaginatedInstancesResponse

type PaginatedInstancesResponse struct {
	Instances  []Instance `json:"instances"`
	Page       int        `json:"page"`
	PerPage    int        `json:"per_page"`
	TotalCount int        `json:"total_count"`
}

PaginatedInstancesResponse defines model for PaginatedInstancesResponse.

type PaginatedSSHKeysResponse

type PaginatedSSHKeysResponse struct {
	Page       int      `json:"page"`
	PerPage    int      `json:"per_page"`
	SshKeys    []SSHKey `json:"ssh_keys"`
	TotalCount int      `json:"total_count"`
}

PaginatedSSHKeysResponse defines model for PaginatedSSHKeysResponse.

type PaginatedSecurityGroupsResponse

type PaginatedSecurityGroupsResponse struct {
	Page           int             `json:"page"`
	PerPage        int             `json:"per_page"`
	SecurityGroups []SecurityGroup `json:"security_groups"`
	TotalCount     int             `json:"total_count"`
}

PaginatedSecurityGroupsResponse defines model for PaginatedSecurityGroupsResponse.

type PaginatedSnapshotsResponse

type PaginatedSnapshotsResponse struct {
	Page       int        `json:"page"`
	PerPage    int        `json:"per_page"`
	Snapshots  []Snapshot `json:"snapshots"`
	TotalCount int        `json:"total_count"`
}

PaginatedSnapshotsResponse defines model for PaginatedSnapshotsResponse.

type PaginatedVolumesResponse

type PaginatedVolumesResponse struct {
	Page       int      `json:"page"`
	PerPage    int      `json:"per_page"`
	TotalCount int      `json:"total_count"`
	Volumes    []Volume `json:"volumes"`
}

PaginatedVolumesResponse defines model for PaginatedVolumesResponse.

type PerPageQueryParameter

type PerPageQueryParameter = int

PerPageQueryParameter A positive integer lower or equal to 100 to select the number of items to return.

type PerformInstanceActionJSONBody

type PerformInstanceActionJSONBody struct {
	Action InstanceAction `json:"action"`
}

PerformInstanceActionJSONBody defines parameters for PerformInstanceAction.

type PerformInstanceActionJSONRequestBody

type PerformInstanceActionJSONRequestBody PerformInstanceActionJSONBody

PerformInstanceActionJSONRequestBody defines body for PerformInstanceAction for application/json ContentType.

type PerformInstanceActionResponse

type PerformInstanceActionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *ErrorResponse
}

func ParsePerformInstanceActionResponse

func ParsePerformInstanceActionResponse(rsp *http.Response) (*PerformInstanceActionResponse, error)

ParsePerformInstanceActionResponse parses an HTTP response from a PerformInstanceActionWithResponse call

func (PerformInstanceActionResponse) Status

Status returns HTTPResponse.Status

func (PerformInstanceActionResponse) StatusCode

func (r PerformInstanceActionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Region

type Region string

Region The region identifier.

const (
	RegionARCISHAF1  Region = "ARC-IS-HAF-1"
	RegionEUCDEMUC1  Region = "EUC-DE-MUC-1"
	RegionNORDNOKRS1 Region = "NORD-NO-KRS-1"
)

Defines values for Region.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SSHKey

type SSHKey struct {
	CreatedAt Timestamp `json:"created_at"`

	// Fingerprint The fingerprint of the SSH key.
	Fingerprint string `json:"fingerprint"`

	// Id A unique identifier for each SSH key. This is automatically generated.
	Id string `json:"id"`

	// Name The human-readable name for the SSH key.
	Name string `json:"name"`

	// Size The length of the SSH key.
	Size int `json:"size"`

	// Type The encryption algorithm type of the SSH key.
	Type      string    `json:"type"`
	UpdatedAt Timestamp `json:"updated_at"`

	// Value SSH public key.
	Value string `json:"value"`
}

SSHKey defines model for SSHKey.

type SecurityGroup

type SecurityGroup struct {
	CreatedAt Timestamp `json:"created_at"`

	// Description The human-readable description for the security group.
	Description string `json:"description"`

	// Id A unique identifier for each security group. This is automatically generated.
	Id         string `json:"id"`
	IsInternal bool   `json:"is_internal"`

	// Name The human-readable name for the security group.
	Name string `json:"name"`

	// Region The region identifier.
	Region Region              `json:"region"`
	Rules  []SecurityGroupRule `json:"rules"`

	// Status The security group status.
	Status    SecurityGroupStatus `json:"status"`
	UpdatedAt Timestamp           `json:"updated_at"`
}

SecurityGroup defines model for SecurityGroup.

type SecurityGroupRule

type SecurityGroupRule struct {
	// Direction The direction of the rule.
	Direction SecurityGroupRuleDirection `json:"direction"`

	// PortRangeMax The maximum port number of the rule.
	PortRangeMax *int `json:"port_range_max"`

	// PortRangeMin The minimum port number of the rule.
	PortRangeMin *int `json:"port_range_min"`

	// Protocol The protocol of the rule.
	Protocol SecurityGroupRuleProtocol `json:"protocol"`
}

SecurityGroupRule defines model for SecurityGroup.Rule.

type SecurityGroupRuleDirection

type SecurityGroupRuleDirection string

SecurityGroupRuleDirection The direction of the rule.

const (
	SecurityGroupRuleDirectionEgress  SecurityGroupRuleDirection = "egress"
	SecurityGroupRuleDirectionIngress SecurityGroupRuleDirection = "ingress"
)

Defines values for SecurityGroupRuleDirection.

type SecurityGroupRuleProtocol

type SecurityGroupRuleProtocol string

SecurityGroupRuleProtocol The protocol of the rule.

const (
	SecurityGroupRuleProtocolAll  SecurityGroupRuleProtocol = "all"
	SecurityGroupRuleProtocolIcmp SecurityGroupRuleProtocol = "icmp"
	SecurityGroupRuleProtocolTcp  SecurityGroupRuleProtocol = "tcp"
	SecurityGroupRuleProtocolUdp  SecurityGroupRuleProtocol = "udp"
)

Defines values for SecurityGroupRuleProtocol.

type SecurityGroupStatus

type SecurityGroupStatus string

SecurityGroupStatus The security group status.

const (
	SecurityGroupStatusCreated  SecurityGroupStatus = "created"
	SecurityGroupStatusCreating SecurityGroupStatus = "creating"
	SecurityGroupStatusDeleting SecurityGroupStatus = "deleting"
	SecurityGroupStatusError    SecurityGroupStatus = "error"
	SecurityGroupStatusUpdating SecurityGroupStatus = "updating"
)

Defines values for SecurityGroupStatus.

type SingleFloatingIPResponse

type SingleFloatingIPResponse struct {
	FloatingIp *FloatingIP `json:"floating_ip,omitempty"`
}

SingleFloatingIPResponse defines model for SingleFloatingIPResponse.

type SingleInstanceResponse

type SingleInstanceResponse struct {
	Instance Instance `json:"instance"`
}

SingleInstanceResponse defines model for SingleInstanceResponse.

type SingleSSHKeyResponse

type SingleSSHKeyResponse = SSHKey

SingleSSHKeyResponse defines model for SingleSSHKeyResponse.

type SingleSecurityGroupResponse

type SingleSecurityGroupResponse struct {
	SecurityGroup SecurityGroup `json:"security_group"`
}

SingleSecurityGroupResponse defines model for SingleSecurityGroupResponse.

type SingleSnapshotResponse

type SingleSnapshotResponse struct {
	Snapshot Snapshot `json:"snapshot"`
}

SingleSnapshotResponse defines model for SingleSnapshotResponse.

type SingleVolumeResponse

type SingleVolumeResponse struct {
	Volume Volume `json:"volume"`
}

SingleVolumeResponse defines model for SingleVolumeResponse.

type Snapshot

type Snapshot struct {
	CreatedAt Timestamp `json:"created_at"`

	// Id A unique identifier for each snapshot. This is automatically generated.
	Id string `json:"id"`

	// Name The human-readable name for the snapshot.
	Name string `json:"name"`

	// Region The region identifier.
	Region Region `json:"region"`

	// ResourceId The id of the resource (e.g. instance) that was snapshotted.
	ResourceId string `json:"resource_id"`

	// Size The storage size of this snapshot given in bytes.
	Size *string `json:"size,omitempty"`

	// Status The snapshot status.
	Status    SnapshotStatus `json:"status"`
	UpdatedAt Timestamp      `json:"updated_at"`
}

Snapshot defines model for Snapshot.

type SnapshotStatus

type SnapshotStatus string

SnapshotStatus The snapshot status.

const (
	SnapshotStatusActive        SnapshotStatus = "active"
	SnapshotStatusCreated       SnapshotStatus = "created"
	SnapshotStatusCreating      SnapshotStatus = "creating"
	SnapshotStatusDeleting      SnapshotStatus = "deleting"
	SnapshotStatusError         SnapshotStatus = "error"
	SnapshotStatusPendingDelete SnapshotStatus = "pending_delete"
)

Defines values for SnapshotStatus.

type Timestamp

type Timestamp = time.Time

Timestamp defines model for Timestamp.

type UpdateInstanceJSONBody

type UpdateInstanceJSONBody struct {
	// IsProtected Specifies if the instance is termination protected.
	// When set to `true`, it"s not possible to destroy the instance until it"s switched to `false`.
	// Set to `true` automatically for long-term billed instances.
	IsProtected *InstanceIsProtected `json:"is_protected,omitempty"`

	// Name The human-readable name set for the instance.
	Name *InstanceName `json:"name,omitempty"`

	// SecurityGroups An array of security group ids.
	// **Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups.
	// You can override this behavior by providing a different Security Group.
	SecurityGroups *InstanceSecurityGroupIds `json:"security_groups,omitempty"`

	// Volumes The instance's volumes IDs.
	Volumes *[]VolumeId `json:"volumes,omitempty"`
}

UpdateInstanceJSONBody defines parameters for UpdateInstance.

type UpdateInstanceJSONRequestBody

type UpdateInstanceJSONRequestBody UpdateInstanceJSONBody

UpdateInstanceJSONRequestBody defines body for UpdateInstance for application/json ContentType.

type UpdateInstanceResponse

type UpdateInstanceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleInstanceResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateInstanceResponse

func ParseUpdateInstanceResponse(rsp *http.Response) (*UpdateInstanceResponse, error)

ParseUpdateInstanceResponse parses an HTTP response from a UpdateInstanceWithResponse call

func (UpdateInstanceResponse) Status

func (r UpdateInstanceResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateInstanceResponse) StatusCode

func (r UpdateInstanceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateSSHKeyJSONBody

type UpdateSSHKeyJSONBody struct {
	// Name The new human-readable name for your ssh key.
	Name *string `json:"name,omitempty"`
}

UpdateSSHKeyJSONBody defines parameters for UpdateSSHKey.

type UpdateSSHKeyJSONRequestBody

type UpdateSSHKeyJSONRequestBody UpdateSSHKeyJSONBody

UpdateSSHKeyJSONRequestBody defines body for UpdateSSHKey for application/json ContentType.

type UpdateSSHKeyResponse

type UpdateSSHKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleSSHKeyResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateSSHKeyResponse

func ParseUpdateSSHKeyResponse(rsp *http.Response) (*UpdateSSHKeyResponse, error)

ParseUpdateSSHKeyResponse parses an HTTP response from a UpdateSSHKeyWithResponse call

func (UpdateSSHKeyResponse) Status

func (r UpdateSSHKeyResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateSSHKeyResponse) StatusCode

func (r UpdateSSHKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateSecurityGroupJSONBody

type UpdateSecurityGroupJSONBody struct {
	// Description he human-readable description set for the security group.
	Description *string `json:"description,omitempty"`

	// Name The human-readable name set for the security group.
	Name *string `json:"name,omitempty"`

	// Rules The list of rules of the security group.
	Rules *[]SecurityGroupRule `json:"rules,omitempty"`
}

UpdateSecurityGroupJSONBody defines parameters for UpdateSecurityGroup.

type UpdateSecurityGroupJSONRequestBody

type UpdateSecurityGroupJSONRequestBody UpdateSecurityGroupJSONBody

UpdateSecurityGroupJSONRequestBody defines body for UpdateSecurityGroup for application/json ContentType.

type UpdateSecurityGroupResponse

type UpdateSecurityGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleSecurityGroupResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateSecurityGroupResponse

func ParseUpdateSecurityGroupResponse(rsp *http.Response) (*UpdateSecurityGroupResponse, error)

ParseUpdateSecurityGroupResponse parses an HTTP response from a UpdateSecurityGroupWithResponse call

func (UpdateSecurityGroupResponse) Status

Status returns HTTPResponse.Status

func (UpdateSecurityGroupResponse) StatusCode

func (r UpdateSecurityGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateSnapshotJSONBody

type UpdateSnapshotJSONBody struct {
	// Name The new human-readable name for your snapshot.
	Name *string `json:"name,omitempty"`
}

UpdateSnapshotJSONBody defines parameters for UpdateSnapshot.

type UpdateSnapshotJSONRequestBody

type UpdateSnapshotJSONRequestBody UpdateSnapshotJSONBody

UpdateSnapshotJSONRequestBody defines body for UpdateSnapshot for application/json ContentType.

type UpdateSnapshotResponse

type UpdateSnapshotResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleSnapshotResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateSnapshotResponse

func ParseUpdateSnapshotResponse(rsp *http.Response) (*UpdateSnapshotResponse, error)

ParseUpdateSnapshotResponse parses an HTTP response from a UpdateSnapshotWithResponse call

func (UpdateSnapshotResponse) Status

func (r UpdateSnapshotResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateSnapshotResponse) StatusCode

func (r UpdateSnapshotResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateVolumeJSONBody

type UpdateVolumeJSONBody struct {
	// Description The human-readable description set for the volume.
	Description *string `json:"description,omitempty"`

	// Name The human-readable name set for the volume.
	Name *string `json:"name,omitempty"`
}

UpdateVolumeJSONBody defines parameters for UpdateVolume.

type UpdateVolumeJSONRequestBody

type UpdateVolumeJSONRequestBody UpdateVolumeJSONBody

UpdateVolumeJSONRequestBody defines body for UpdateVolume for application/json ContentType.

type UpdateVolumeResponse

type UpdateVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SingleVolumeResponse
	JSONDefault  *ErrorResponse
}

func ParseUpdateVolumeResponse

func ParseUpdateVolumeResponse(rsp *http.Response) (*UpdateVolumeResponse, error)

ParseUpdateVolumeResponse parses an HTTP response from a UpdateVolumeWithResponse call

func (UpdateVolumeResponse) Status

func (r UpdateVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateVolumeResponse) StatusCode

func (r UpdateVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Volume

type Volume struct {
	CreatedAt Timestamp `json:"created_at"`

	// Description The human-readable description for the volume.
	Description string `json:"description"`

	// Id A unique identifier for each volume. This is automatically generated.
	Id VolumeId `json:"id"`

	// Instances The attached instances.
	Instances []struct {
		// Id The id of the attached instance.
		Id *string `json:"id,omitempty"`

		// Name The name of the attached instance.
		Name *string `json:"name,omitempty"`
	} `json:"instances"`

	// Name The human-readable name for the volume.
	Name string `json:"name"`

	// Region The region identifier.
	Region Region `json:"region"`

	// Size The storage size of this volume given in GiB.
	Size   int          `json:"size"`
	Status VolumeStatus `json:"status"`

	// Type The volume type.
	Type      VolumeType `json:"type"`
	UpdatedAt Timestamp  `json:"updated_at"`
}

Volume defines model for Volume.

type VolumeId

type VolumeId = string

VolumeId A unique identifier for each volume. This is automatically generated.

type VolumeStatus

type VolumeStatus string

VolumeStatus defines model for Volume.Status.

const (
	VolumeStatusAvailable     VolumeStatus = "available"
	VolumeStatusCreated       VolumeStatus = "created"
	VolumeStatusCreating      VolumeStatus = "creating"
	VolumeStatusDeleting      VolumeStatus = "deleting"
	VolumeStatusError         VolumeStatus = "error"
	VolumeStatusInUse         VolumeStatus = "in-use"
	VolumeStatusPendingDelete VolumeStatus = "pending_delete"
)

Defines values for VolumeStatus.

type VolumeType

type VolumeType string

VolumeType The volume type.

const (
	VolumeTypeHdd VolumeType = "hdd"
	VolumeTypeSsd VolumeType = "ssd"
)

Defines values for VolumeType.

Directories

Path Synopsis
examples
list-instances command

Jump to

Keyboard shortcuts

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