iaas

package
v1.29.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

View Source
var BaseURLs = baseurl.New(
	"iaas",
	"https://iaas.api.eu01.stackit.cloud/",
)

Functions

func NewV1CreateNetworkRequest

func NewV1CreateNetworkRequest(ctx context.Context, server string, projectId openapiTypes.UUID, body V1CreateNetworkJSONRequestBody) (*http.Request, error)

NewV1CreateNetworkRequest calls the generic V1CreateNetwork builder with application/json body

func NewV1CreateNetworkRequestWithBody

func NewV1CreateNetworkRequestWithBody(ctx context.Context, server string, projectId openapiTypes.UUID, contentType string, body io.Reader) (*http.Request, error)

NewV1CreateNetworkRequestWithBody generates requests for V1CreateNetwork with any type of body

func NewV1DeleteNetworkRequest

func NewV1DeleteNetworkRequest(ctx context.Context, server string, projectId openapiTypes.UUID, networkId openapiTypes.UUID) (*http.Request, error)

NewV1DeleteNetworkRequest generates requests for V1DeleteNetwork

func NewV1GetNetworkRequest

func NewV1GetNetworkRequest(ctx context.Context, server string, projectId openapiTypes.UUID, networkId openapiTypes.UUID) (*http.Request, error)

NewV1GetNetworkRequest generates requests for V1GetNetwork

func NewV1GetOpenStackNetworkDetailsRequest

func NewV1GetOpenStackNetworkDetailsRequest(ctx context.Context, server string, projectId openapiTypes.UUID, networkId openapiTypes.UUID) (*http.Request, error)

NewV1GetOpenStackNetworkDetailsRequest generates requests for V1GetOpenStackNetworkDetails

func NewV1ListNetworksInProjectRequest

func NewV1ListNetworksInProjectRequest(ctx context.Context, server string, projectId openapiTypes.UUID) (*http.Request, error)

NewV1ListNetworksInProjectRequest generates requests for V1ListNetworksInProject

func NewV1UpdateNetworkRequest

func NewV1UpdateNetworkRequest(ctx context.Context, server string, projectId openapiTypes.UUID, networkId openapiTypes.UUID, body V1UpdateNetworkJSONRequestBody) (*http.Request, error)

NewV1UpdateNetworkRequest calls the generic V1UpdateNetwork builder with application/json body

func NewV1UpdateNetworkRequestWithBody

func NewV1UpdateNetworkRequestWithBody(ctx context.Context, server string, projectId openapiTypes.UUID, networkId openapiTypes.UUID, contentType string, body io.Reader) (*http.Request, error)

NewV1UpdateNetworkRequestWithBody generates requests for V1UpdateNetwork with any type of body

func ValidateNetworkName added in v1.29.7

func ValidateNetworkName(name string) error

ValidateNetworkName validates a given network name

Types

type BadRequest

type BadRequest = V1Error

BadRequest Error with HTTP error code and an error message.

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) V1CreateNetworkRaw

func (c *Client) V1CreateNetworkRaw(ctx context.Context, projectId openapiTypes.UUID, body V1CreateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) V1CreateNetworkRawWithBody

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

func (*Client) V1DeleteNetworkRaw

func (c *Client) V1DeleteNetworkRaw(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) V1GetNetworkRaw

func (c *Client) V1GetNetworkRaw(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) V1GetOpenStackNetworkDetailsRaw

func (c *Client) V1GetOpenStackNetworkDetailsRaw(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) V1ListNetworksInProjectRaw

func (c *Client) V1ListNetworksInProjectRaw(ctx context.Context, projectId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) V1UpdateNetworkRaw

func (c *Client) V1UpdateNetworkRaw(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, body V1UpdateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) V1UpdateNetworkRawWithBody

func (c *Client) V1UpdateNetworkRawWithBody(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, 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) ParseV1CreateNetworkResponse

func (c *ClientWithResponses) ParseV1CreateNetworkResponse(rsp *http.Response) (*V1CreateNetworkResponse, error)

ParseV1CreateNetworkResponse parses an HTTP response from a V1CreateNetwork call

func (*ClientWithResponses) ParseV1DeleteNetworkResponse

func (c *ClientWithResponses) ParseV1DeleteNetworkResponse(rsp *http.Response) (*V1DeleteNetworkResponse, error)

ParseV1DeleteNetworkResponse parses an HTTP response from a V1DeleteNetwork call

func (*ClientWithResponses) ParseV1GetNetworkResponse

func (c *ClientWithResponses) ParseV1GetNetworkResponse(rsp *http.Response) (*V1GetNetworkResponse, error)

ParseV1GetNetworkResponse parses an HTTP response from a V1GetNetwork call

func (*ClientWithResponses) ParseV1GetOpenStackNetworkDetailsResponse

func (c *ClientWithResponses) ParseV1GetOpenStackNetworkDetailsResponse(rsp *http.Response) (*V1GetOpenStackNetworkDetailsResponse, error)

ParseV1GetOpenStackNetworkDetailsResponse parses an HTTP response from a V1GetOpenStackNetworkDetails call

func (*ClientWithResponses) ParseV1ListNetworksInProjectResponse

func (c *ClientWithResponses) ParseV1ListNetworksInProjectResponse(rsp *http.Response) (*V1ListNetworksInProjectResponse, error)

ParseV1ListNetworksInProjectResponse parses an HTTP response from a V1ListNetworksInProject call

func (*ClientWithResponses) ParseV1UpdateNetworkResponse

func (c *ClientWithResponses) ParseV1UpdateNetworkResponse(rsp *http.Response) (*V1UpdateNetworkResponse, error)

ParseV1UpdateNetworkResponse parses an HTTP response from a V1UpdateNetwork call

func (*ClientWithResponses) V1CreateNetwork

func (*ClientWithResponses) V1CreateNetworkWithBody

func (c *ClientWithResponses) V1CreateNetworkWithBody(ctx context.Context, projectId openapiTypes.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateNetworkResponse, error)

V1CreateNetworkWithBody request with arbitrary body returning *V1CreateNetworkResponse

func (*ClientWithResponses) V1DeleteNetwork

func (c *ClientWithResponses) V1DeleteNetwork(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1DeleteNetworkResponse, error)

V1DeleteNetwork request returning *V1DeleteNetworkResponse

func (*ClientWithResponses) V1GetNetwork

func (c *ClientWithResponses) V1GetNetwork(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1GetNetworkResponse, error)

V1GetNetwork request returning *V1GetNetworkResponse

func (*ClientWithResponses) V1GetOpenStackNetworkDetails

func (c *ClientWithResponses) V1GetOpenStackNetworkDetails(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1GetOpenStackNetworkDetailsResponse, error)

V1GetOpenStackNetworkDetails request returning *V1GetOpenStackNetworkDetailsResponse

func (*ClientWithResponses) V1ListNetworksInProject

func (c *ClientWithResponses) V1ListNetworksInProject(ctx context.Context, projectId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1ListNetworksInProjectResponse, error)

V1ListNetworksInProject request returning *V1ListNetworksInProjectResponse

func (*ClientWithResponses) V1UpdateNetwork

func (*ClientWithResponses) V1UpdateNetworkWithBody

func (c *ClientWithResponses) V1UpdateNetworkWithBody(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkResponse, error)

V1UpdateNetworkWithBody request with arbitrary body returning *V1UpdateNetworkResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// V1ListNetworksInProject request
	V1ListNetworksInProject(ctx context.Context, projectId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1ListNetworksInProjectResponse, error)

	// V1CreateNetwork request with any body
	V1CreateNetworkWithBody(ctx context.Context, projectId openapiTypes.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateNetworkResponse, error)

	V1CreateNetwork(ctx context.Context, projectId openapiTypes.UUID, body V1CreateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateNetworkResponse, error)

	// V1DeleteNetwork request
	V1DeleteNetwork(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1DeleteNetworkResponse, error)

	// V1GetNetwork request
	V1GetNetwork(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1GetNetworkResponse, error)

	// V1UpdateNetwork request with any body
	V1UpdateNetworkWithBody(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkResponse, error)

	V1UpdateNetwork(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, body V1UpdateNetworkJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateNetworkResponse, error)

	// V1GetOpenStackNetworkDetails request
	V1GetOpenStackNetworkDetails(ctx context.Context, projectId openapiTypes.UUID, networkId openapiTypes.UUID, reqEditors ...RequestEditorFn) (*V1GetOpenStackNetworkDetailsResponse, error)
}

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

type Forbidden

type Forbidden = V1Error

Forbidden Error with HTTP error code and an error message.

type InternalServerError

type InternalServerError = V1Error

InternalServerError Error with HTTP error code and an error message.

type NotFound

type NotFound = V1Error

NotFound Error with HTTP error code and an error message.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type Unauthorized

type Unauthorized = V1Error

Unauthorized Error with HTTP error code and an error message.

type V1CIDR

type V1CIDR = string

V1CIDR Classless Inter-Domain Routing (CIDR).

type V1CreateNetworkJSONBody

type V1CreateNetworkJSONBody struct {
	// Name The name for a General Object. Matches Names and also UUIDs.
	Name V1GenericName `json:"name"`

	// Nameservers List of DNS Servers/Nameservers.
	Nameservers    *V1Nameserver `json:"nameservers,omitempty"`
	PrefixLengthV4 *int          `json:"prefixLengthV4,omitempty"`
}

V1CreateNetworkJSONBody defines parameters for V1CreateNetwork.

type V1CreateNetworkJSONRequestBody

type V1CreateNetworkJSONRequestBody V1CreateNetworkJSONBody

V1CreateNetworkJSONRequestBody defines body for V1CreateNetwork for application/json ContentType.

type V1CreateNetworkResponse

type V1CreateNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *V1RequestResponse
	JSON400      *V1Error
	JSON401      *V1Error
	JSON403      *V1Error
	JSON404      *V1Error
	JSON409      *V1Error
	JSON500      *V1Error
}

func (V1CreateNetworkResponse) Status

func (r V1CreateNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (V1CreateNetworkResponse) StatusCode

func (r V1CreateNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (*V1CreateNetworkResponse) WaitHandler

WaitHandler wait for the network to be created and return it.

type V1DeleteNetworkResponse

type V1DeleteNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *V1Error
	JSON401      *V1Error
	JSON403      *V1Error
	JSON404      *V1Error
	JSON409      *V1Error
	JSON500      *V1Error
}

func (V1DeleteNetworkResponse) Status

func (r V1DeleteNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (V1DeleteNetworkResponse) StatusCode

func (r V1DeleteNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (*V1DeleteNetworkResponse) WaitHandler added in v1.29.2

func (*V1DeleteNetworkResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, networkID openapiTypes.UUID) *wait.Handler

WaitHandler wait for the network to be deleted

type V1Error

type V1Error struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

V1Error Error with HTTP error code and an error message.

type V1GenericName

type V1GenericName = string

V1GenericName The name for a General Object. Matches Names and also UUIDs.

type V1GetNetworkResponse

type V1GetNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *V1Network
	JSON400      *V1Error
	JSON401      *V1Error
	JSON403      *V1Error
	JSON404      *V1Error
	JSON500      *V1Error
}

func (V1GetNetworkResponse) Status

func (r V1GetNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (V1GetNetworkResponse) StatusCode

func (r V1GetNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type V1GetOpenStackNetworkDetailsResponse

type V1GetOpenStackNetworkDetailsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *V1OpenStackNetwork
	JSON400      *V1Error
	JSON401      *V1Error
	JSON403      *V1Error
	JSON404      *V1Error
	JSON500      *V1Error
}

func (V1GetOpenStackNetworkDetailsResponse) Status

Status returns HTTPResponse.Status

func (V1GetOpenStackNetworkDetailsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type V1IP

type V1IP = string

V1IP An IP address.

type V1ListNetworksInProjectResponse

type V1ListNetworksInProjectResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *V1NetworkListResponse
	JSON400      *V1Error
	JSON401      *V1Error
	JSON403      *V1Error
	JSON404      *V1Error
	JSON500      *V1Error
}

func (V1ListNetworksInProjectResponse) Status

Status returns HTTPResponse.Status

func (V1ListNetworksInProjectResponse) StatusCode

func (r V1ListNetworksInProjectResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type V1Nameserver

type V1Nameserver = []V1IP

V1Nameserver List of DNS Servers/Nameservers.

type V1Network

type V1Network struct {
	Name string `json:"name"`

	// Nameservers List of DNS Servers/Nameservers.
	Nameservers *V1Nameserver `json:"nameservers,omitempty"`

	// NetworkId Universally Unique Identifier (UUID).
	NetworkID V1UUID   `json:"networkId"`
	Prefixes  []V1CIDR `json:"prefixes"`

	// PublicIp An IP address.
	PublicIp *V1IP `json:"publicIp,omitempty"`
}

V1Network Object represents a network.

type V1NetworkList

type V1NetworkList = []V1Network

V1NetworkList List of Networks.

type V1NetworkListResponse

type V1NetworkListResponse struct {
	// Items List of Networks.
	Items V1NetworkList `json:"items"`
}

V1NetworkListResponse Network list response.

type V1OpenStackNetwork

type V1OpenStackNetwork struct {
	// Cidr Classless Inter-Domain Routing (CIDR).
	Cidr V1CIDR `json:"cidr"`

	// OpenstackNetworkID Universally Unique Identifier (UUID).
	OpenstackNetworkID V1UUID `json:"openstackNetworkID"`

	// OpenstackRouterID Universally Unique Identifier (UUID).
	OpenstackRouterID V1UUID `json:"openstackRouterID"`

	// OpenstackSubnetID Universally Unique Identifier (UUID).
	OpenstackSubnetID V1UUID `json:"openstackSubnetID"`
}

V1OpenStackNetwork Representation of an OpenStack network.

type V1ReqID

type V1ReqID = string

V1ReqID ID representing a single API request.

type V1RequestResponse

type V1RequestResponse struct {
	// RequestId ID representing a single API request.
	RequestID V1ReqID `json:"requestId"`
}

V1RequestResponse Request response.

type V1UUID

type V1UUID = openapiTypes.UUID

V1UUID Universally Unique Identifier (UUID).

type V1UpdateNetworkJSONBody

type V1UpdateNetworkJSONBody struct {
	// Name The name for a General Object. Matches Names and also UUIDs.
	Name *V1GenericName `json:"name,omitempty"`

	// Nameservers List of DNS Servers/Nameservers.
	Nameservers *V1Nameserver `json:"nameservers,omitempty"`
}

V1UpdateNetworkJSONBody defines parameters for V1UpdateNetwork.

type V1UpdateNetworkJSONRequestBody

type V1UpdateNetworkJSONRequestBody V1UpdateNetworkJSONBody

V1UpdateNetworkJSONRequestBody defines body for V1UpdateNetwork for application/json ContentType.

type V1UpdateNetworkResponse

type V1UpdateNetworkResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *V1Error
	JSON401      *V1Error
	JSON403      *V1Error
	JSON404      *V1Error
	JSON500      *V1Error
}

func (V1UpdateNetworkResponse) Status

func (r V1UpdateNetworkResponse) Status() string

Status returns HTTPResponse.Status

func (V1UpdateNetworkResponse) StatusCode

func (r V1UpdateNetworkResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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