Help us shape the future of Go! Take the 2026 Go Developer Survey

v2

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v2 provides primitives to interact the openapi HTTP API.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddServiceToLoadBalancerRequest

func NewAddServiceToLoadBalancerRequest(server string, id string, body AddServiceToLoadBalancerJSONRequestBody) (*http.Request, error)

NewAddServiceToLoadBalancerRequest calls the generic AddServiceToLoadBalancer builder with application/json body

func NewAddServiceToLoadBalancerRequestWithBody

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

NewAddServiceToLoadBalancerRequestWithBody generates requests for AddServiceToLoadBalancer with any type of body

func NewCreateLoadBalancerRequest

func NewCreateLoadBalancerRequest(server string, body CreateLoadBalancerJSONRequestBody) (*http.Request, error)

NewCreateLoadBalancerRequest calls the generic CreateLoadBalancer builder with application/json body

func NewCreateLoadBalancerRequestWithBody

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

NewCreateLoadBalancerRequestWithBody generates requests for CreateLoadBalancer with any type of body

func NewDeleteLoadBalancerRequest added in v0.26.2

func NewDeleteLoadBalancerRequest(server string, id string) (*http.Request, error)

NewDeleteLoadBalancerRequest generates requests for DeleteLoadBalancer

func NewDeleteLoadBalancerServiceRequest added in v0.26.0

func NewDeleteLoadBalancerServiceRequest(server string, id string, serviceId string) (*http.Request, error)

NewDeleteLoadBalancerServiceRequest generates requests for DeleteLoadBalancerService

func NewGetInstanceTypeRequest added in v0.28.1

func NewGetInstanceTypeRequest(server string, id string) (*http.Request, error)

NewGetInstanceTypeRequest generates requests for GetInstanceType

func NewGetLoadBalancerRequest added in v0.26.0

func NewGetLoadBalancerRequest(server string, id string) (*http.Request, error)

NewGetLoadBalancerRequest generates requests for GetLoadBalancer

func NewGetLoadBalancerServiceRequest added in v0.26.0

func NewGetLoadBalancerServiceRequest(server string, id string, serviceId string) (*http.Request, error)

NewGetLoadBalancerServiceRequest generates requests for GetLoadBalancerService

func NewGetOperationRequest added in v0.26.3

func NewGetOperationRequest(server string, id string) (*http.Request, error)

NewGetOperationRequest generates requests for GetOperation

func NewListInstanceTypesRequest

func NewListInstanceTypesRequest(server string) (*http.Request, error)

NewListInstanceTypesRequest generates requests for ListInstanceTypes

func NewListLoadBalancersRequest

func NewListLoadBalancersRequest(server string) (*http.Request, error)

NewListLoadBalancersRequest generates requests for ListLoadBalancers

func NewListOperationsRequest added in v0.26.3

func NewListOperationsRequest(server string) (*http.Request, error)

NewListOperationsRequest generates requests for ListOperations

func NewListZonesRequest

func NewListZonesRequest(server string) (*http.Request, error)

NewListZonesRequest generates requests for ListZones

func NewUpdateLoadBalancerRequest added in v0.26.0

func NewUpdateLoadBalancerRequest(server string, id string, body UpdateLoadBalancerJSONRequestBody) (*http.Request, error)

NewUpdateLoadBalancerRequest calls the generic UpdateLoadBalancer builder with application/json body

func NewUpdateLoadBalancerRequestWithBody added in v0.26.0

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

NewUpdateLoadBalancerRequestWithBody generates requests for UpdateLoadBalancer with any type of body

func NewUpdateLoadBalancerServiceRequest added in v0.26.0

func NewUpdateLoadBalancerServiceRequest(server string, id string, serviceId string, body UpdateLoadBalancerServiceJSONRequestBody) (*http.Request, error)

NewUpdateLoadBalancerServiceRequest calls the generic UpdateLoadBalancerService builder with application/json body

func NewUpdateLoadBalancerServiceRequestWithBody added in v0.26.0

func NewUpdateLoadBalancerServiceRequestWithBody(server string, id string, serviceId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateLoadBalancerServiceRequestWithBody generates requests for UpdateLoadBalancerService with any type of body

Types

type AddServiceToLoadBalancerJSONBody

type AddServiceToLoadBalancerJSONBody LoadBalancerService

AddServiceToLoadBalancerJSONBody defines parameters for AddServiceToLoadBalancer.

type AddServiceToLoadBalancerJSONRequestBody

type AddServiceToLoadBalancerJSONRequestBody AddServiceToLoadBalancerJSONBody

AddServiceToLoadBalancerRequestBody defines body for AddServiceToLoadBalancer for application/json ContentType.

type AddServiceToLoadBalancerResponse added in v0.26.0

type AddServiceToLoadBalancerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseAddServiceToLoadBalancerResponse

func ParseAddServiceToLoadBalancerResponse(rsp *http.Response) (*AddServiceToLoadBalancerResponse, error)

ParseAddServiceToLoadBalancerResponse parses an HTTP response from a AddServiceToLoadBalancerWithResponse call

func (AddServiceToLoadBalancerResponse) Status added in v0.26.0

Status returns HTTPResponse.Status

func (AddServiceToLoadBalancerResponse) StatusCode added in v0.26.0

func (r AddServiceToLoadBalancerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example.
	Server string

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

	// A callback for modifying requests which are generated before sending over
	// the network.
	RequestEditor 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) AddServiceToLoadBalancer

func (c *Client) AddServiceToLoadBalancer(ctx context.Context, id string, body AddServiceToLoadBalancerJSONRequestBody) (*http.Response, error)

func (*Client) AddServiceToLoadBalancerWithBody

func (c *Client) AddServiceToLoadBalancerWithBody(ctx context.Context, id string, contentType string, body io.Reader) (*http.Response, error)

func (*Client) CreateLoadBalancer

func (c *Client) CreateLoadBalancer(ctx context.Context, body CreateLoadBalancerJSONRequestBody) (*http.Response, error)

func (*Client) CreateLoadBalancerWithBody

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

func (*Client) DeleteLoadBalancer added in v0.26.2

func (c *Client) DeleteLoadBalancer(ctx context.Context, id string) (*http.Response, error)

func (*Client) DeleteLoadBalancerService added in v0.26.0

func (c *Client) DeleteLoadBalancerService(ctx context.Context, id string, serviceId string) (*http.Response, error)

func (*Client) GetInstanceType added in v0.28.1

func (c *Client) GetInstanceType(ctx context.Context, id string) (*http.Response, error)

func (*Client) GetLoadBalancer added in v0.26.0

func (c *Client) GetLoadBalancer(ctx context.Context, id string) (*http.Response, error)

func (*Client) GetLoadBalancerService added in v0.26.0

func (c *Client) GetLoadBalancerService(ctx context.Context, id string, serviceId string) (*http.Response, error)

func (*Client) GetOperation added in v0.26.3

func (c *Client) GetOperation(ctx context.Context, id string) (*http.Response, error)

func (*Client) ListInstanceTypes

func (c *Client) ListInstanceTypes(ctx context.Context) (*http.Response, error)

func (*Client) ListLoadBalancers

func (c *Client) ListLoadBalancers(ctx context.Context) (*http.Response, error)

func (*Client) ListOperations added in v0.26.3

func (c *Client) ListOperations(ctx context.Context) (*http.Response, error)

func (*Client) ListZones

func (c *Client) ListZones(ctx context.Context) (*http.Response, error)

func (*Client) UpdateLoadBalancer added in v0.26.0

func (c *Client) UpdateLoadBalancer(ctx context.Context, id string, body UpdateLoadBalancerJSONRequestBody) (*http.Response, error)

func (*Client) UpdateLoadBalancerService added in v0.26.0

func (c *Client) UpdateLoadBalancerService(ctx context.Context, id string, serviceId string, body UpdateLoadBalancerServiceJSONRequestBody) (*http.Response, error)

func (*Client) UpdateLoadBalancerServiceWithBody added in v0.26.0

func (c *Client) UpdateLoadBalancerServiceWithBody(ctx context.Context, id string, serviceId string, contentType string, body io.Reader) (*http.Response, error)

func (*Client) UpdateLoadBalancerWithBody added in v0.26.0

func (c *Client) UpdateLoadBalancerWithBody(ctx context.Context, id string, contentType string, body io.Reader) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListInstanceTypes request
	ListInstanceTypes(ctx context.Context) (*http.Response, error)

	// GetInstanceType request
	GetInstanceType(ctx context.Context, id string) (*http.Response, error)

	// ListLoadBalancers request
	ListLoadBalancers(ctx context.Context) (*http.Response, error)

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

	CreateLoadBalancer(ctx context.Context, body CreateLoadBalancerJSONRequestBody) (*http.Response, error)

	// DeleteLoadBalancer request
	DeleteLoadBalancer(ctx context.Context, id string) (*http.Response, error)

	// GetLoadBalancer request
	GetLoadBalancer(ctx context.Context, id string) (*http.Response, error)

	// UpdateLoadBalancer request  with any body
	UpdateLoadBalancerWithBody(ctx context.Context, id string, contentType string, body io.Reader) (*http.Response, error)

	UpdateLoadBalancer(ctx context.Context, id string, body UpdateLoadBalancerJSONRequestBody) (*http.Response, error)

	// AddServiceToLoadBalancer request  with any body
	AddServiceToLoadBalancerWithBody(ctx context.Context, id string, contentType string, body io.Reader) (*http.Response, error)

	AddServiceToLoadBalancer(ctx context.Context, id string, body AddServiceToLoadBalancerJSONRequestBody) (*http.Response, error)

	// DeleteLoadBalancerService request
	DeleteLoadBalancerService(ctx context.Context, id string, serviceId string) (*http.Response, error)

	// GetLoadBalancerService request
	GetLoadBalancerService(ctx context.Context, id string, serviceId string) (*http.Response, error)

	// UpdateLoadBalancerService request  with any body
	UpdateLoadBalancerServiceWithBody(ctx context.Context, id string, serviceId string, contentType string, body io.Reader) (*http.Response, error)

	UpdateLoadBalancerService(ctx context.Context, id string, serviceId string, body UpdateLoadBalancerServiceJSONRequestBody) (*http.Response, error)

	// ListOperations request
	ListOperations(ctx context.Context) (*http.Response, error)

	// GetOperation request
	GetOperation(ctx context.Context, id string) (*http.Response, error)

	// ListZones request
	ListZones(ctx context.Context) (*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 (*ClientWithResponses) AddServiceToLoadBalancerWithBodyWithResponse

func (c *ClientWithResponses) AddServiceToLoadBalancerWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AddServiceToLoadBalancerResponse, error)

AddServiceToLoadBalancerWithBodyWithResponse request with arbitrary body returning *AddServiceToLoadBalancerResponse

func (*ClientWithResponses) AddServiceToLoadBalancerWithResponse

func (*ClientWithResponses) CreateLoadBalancerWithBodyWithResponse

func (c *ClientWithResponses) CreateLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateLoadBalancerResponse, error)

CreateLoadBalancerWithBodyWithResponse request with arbitrary body returning *CreateLoadBalancerResponse

func (*ClientWithResponses) CreateLoadBalancerWithResponse

func (*ClientWithResponses) DeleteLoadBalancerServiceWithResponse added in v0.26.0

func (c *ClientWithResponses) DeleteLoadBalancerServiceWithResponse(ctx context.Context, id string, serviceId string) (*DeleteLoadBalancerServiceResponse, error)

DeleteLoadBalancerServiceWithResponse request returning *DeleteLoadBalancerServiceResponse

func (*ClientWithResponses) DeleteLoadBalancerWithResponse added in v0.26.2

func (c *ClientWithResponses) DeleteLoadBalancerWithResponse(ctx context.Context, id string) (*DeleteLoadBalancerResponse, error)

DeleteLoadBalancerWithResponse request returning *DeleteLoadBalancerResponse

func (*ClientWithResponses) GetInstanceTypeWithResponse added in v0.28.1

func (c *ClientWithResponses) GetInstanceTypeWithResponse(ctx context.Context, id string) (*GetInstanceTypeResponse, error)

GetInstanceTypeWithResponse request returning *GetInstanceTypeResponse

func (*ClientWithResponses) GetLoadBalancerServiceWithResponse added in v0.26.0

func (c *ClientWithResponses) GetLoadBalancerServiceWithResponse(ctx context.Context, id string, serviceId string) (*GetLoadBalancerServiceResponse, error)

GetLoadBalancerServiceWithResponse request returning *GetLoadBalancerServiceResponse

func (*ClientWithResponses) GetLoadBalancerWithResponse added in v0.26.0

func (c *ClientWithResponses) GetLoadBalancerWithResponse(ctx context.Context, id string) (*GetLoadBalancerResponse, error)

GetLoadBalancerWithResponse request returning *GetLoadBalancerResponse

func (*ClientWithResponses) GetOperationWithResponse added in v0.26.3

func (c *ClientWithResponses) GetOperationWithResponse(ctx context.Context, id string) (*GetOperationResponse, error)

GetOperationWithResponse request returning *GetOperationResponse

func (*ClientWithResponses) ListInstanceTypesWithResponse

func (c *ClientWithResponses) ListInstanceTypesWithResponse(ctx context.Context) (*ListInstanceTypesResponse, error)

ListInstanceTypesWithResponse request returning *ListInstanceTypesResponse

func (*ClientWithResponses) ListLoadBalancersWithResponse

func (c *ClientWithResponses) ListLoadBalancersWithResponse(ctx context.Context) (*ListLoadBalancersResponse, error)

ListLoadBalancersWithResponse request returning *ListLoadBalancersResponse

func (*ClientWithResponses) ListOperationsWithResponse added in v0.26.3

func (c *ClientWithResponses) ListOperationsWithResponse(ctx context.Context) (*ListOperationsResponse, error)

ListOperationsWithResponse request returning *ListOperationsResponse

func (*ClientWithResponses) ListZonesWithResponse

func (c *ClientWithResponses) ListZonesWithResponse(ctx context.Context) (*ListZonesResponse, error)

ListZonesWithResponse request returning *ListZonesResponse

func (*ClientWithResponses) OperationPoller added in v0.26.3

func (c *ClientWithResponses) OperationPoller(zone string, jobID string) PollFunc

OperationPoller returns a PollFunc function which queries the state of the specified job. Upon successful job completion, the type of the interface{} returned by the PollFunc is a pointer to a Resource object (*Resource).

func (*ClientWithResponses) UpdateLoadBalancerServiceWithBodyWithResponse added in v0.26.0

func (c *ClientWithResponses) UpdateLoadBalancerServiceWithBodyWithResponse(ctx context.Context, id string, serviceId string, contentType string, body io.Reader) (*UpdateLoadBalancerServiceResponse, error)

UpdateLoadBalancerServiceWithBodyWithResponse request with arbitrary body returning *UpdateLoadBalancerServiceResponse

func (*ClientWithResponses) UpdateLoadBalancerServiceWithResponse added in v0.26.0

func (c *ClientWithResponses) UpdateLoadBalancerServiceWithResponse(ctx context.Context, id string, serviceId string, body UpdateLoadBalancerServiceJSONRequestBody) (*UpdateLoadBalancerServiceResponse, error)

func (*ClientWithResponses) UpdateLoadBalancerWithBodyWithResponse added in v0.26.0

func (c *ClientWithResponses) UpdateLoadBalancerWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*UpdateLoadBalancerResponse, error)

UpdateLoadBalancerWithBodyWithResponse request with arbitrary body returning *UpdateLoadBalancerResponse

func (*ClientWithResponses) UpdateLoadBalancerWithResponse added in v0.26.0

type ClientWithResponsesInterface added in v0.26.0

type ClientWithResponsesInterface interface {
	// ListInstanceTypes request
	ListInstanceTypesWithResponse(ctx context.Context) (*ListInstanceTypesResponse, error)

	// GetInstanceType request
	GetInstanceTypeWithResponse(ctx context.Context, id string) (*GetInstanceTypeResponse, error)

	// ListLoadBalancers request
	ListLoadBalancersWithResponse(ctx context.Context) (*ListLoadBalancersResponse, error)

	// CreateLoadBalancer request  with any body
	CreateLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateLoadBalancerResponse, error)

	CreateLoadBalancerWithResponse(ctx context.Context, body CreateLoadBalancerJSONRequestBody) (*CreateLoadBalancerResponse, error)

	// DeleteLoadBalancer request
	DeleteLoadBalancerWithResponse(ctx context.Context, id string) (*DeleteLoadBalancerResponse, error)

	// GetLoadBalancer request
	GetLoadBalancerWithResponse(ctx context.Context, id string) (*GetLoadBalancerResponse, error)

	// UpdateLoadBalancer request  with any body
	UpdateLoadBalancerWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*UpdateLoadBalancerResponse, error)

	UpdateLoadBalancerWithResponse(ctx context.Context, id string, body UpdateLoadBalancerJSONRequestBody) (*UpdateLoadBalancerResponse, error)

	// AddServiceToLoadBalancer request  with any body
	AddServiceToLoadBalancerWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AddServiceToLoadBalancerResponse, error)

	AddServiceToLoadBalancerWithResponse(ctx context.Context, id string, body AddServiceToLoadBalancerJSONRequestBody) (*AddServiceToLoadBalancerResponse, error)

	// DeleteLoadBalancerService request
	DeleteLoadBalancerServiceWithResponse(ctx context.Context, id string, serviceId string) (*DeleteLoadBalancerServiceResponse, error)

	// GetLoadBalancerService request
	GetLoadBalancerServiceWithResponse(ctx context.Context, id string, serviceId string) (*GetLoadBalancerServiceResponse, error)

	// UpdateLoadBalancerService request  with any body
	UpdateLoadBalancerServiceWithBodyWithResponse(ctx context.Context, id string, serviceId string, contentType string, body io.Reader) (*UpdateLoadBalancerServiceResponse, error)

	UpdateLoadBalancerServiceWithResponse(ctx context.Context, id string, serviceId string, body UpdateLoadBalancerServiceJSONRequestBody) (*UpdateLoadBalancerServiceResponse, error)

	// ListOperations request
	ListOperationsWithResponse(ctx context.Context) (*ListOperationsResponse, error)

	// GetOperation request
	GetOperationWithResponse(ctx context.Context, id string) (*GetOperationResponse, error)

	// ListZones request
	ListZonesWithResponse(ctx context.Context) (*ListZonesResponse, error)
}

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

type CreateLoadBalancerJSONBody

type CreateLoadBalancerJSONBody LoadBalancer

CreateLoadBalancerJSONBody defines parameters for CreateLoadBalancer.

type CreateLoadBalancerJSONRequestBody

type CreateLoadBalancerJSONRequestBody CreateLoadBalancerJSONBody

CreateLoadBalancerRequestBody defines body for CreateLoadBalancer for application/json ContentType.

type CreateLoadBalancerResponse added in v0.26.0

type CreateLoadBalancerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseCreateLoadBalancerResponse

func ParseCreateLoadBalancerResponse(rsp *http.Response) (*CreateLoadBalancerResponse, error)

ParseCreateLoadBalancerResponse parses an HTTP response from a CreateLoadBalancerWithResponse call

func (CreateLoadBalancerResponse) Status added in v0.26.0

Status returns HTTPResponse.Status

func (CreateLoadBalancerResponse) StatusCode added in v0.26.0

func (r CreateLoadBalancerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteLoadBalancerResponse added in v0.26.2

type DeleteLoadBalancerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseDeleteLoadBalancerResponse added in v0.26.2

func ParseDeleteLoadBalancerResponse(rsp *http.Response) (*DeleteLoadBalancerResponse, error)

ParseDeleteLoadBalancerResponse parses an HTTP response from a DeleteLoadBalancerWithResponse call

func (DeleteLoadBalancerResponse) Status added in v0.26.2

Status returns HTTPResponse.Status

func (DeleteLoadBalancerResponse) StatusCode added in v0.26.2

func (r DeleteLoadBalancerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteLoadBalancerServiceResponse added in v0.26.0

type DeleteLoadBalancerServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseDeleteLoadBalancerServiceResponse added in v0.26.0

func ParseDeleteLoadBalancerServiceResponse(rsp *http.Response) (*DeleteLoadBalancerServiceResponse, error)

ParseDeleteLoadBalancerServiceResponse parses an HTTP response from a DeleteLoadBalancerServiceWithResponse call

func (DeleteLoadBalancerServiceResponse) Status added in v0.26.0

Status returns HTTPResponse.Status

func (DeleteLoadBalancerServiceResponse) StatusCode added in v0.26.0

func (r DeleteLoadBalancerServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInstanceTypeResponse added in v0.28.1

type GetInstanceTypeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InstanceType
}

func ParseGetInstanceTypeResponse added in v0.28.1

func ParseGetInstanceTypeResponse(rsp *http.Response) (*GetInstanceTypeResponse, error)

ParseGetInstanceTypeResponse parses an HTTP response from a GetInstanceTypeWithResponse call

func (GetInstanceTypeResponse) Status added in v0.28.1

func (r GetInstanceTypeResponse) Status() string

Status returns HTTPResponse.Status

func (GetInstanceTypeResponse) StatusCode added in v0.28.1

func (r GetInstanceTypeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLoadBalancerResponse added in v0.26.0

type GetLoadBalancerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LoadBalancer
}

func ParseGetLoadBalancerResponse added in v0.26.0

func ParseGetLoadBalancerResponse(rsp *http.Response) (*GetLoadBalancerResponse, error)

ParseGetLoadBalancerResponse parses an HTTP response from a GetLoadBalancerWithResponse call

func (GetLoadBalancerResponse) Status added in v0.26.0

func (r GetLoadBalancerResponse) Status() string

Status returns HTTPResponse.Status

func (GetLoadBalancerResponse) StatusCode added in v0.26.0

func (r GetLoadBalancerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLoadBalancerServiceResponse added in v0.26.0

type GetLoadBalancerServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LoadBalancerService
}

func ParseGetLoadBalancerServiceResponse added in v0.26.0

func ParseGetLoadBalancerServiceResponse(rsp *http.Response) (*GetLoadBalancerServiceResponse, error)

ParseGetLoadBalancerServiceResponse parses an HTTP response from a GetLoadBalancerServiceWithResponse call

func (GetLoadBalancerServiceResponse) Status added in v0.26.0

Status returns HTTPResponse.Status

func (GetLoadBalancerServiceResponse) StatusCode added in v0.26.0

func (r GetLoadBalancerServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetOperationResponse added in v0.26.3

type GetOperationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseGetOperationResponse added in v0.26.3

func ParseGetOperationResponse(rsp *http.Response) (*GetOperationResponse, error)

ParseGetOperationResponse parses an HTTP response from a GetOperationWithResponse call

func (GetOperationResponse) Status added in v0.26.3

func (r GetOperationResponse) Status() string

Status returns HTTPResponse.Status

func (GetOperationResponse) StatusCode added in v0.26.3

func (r GetOperationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Healthcheck

type Healthcheck struct {
	Interval *int64  `json:"interval,omitempty"`
	Mode     *string `json:"mode,omitempty"`
	Port     *int64  `json:"port,omitempty"`
	Retries  *int64  `json:"retries,omitempty"`
	Timeout  *int64  `json:"timeout,omitempty"`
	Uri      *string `json:"uri,omitempty"`
}

Healthcheck defines model for healthcheck.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InstanceType

type InstanceType struct {
	Authorized *bool   `json:"authorized,omitempty"`
	Cpus       *int64  `json:"cpus,omitempty"`
	Family     *string `json:"family,omitempty"`
	Gpus       *int64  `json:"gpus,omitempty"`
	Id         *string `json:"id,omitempty"`
	Memory     *int64  `json:"memory,omitempty"`
	Size       *string `json:"size,omitempty"`
}

InstanceType defines model for instance-type.

type ListInstanceTypesResponse added in v0.26.0

type ListInstanceTypesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		InstanceTypes *[]InstanceType `json:"instance-types,omitempty"`
	}
}

func ParseListInstanceTypesResponse

func ParseListInstanceTypesResponse(rsp *http.Response) (*ListInstanceTypesResponse, error)

ParseListInstanceTypesResponse parses an HTTP response from a ListInstanceTypesWithResponse call

func (ListInstanceTypesResponse) Status added in v0.26.0

func (r ListInstanceTypesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInstanceTypesResponse) StatusCode added in v0.26.0

func (r ListInstanceTypesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListLoadBalancersResponse added in v0.26.0

type ListLoadBalancersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		LoadBalancers *[]LoadBalancer `json:"load-balancers,omitempty"`
	}
}

func ParseListLoadBalancersResponse

func ParseListLoadBalancersResponse(rsp *http.Response) (*ListLoadBalancersResponse, error)

ParseListLoadBalancersResponse parses an HTTP response from a ListLoadBalancersWithResponse call

func (ListLoadBalancersResponse) Status added in v0.26.0

func (r ListLoadBalancersResponse) Status() string

Status returns HTTPResponse.Status

func (ListLoadBalancersResponse) StatusCode added in v0.26.0

func (r ListLoadBalancersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListOperationsResponse added in v0.26.3

type ListOperationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Operations *[]Operation `json:"operations,omitempty"`
	}
}

func ParseListOperationsResponse added in v0.26.3

func ParseListOperationsResponse(rsp *http.Response) (*ListOperationsResponse, error)

ParseListOperationsResponse parses an HTTP response from a ListOperationsWithResponse call

func (ListOperationsResponse) Status added in v0.26.3

func (r ListOperationsResponse) Status() string

Status returns HTTPResponse.Status

func (ListOperationsResponse) StatusCode added in v0.26.3

func (r ListOperationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListZonesResponse added in v0.26.0

type ListZonesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Zones *[]Zone `json:"zones,omitempty"`
	}
}

func ParseListZonesResponse

func ParseListZonesResponse(rsp *http.Response) (*ListZonesResponse, error)

ParseListZonesResponse parses an HTTP response from a ListZonesWithResponse call

func (ListZonesResponse) Status added in v0.26.0

func (r ListZonesResponse) Status() string

Status returns HTTPResponse.Status

func (ListZonesResponse) StatusCode added in v0.26.0

func (r ListZonesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LoadBalancer

type LoadBalancer struct {
	CreatedAt   *time.Time             `json:"created-at,omitempty"`
	Description *string                `json:"description,omitempty"`
	Id          *string                `json:"id,omitempty"`
	Ip          *string                `json:"ip,omitempty"`
	Name        *string                `json:"name,omitempty"`
	Services    *[]LoadBalancerService `json:"services,omitempty"`
	State       *string                `json:"state,omitempty"`
}

LoadBalancer defines model for load-balancer.

func (*LoadBalancer) MarshalJSON added in v0.29.0

func (lb *LoadBalancer) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of a LoadBalancer structure after having formatted the CreatedAt field in the original timestamp (ISO 8601), since time.MarshalJSON() only supports RFC 3339 format.

func (*LoadBalancer) UnmarshalJSON added in v0.26.0

func (lb *LoadBalancer) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a LoadBalancer structure into a temporary structure whose "CreatedAt" field of type string to be able to parse the original timestamp (ISO 8601) into a time.Time object, since json.Unmarshal() only supports RFC 3339 format.

type LoadBalancerServerStatus

type LoadBalancerServerStatus struct {
	PublicIp *string `json:"public-ip,omitempty"`
	Status   *string `json:"status,omitempty"`
}

LoadBalancerServerStatus defines model for load-balancer-server-status.

type LoadBalancerService

type LoadBalancerService struct {
	Description       *string                     `json:"description,omitempty"`
	Healthcheck       *Healthcheck                `json:"healthcheck,omitempty"`
	HealthcheckStatus *[]LoadBalancerServerStatus `json:"healthcheck-status,omitempty"`
	Id                *string                     `json:"id,omitempty"`
	InstancePool      *Resource                   `json:"instance-pool,omitempty"`
	Name              *string                     `json:"name,omitempty"`
	Port              *int64                      `json:"port,omitempty"`
	Protocol          *string                     `json:"protocol,omitempty"`
	State             *string                     `json:"state,omitempty"`
	Strategy          *string                     `json:"strategy,omitempty"`
	TargetPort        *int64                      `json:"target-port,omitempty"`
}

LoadBalancerService defines model for load-balancer-service.

type MockClient added in v0.29.0

func NewMockClient added in v0.29.0

func NewMockClient() *MockClient

func (*MockClient) Do added in v0.29.0

func (c *MockClient) Do(req *http.Request) (*http.Response, error)

type Operation added in v0.26.3

type Operation struct {
	Id        *string   `json:"id,omitempty"`
	Message   *string   `json:"message,omitempty"`
	Reason    *string   `json:"reason,omitempty"`
	Reference *Resource `json:"reference,omitempty"`
	State     *string   `json:"state,omitempty"`
}

Operation defines model for operation.

type PollFunc added in v0.26.0

type PollFunc func(ctx context.Context) (bool, interface{}, error)

PollFunc represents a function invoked periodically in a polling loop. It returns a boolean flag true if the job is completed or false if polling must continue, and any error that occurred during the polling (which interrupts the polling regardless of the boolean flag value). Upon successful completion, an interface descring an opaque operation can be returned to the caller, which will have to perform type assertion depending on the PollFunc implementation.

type Poller added in v0.26.0

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

Poller represents a poller instance.

func NewPoller added in v0.26.0

func NewPoller() *Poller

NewPoller returns a Poller instance.

func (*Poller) Poll added in v0.26.0

func (p *Poller) Poll(ctx context.Context, pf PollFunc) (interface{}, error)

Poll starts the polling routine, executing the provided polling function at the configured polling interval. Upon successful polling, an opaque operation is returned to the caller, which actual type has to asserted depending on the PollFunc executed.

func (*Poller) WithInterval added in v0.26.0

func (p *Poller) WithInterval(interval time.Duration) *Poller

WithInterval sets the interval at which the polling function will be executed (default: 3s).

func (*Poller) WithTimeout added in v0.26.0

func (p *Poller) WithTimeout(timeout time.Duration) *Poller

WithTimeout sets the time out value after which the polling routine will be cancelled (default: no time out).

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

func MultiRequestsEditor added in v0.26.0

func MultiRequestsEditor(fns ...RequestEditorFn) RequestEditorFn

MultiRequestsEditor is an oapi-codegen compatible RequestEditorFn function that executes multiple RequestEditorFn functions sequentially.

type Resource

type Resource struct {
	Command *string `json:"command,omitempty"`
	Id      *string `json:"id,omitempty"`
	Link    *string `json:"link,omitempty"`
}

Resource defines model for resource.

type UpdateLoadBalancerJSONBody added in v0.26.0

type UpdateLoadBalancerJSONBody struct {
	Description *string `json:"description,omitempty"`
	Name        *string `json:"name,omitempty"`
}

UpdateLoadBalancerJSONBody defines parameters for UpdateLoadBalancer.

type UpdateLoadBalancerJSONRequestBody added in v0.26.0

type UpdateLoadBalancerJSONRequestBody UpdateLoadBalancerJSONBody

UpdateLoadBalancerRequestBody defines body for UpdateLoadBalancer for application/json ContentType.

type UpdateLoadBalancerResponse added in v0.26.0

type UpdateLoadBalancerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseUpdateLoadBalancerResponse added in v0.26.0

func ParseUpdateLoadBalancerResponse(rsp *http.Response) (*UpdateLoadBalancerResponse, error)

ParseUpdateLoadBalancerResponse parses an HTTP response from a UpdateLoadBalancerWithResponse call

func (UpdateLoadBalancerResponse) Status added in v0.26.0

Status returns HTTPResponse.Status

func (UpdateLoadBalancerResponse) StatusCode added in v0.26.0

func (r UpdateLoadBalancerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateLoadBalancerServiceJSONBody added in v0.26.0

type UpdateLoadBalancerServiceJSONBody struct {
	Description *string      `json:"description,omitempty"`
	Healthcheck *Healthcheck `json:"healthcheck,omitempty"`
	Name        *string      `json:"name,omitempty"`
	Port        *int64       `json:"port,omitempty"`
	Protocol    *string      `json:"protocol,omitempty"`
	Strategy    *string      `json:"strategy,omitempty"`
	TargetPort  *int64       `json:"target-port,omitempty"`
}

UpdateLoadBalancerServiceJSONBody defines parameters for UpdateLoadBalancerService.

type UpdateLoadBalancerServiceJSONRequestBody added in v0.26.0

type UpdateLoadBalancerServiceJSONRequestBody UpdateLoadBalancerServiceJSONBody

UpdateLoadBalancerServiceRequestBody defines body for UpdateLoadBalancerService for application/json ContentType.

type UpdateLoadBalancerServiceResponse added in v0.26.0

type UpdateLoadBalancerServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Operation
}

func ParseUpdateLoadBalancerServiceResponse added in v0.26.0

func ParseUpdateLoadBalancerServiceResponse(rsp *http.Response) (*UpdateLoadBalancerServiceResponse, error)

ParseUpdateLoadBalancerServiceResponse parses an HTTP response from a UpdateLoadBalancerServiceWithResponse call

func (UpdateLoadBalancerServiceResponse) Status added in v0.26.0

Status returns HTTPResponse.Status

func (UpdateLoadBalancerServiceResponse) StatusCode added in v0.26.0

func (r UpdateLoadBalancerServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Zone

type Zone struct {
	Name *string `json:"name,omitempty"`
}

Zone defines model for zone.

Jump to

Keyboard shortcuts

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