instances

package
v1.28.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

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

Code generated by github.com/do87/stackit-client-generator version v0.0.3 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewCreateRequest

func NewCreateRequest(ctx context.Context, server string, projectID string, params *CreateParams, body CreateJSONRequestBody) (*http.Request, error)

NewCreateRequest calls the generic Create builder with application/json body

func NewCreateRequestWithBody

func NewCreateRequestWithBody(ctx context.Context, server string, projectID string, params *CreateParams, contentType string, body io.Reader) (*http.Request, error)

NewCreateRequestWithBody generates requests for Create with any type of body

func NewDeleteRequest

func NewDeleteRequest(ctx context.Context, server string, projectID string, name string) (*http.Request, error)

NewDeleteRequest generates requests for Delete

func NewGetRequest

func NewGetRequest(ctx context.Context, server string, projectID string, name string) (*http.Request, error)

NewGetRequest generates requests for Get

func NewListRequest

func NewListRequest(ctx context.Context, server string, projectID string) (*http.Request, error)

NewListRequest generates requests for List

func NewReplaceTargetPoolRequest

func NewReplaceTargetPoolRequest(ctx context.Context, server string, projectID string, name string, targetPoolName string, body ReplaceTargetPoolJSONRequestBody) (*http.Request, error)

NewReplaceTargetPoolRequest calls the generic ReplaceTargetPool builder with application/json body

func NewReplaceTargetPoolRequestWithBody

func NewReplaceTargetPoolRequestWithBody(ctx context.Context, server string, projectID string, name string, targetPoolName string, contentType string, body io.Reader) (*http.Request, error)

NewReplaceTargetPoolRequestWithBody generates requests for ReplaceTargetPool with any type of body

Types

type ActiveHealthCheck

type ActiveHealthCheck struct {
	// HealthyThreshold Healthy threshold of the health checking
	HealthyThreshold *int `json:"healthyThreshold,omitempty"`

	// Interval Interval duration of health checking in seconds
	Interval *string `json:"interval,omitempty"`

	// IntervalJitter Interval duration threshold of the health checking in seconds
	IntervalJitter *string `json:"intervalJitter,omitempty"`

	// Timeout Active health checking timeout duration in seconds
	Timeout *string `json:"timeout,omitempty"`

	// UnhealthyThreshold Unhealthy threshold of the health checking
	UnhealthyThreshold *int `json:"unhealthyThreshold,omitempty"`
}

ActiveHealthCheck defines model for ActiveHealthCheck.

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 contracts.BaseClientInterface
}

Client which conforms to the OpenAPI3 specification for this service.

func NewRawClient

func NewRawClient(server string, httpClient contracts.BaseClientInterface) *Client

NewRawClient Creates a new Client, with reasonable defaults

func (*Client) CreateRaw

func (c *Client) CreateRaw(ctx context.Context, projectID string, params *CreateParams, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateRawWithBody

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

func (*Client) DeleteRaw

func (c *Client) DeleteRaw(ctx context.Context, projectID string, name string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRaw

func (c *Client) GetRaw(ctx context.Context, projectID string, name string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListRaw

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

func (*Client) ReplaceTargetPoolRaw

func (c *Client) ReplaceTargetPoolRaw(ctx context.Context, projectID string, name string, targetPoolName string, body ReplaceTargetPoolJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReplaceTargetPoolRawWithBody

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

type ClientWithResponses

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

ClientWithResponses builds on rawClientInterface to offer response payloads

func NewClient

func NewClient(server string, httpClient contracts.BaseClientInterface) *ClientWithResponses

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

func (*ClientWithResponses) Create

func (c *ClientWithResponses) Create(ctx context.Context, projectID string, params *CreateParams, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResponse, error)

func (*ClientWithResponses) CreateWithBody

func (c *ClientWithResponses) CreateWithBody(ctx context.Context, projectID string, params *CreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateResponse, error)

CreateWithBody request with arbitrary body returning *CreateResponse

func (*ClientWithResponses) Delete

func (c *ClientWithResponses) Delete(ctx context.Context, projectID string, name string, reqEditors ...RequestEditorFn) (*DeleteResponse, error)

Delete request returning *DeleteResponse

func (*ClientWithResponses) Get

func (c *ClientWithResponses) Get(ctx context.Context, projectID string, name string, reqEditors ...RequestEditorFn) (*GetResponse, error)

Get request returning *GetResponse

func (*ClientWithResponses) List

func (c *ClientWithResponses) List(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListResponse, error)

List request returning *ListResponse

func (*ClientWithResponses) ParseCreateResponse

func (c *ClientWithResponses) ParseCreateResponse(rsp *http.Response) (*CreateResponse, error)

ParseCreateResponse parses an HTTP response from a Create call

func (*ClientWithResponses) ParseDeleteResponse

func (c *ClientWithResponses) ParseDeleteResponse(rsp *http.Response) (*DeleteResponse, error)

ParseDeleteResponse parses an HTTP response from a Delete call

func (*ClientWithResponses) ParseGetResponse

func (c *ClientWithResponses) ParseGetResponse(rsp *http.Response) (*GetResponse, error)

ParseGetResponse parses an HTTP response from a Get call

func (*ClientWithResponses) ParseListResponse

func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)

ParseListResponse parses an HTTP response from a List call

func (*ClientWithResponses) ParseReplaceTargetPoolResponse

func (c *ClientWithResponses) ParseReplaceTargetPoolResponse(rsp *http.Response) (*ReplaceTargetPoolResponse, error)

ParseReplaceTargetPoolResponse parses an HTTP response from a ReplaceTargetPool call

func (*ClientWithResponses) ReplaceTargetPool

func (c *ClientWithResponses) ReplaceTargetPool(ctx context.Context, projectID string, name string, targetPoolName string, body ReplaceTargetPoolJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceTargetPoolResponse, error)

func (*ClientWithResponses) ReplaceTargetPoolWithBody

func (c *ClientWithResponses) ReplaceTargetPoolWithBody(ctx context.Context, projectID string, name string, targetPoolName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceTargetPoolResponse, error)

ReplaceTargetPoolWithBody request with arbitrary body returning *ReplaceTargetPoolResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// List request
	List(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListResponse, error)

	// Create request with any body
	CreateWithBody(ctx context.Context, projectID string, params *CreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateResponse, error)

	Create(ctx context.Context, projectID string, params *CreateParams, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResponse, error)

	// Delete request
	Delete(ctx context.Context, projectID string, name string, reqEditors ...RequestEditorFn) (*DeleteResponse, error)

	// Get request
	Get(ctx context.Context, projectID string, name string, reqEditors ...RequestEditorFn) (*GetResponse, error)

	// ReplaceTargetPool request with any body
	ReplaceTargetPoolWithBody(ctx context.Context, projectID string, name string, targetPoolName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceTargetPoolResponse, error)

	ReplaceTargetPool(ctx context.Context, projectID string, name string, targetPoolName string, body ReplaceTargetPoolJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceTargetPoolResponse, error)
}

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

type CreateJSONRequestBody

type CreateJSONRequestBody = LoadBalancer

CreateJSONRequestBody defines body for Create for application/json ContentType.

type CreateParams

type CreateParams struct {
	XRequestID openapiTypes.UUID `json:"X-Request-ID"`
}

CreateParams defines parameters for Create.

type CreateResponse

type CreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LoadBalancer
	Error        error // Aggregated error
}

func (CreateResponse) Status

func (r CreateResponse) Status() string

Status returns HTTPResponse.Status

func (CreateResponse) StatusCode

func (r CreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (*CreateResponse) WaitHandler

func (*CreateResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, name string) *wait.Handler

Wait will wait for instance create to complete

type DeleteLoadBalancerResponse

type DeleteLoadBalancerResponse = map[string]interface{}

DeleteLoadBalancerResponse Response for deleting a load balancer has an empty body if successful.

type DeleteResponse

type DeleteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeleteLoadBalancerResponse
	Error        error // Aggregated error
}

func (DeleteResponse) Status

func (r DeleteResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteResponse) StatusCode

func (r DeleteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (DeleteResponse) WaitHandler

func (DeleteResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, name string) *wait.Handler

Wait will wait for instance deletion returned value for deletion wait will always be nil

type GetResponse

type GetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LoadBalancer
	Error        error // Aggregated error
}

func (GetResponse) Status

func (r GetResponse) Status() string

Status returns HTTPResponse.Status

func (GetResponse) StatusCode

func (r GetResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListLoadBalancersResponse

type ListLoadBalancersResponse struct {
	LoadBalancers *[]LoadBalancer `json:"loadBalancers,omitempty"`
}

ListLoadBalancersResponse defines model for ListLoadBalancersResponse.

type ListResponse

type ListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListLoadBalancersResponse
	Error        error // Aggregated error
}

func (ListResponse) Status

func (r ListResponse) Status() string

Status returns HTTPResponse.Status

func (ListResponse) StatusCode

func (r ListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Listener

type Listener struct {
	DisplayName *string `json:"displayName,omitempty"`

	// Port Port number where we listen for traffic
	Port *int `json:"port,omitempty"`

	// Protocol Protocol is the highest network protocol we understand to load balance. Currently only PROTOCOL_TCP and PROTOCOL_TCP_PROXY are supported.
	Protocol *ListenerProtocol `json:"protocol,omitempty"`

	// TargetPool Reference target pool by target pool name.
	TargetPool *string `json:"targetPool,omitempty"`
}

Listener defines model for Listener.

type ListenerProtocol

type ListenerProtocol string

ListenerProtocol Protocol is the highest network protocol we understand to load balance. Currently only PROTOCOL_TCP and PROTOCOL_TCP_PROXY are supported.

const (
	PROTOCOL_TCP       ListenerProtocol = "PROTOCOL_TCP"
	PROTOCOL_TCP_PROXY ListenerProtocol = "PROTOCOL_TCP_PROXY"
	PROTOCOL_UDP       ListenerProtocol = "PROTOCOL_UDP"
)

Defines values for ListenerProtocol.

type LoadBalancer

type LoadBalancer struct {
	Errors *[]LoadBalancerError `json:"errors,omitempty"`

	// ExternalAddress External load balancer IP address where this load balancer is exposed.
	ExternalAddress *string `json:"externalAddress,omitempty"`

	// Listeners List of all listeners which will accept traffic.
	Listeners *[]Listener `json:"listeners,omitempty"`

	// Name Load balancer name
	Name *string `json:"name,omitempty"`

	// Networks List of networks that listeners and targets reside in. Currently limited to one.
	Networks *[]Network `json:"networks,omitempty"`

	// Options Defines any optional functionality you want to have enabled on your load balancer.
	Options *LoadBalancerOptions `json:"options,omitempty"`

	// PrivateAddress Transient private load balancer IP address that can change any time.
	PrivateAddress *string             `json:"privateAddress,omitempty"`
	Status         *LoadBalancerStatus `json:"status,omitempty"`

	// TargetPools List of all target pools which will be used in the load balancer.
	TargetPools *[]TargetPool `json:"targetPools,omitempty"`
}

LoadBalancer defines model for LoadBalancer.

type LoadBalancerError

type LoadBalancerError struct {
	Description *string                `json:"description,omitempty"`
	Type        *LoadBalancerErrorType `json:"type,omitempty"`
}

LoadBalancerError defines model for LoadBalancerError.

type LoadBalancerErrorType

type LoadBalancerErrorType string

LoadBalancerErrorType defines model for LoadBalancerError.Type.

const (
	TYPE_INTERNAL                    LoadBalancerErrorType = "TYPE_INTERNAL"
	TYPE_QUOTA_SECGROUPRULE_EXCEEDED LoadBalancerErrorType = "TYPE_QUOTA_SECGROUPRULE_EXCEEDED"
	TYPE_QUOTA_SECGROUP_EXCEEDED     LoadBalancerErrorType = "TYPE_QUOTA_SECGROUP_EXCEEDED"
	TYPE_UNSPECIFIED                 LoadBalancerErrorType = "TYPE_UNSPECIFIED"
)

Defines values for LoadBalancerErrorType.

type LoadBalancerOptions

type LoadBalancerOptions struct {
	AccessControl *LoadbalancerOptionAccessControl `json:"accessControl,omitempty"`

	// PrivateNetworkOnly Load Balancer is accessable only via a private network ip address
	PrivateNetworkOnly *bool `json:"privateNetworkOnly,omitempty"`
}

LoadBalancerOptions Defines any optional functionality you want to have enabled on your load balancer.

type LoadBalancerStatus

type LoadBalancerStatus string

LoadBalancerStatus defines model for LoadBalancer.Status.

const (
	STATUS_ERROR       LoadBalancerStatus = "STATUS_ERROR"
	STATUS_PENDING     LoadBalancerStatus = "STATUS_PENDING"
	STATUS_READY       LoadBalancerStatus = "STATUS_READY"
	STATUS_TERMINATING LoadBalancerStatus = "STATUS_TERMINATING"
	STATUS_UNSPECIFIED LoadBalancerStatus = "STATUS_UNSPECIFIED"
)

Defines values for LoadBalancerStatus.

type LoadbalancerOptionAccessControl

type LoadbalancerOptionAccessControl struct {
	// AllowedSourceRanges Load Balancer is accessable only from an IP address in this range
	AllowedSourceRanges *[]string `json:"allowedSourceRanges,omitempty"`
}

LoadbalancerOptionAccessControl defines model for LoadbalancerOptionAccessControl.

type Network

type Network struct {
	// NetworkId Openstack network ID
	NetworkID *openapiTypes.UUID `json:"networkId,omitempty"`

	// Role The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported.
	Role *NetworkRole `json:"role,omitempty"`
}

Network defines model for Network.

type NetworkRole

type NetworkRole string

NetworkRole The role defines how the load balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported.

const (
	ROLE_LISTENERS_AND_TARGETS NetworkRole = "ROLE_LISTENERS_AND_TARGETS"
)

Defines values for NetworkRole.

type ReplaceTargetPoolJSONRequestBody

type ReplaceTargetPoolJSONRequestBody = TargetPool

ReplaceTargetPoolJSONRequestBody defines body for ReplaceTargetPool for application/json ContentType.

type ReplaceTargetPoolResponse

type ReplaceTargetPoolResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TargetPool
	Error        error // Aggregated error
}

func (ReplaceTargetPoolResponse) Status

func (r ReplaceTargetPoolResponse) Status() string

Status returns HTTPResponse.Status

func (ReplaceTargetPoolResponse) StatusCode

func (r ReplaceTargetPoolResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type Target

type Target struct {
	// DisplayName Target name
	DisplayName *string `json:"displayName,omitempty"`

	// Ip Target IP
	Ip *string `json:"ip,omitempty"`
}

Target defines model for Target.

type TargetPool

type TargetPool struct {
	ActiveHealthCheck *ActiveHealthCheck `json:"activeHealthCheck,omitempty"`

	// Name Target pool name
	Name *string `json:"name,omitempty"`

	// TargetPort Identical port number where each target listens for traffic.
	TargetPort *int      `json:"targetPort,omitempty"`
	Targets    *[]Target `json:"targets,omitempty"`
}

TargetPool defines model for TargetPool.

Jump to

Keyboard shortcuts

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