project

package
v1.27.2 Latest Latest
Warning

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

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

Documentation

Overview

Package project 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 NewDisableProjectRequest

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

NewDisableProjectRequest generates requests for DisableProject

func NewEnableProjectRequest

func NewEnableProjectRequest(ctx context.Context, server string, projectID string, params *EnableProjectParams) (*http.Request, error)

NewEnableProjectRequest generates requests for EnableProject

func NewGetStatusRequest

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

NewGetStatusRequest generates requests for GetStatus

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

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

func (*Client) EnableProjectRaw

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

func (*Client) GetStatusRaw

func (c *Client) GetStatusRaw(ctx context.Context, projectID string, 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) DisableProject

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

DisableProject request returning *DisableProjectResponse

func (*ClientWithResponses) EnableProject

func (c *ClientWithResponses) EnableProject(ctx context.Context, projectID string, params *EnableProjectParams, reqEditors ...RequestEditorFn) (*EnableProjectResponse, error)

EnableProject request returning *EnableProjectResponse

func (*ClientWithResponses) GetStatus

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

GetStatus request returning *GetStatusResponse

func (*ClientWithResponses) ParseDisableProjectResponse

func (c *ClientWithResponses) ParseDisableProjectResponse(rsp *http.Response) (*DisableProjectResponse, error)

ParseDisableProjectResponse parses an HTTP response from a DisableProject call

func (*ClientWithResponses) ParseEnableProjectResponse

func (c *ClientWithResponses) ParseEnableProjectResponse(rsp *http.Response) (*EnableProjectResponse, error)

ParseEnableProjectResponse parses an HTTP response from a EnableProject call

func (*ClientWithResponses) ParseGetStatusResponse

func (c *ClientWithResponses) ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)

ParseGetStatusResponse parses an HTTP response from a GetStatus call

type ClientWithResponsesInterface

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

	// GetStatus request
	GetStatus(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)

	// EnableProject request
	EnableProject(ctx context.Context, projectID string, params *EnableProjectParams, reqEditors ...RequestEditorFn) (*EnableProjectResponse, error)
}

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

type DisableProjectResponse

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

func (DisableProjectResponse) Status

func (r DisableProjectResponse) Status() string

Status returns HTTPResponse.Status

func (DisableProjectResponse) StatusCode

func (r DisableProjectResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (*DisableProjectResponse) WaitHandler

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

type DisableResponse

type DisableResponse = map[string]interface{}

DisableResponse Response for disabling the load balancer has empty body if successful.

type EnableProjectParams

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

EnableProjectParams defines parameters for EnableProject.

type EnableProjectResponse

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

func (EnableProjectResponse) Status

func (r EnableProjectResponse) Status() string

Status returns HTTPResponse.Status

func (EnableProjectResponse) StatusCode

func (r EnableProjectResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (*EnableProjectResponse) WaitHandler

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

type EnableResponse

type EnableResponse = map[string]interface{}

EnableResponse Response for enabling the load balancer has empty body if successful.

type GetStatusResponse

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

func (GetStatusResponse) Status

func (r GetStatusResponse) Status() string

Status returns HTTPResponse.Status

func (GetStatusResponse) StatusCode

func (r GetStatusResponse) 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 StatusResponse

type StatusResponse struct {
	// Status status of the project
	Status *StatusResponseStatus `json:"status,omitempty"`
}

StatusResponse Response with customer project status.

type StatusResponseStatus

type StatusResponseStatus string

StatusResponseStatus status of the project

const (
	STATUS_DELETING    StatusResponseStatus = "STATUS_DELETING"
	STATUS_DISABLED    StatusResponseStatus = "STATUS_DISABLED"
	STATUS_FAILED      StatusResponseStatus = "STATUS_FAILED"
	STATUS_READY       StatusResponseStatus = "STATUS_READY"
	STATUS_UNSPECIFIED StatusResponseStatus = "STATUS_UNSPECIFIED"
	STATUS_UPDATING    StatusResponseStatus = "STATUS_UPDATING"
)

Defines values for StatusResponseStatus.

Jump to

Keyboard shortcuts

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