ssxclientapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateNewDeploymentRequest

func NewCreateNewDeploymentRequest(server string, accountName string, params *CreateNewDeploymentParams, body CreateNewDeploymentJSONRequestBody) (*http.Request, error)

NewCreateNewDeploymentRequest calls the generic CreateNewDeployment builder with application/json body

func NewCreateNewDeploymentRequestWithBody

func NewCreateNewDeploymentRequestWithBody(server string, accountName string, params *CreateNewDeploymentParams, contentType string, body io.Reader) (*http.Request, error)

NewCreateNewDeploymentRequestWithBody generates requests for CreateNewDeployment with any type of body

func NewDeleteDeploymentRequest

func NewDeleteDeploymentRequest(server string, accountName string, uid string, params *DeleteDeploymentParams) (*http.Request, error)

NewDeleteDeploymentRequest generates requests for DeleteDeployment

func NewGenerateNewTokenRequest

func NewGenerateNewTokenRequest(server string, params *GenerateNewTokenParams) (*http.Request, error)

NewGenerateNewTokenRequest generates requests for GenerateNewToken

func NewGetDeploymentsListRequest

func NewGetDeploymentsListRequest(server string, accountName string, params *GetDeploymentsListParams) (*http.Request, error)

NewGetDeploymentsListRequest generates requests for GetDeploymentsList

Types

type AuthTokenResponse

type AuthTokenResponse struct {
	Token *string `json:"token,omitempty"`
}

AuthTokenResponse defines model for AuthTokenResponse.

type AuthorizationToken

type AuthorizationToken = string

AuthorizationToken defines model for Authorization-token.

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

func (c *Client) CreateNewDeployment(ctx context.Context, accountName string, params *CreateNewDeploymentParams, body CreateNewDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateNewDeploymentWithBody

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

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(ctx context.Context, accountName string, uid string, params *DeleteDeploymentParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GenerateNewToken

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

func (*Client) GetDeploymentsList

func (c *Client) GetDeploymentsList(ctx context.Context, accountName string, params *GetDeploymentsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GenerateNewToken request
	GenerateNewToken(ctx context.Context, params *GenerateNewTokenParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDeploymentsList request
	GetDeploymentsList(ctx context.Context, accountName string, params *GetDeploymentsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateNewDeployment request with any body
	CreateNewDeploymentWithBody(ctx context.Context, accountName string, params *CreateNewDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateNewDeployment(ctx context.Context, accountName string, params *CreateNewDeploymentParams, body CreateNewDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteDeployment request
	DeleteDeployment(ctx context.Context, accountName string, uid string, params *DeleteDeploymentParams, 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 (*ClientWithResponses) CreateNewDeploymentWithBodyWithResponse

func (c *ClientWithResponses) CreateNewDeploymentWithBodyWithResponse(ctx context.Context, accountName string, params *CreateNewDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateNewDeploymentResponse, error)

CreateNewDeploymentWithBodyWithResponse request with arbitrary body returning *CreateNewDeploymentResponse

func (*ClientWithResponses) CreateNewDeploymentWithResponse

func (c *ClientWithResponses) CreateNewDeploymentWithResponse(ctx context.Context, accountName string, params *CreateNewDeploymentParams, body CreateNewDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateNewDeploymentResponse, error)

func (*ClientWithResponses) DeleteDeploymentWithResponse

func (c *ClientWithResponses) DeleteDeploymentWithResponse(ctx context.Context, accountName string, uid string, params *DeleteDeploymentParams, reqEditors ...RequestEditorFn) (*DeleteDeploymentResponse, error)

DeleteDeploymentWithResponse request returning *DeleteDeploymentResponse

func (*ClientWithResponses) GenerateNewTokenWithResponse

func (c *ClientWithResponses) GenerateNewTokenWithResponse(ctx context.Context, params *GenerateNewTokenParams, reqEditors ...RequestEditorFn) (*GenerateNewTokenResponse, error)

GenerateNewTokenWithResponse request returning *GenerateNewTokenResponse

func (*ClientWithResponses) GetDeploymentsListWithResponse

func (c *ClientWithResponses) GetDeploymentsListWithResponse(ctx context.Context, accountName string, params *GetDeploymentsListParams, reqEditors ...RequestEditorFn) (*GetDeploymentsListResponse, error)

GetDeploymentsListWithResponse request returning *GetDeploymentsListResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GenerateNewToken request
	GenerateNewTokenWithResponse(ctx context.Context, params *GenerateNewTokenParams, reqEditors ...RequestEditorFn) (*GenerateNewTokenResponse, error)

	// GetDeploymentsList request
	GetDeploymentsListWithResponse(ctx context.Context, accountName string, params *GetDeploymentsListParams, reqEditors ...RequestEditorFn) (*GetDeploymentsListResponse, error)

	// CreateNewDeployment request with any body
	CreateNewDeploymentWithBodyWithResponse(ctx context.Context, accountName string, params *CreateNewDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateNewDeploymentResponse, error)

	CreateNewDeploymentWithResponse(ctx context.Context, accountName string, params *CreateNewDeploymentParams, body CreateNewDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateNewDeploymentResponse, error)

	// DeleteDeployment request
	DeleteDeploymentWithResponse(ctx context.Context, accountName string, uid string, params *DeleteDeploymentParams, reqEditors ...RequestEditorFn) (*DeleteDeploymentResponse, error)
}

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

type CreateNewDeploymentJSONRequestBody

type CreateNewDeploymentJSONRequestBody = DeploymentCreateRequest

CreateNewDeploymentJSONRequestBody defines body for CreateNewDeployment for application/json ContentType.

type CreateNewDeploymentParams

type CreateNewDeploymentParams struct {
	// AuthorizationToken The token returned from the authorization endpoint. Use this token in each request.
	AuthorizationToken AuthorizationToken `json:"Authorization: Token"`
}

CreateNewDeploymentParams defines parameters for CreateNewDeployment.

type CreateNewDeploymentResponse

type CreateNewDeploymentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeploymentCreateResponse
}

func ParseCreateNewDeploymentResponse

func ParseCreateNewDeploymentResponse(rsp *http.Response) (*CreateNewDeploymentResponse, error)

ParseCreateNewDeploymentResponse parses an HTTP response from a CreateNewDeploymentWithResponse call

func (CreateNewDeploymentResponse) Status

Status returns HTTPResponse.Status

func (CreateNewDeploymentResponse) StatusCode

func (r CreateNewDeploymentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteDeploymentParams

type DeleteDeploymentParams struct {
	// AuthorizationToken The token returned from the authorization endpoint. Use this token in each request.
	AuthorizationToken AuthorizationToken `json:"Authorization: Token"`
}

DeleteDeploymentParams defines parameters for DeleteDeployment.

type DeleteDeploymentResponse

type DeleteDeploymentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DeploymentDeleteResponse
}

func ParseDeleteDeploymentResponse

func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentResponse, error)

ParseDeleteDeploymentResponse parses an HTTP response from a DeleteDeploymentWithResponse call

func (DeleteDeploymentResponse) Status

func (r DeleteDeploymentResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteDeploymentResponse) StatusCode

func (r DeleteDeploymentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeploymentCreateRequest

type DeploymentCreateRequest struct {
	Application           string  `json:"application"`
	ApplicationVersion    string  `json:"application_version"`
	CloudProviderId       string  `json:"cloud_provider_id"`
	Name                  string  `json:"name"`
	NumAdditionalAppNodes *int32  `json:"num_additional_app_nodes,omitempty"`
	Plan                  string  `json:"plan"`
	PlanType              string  `json:"plan_type"`
	PrivateVpc            *string `json:"private_vpc,omitempty"`
	RegionId              string  `json:"region_id"`
	TerminationLock       bool    `json:"termination_lock"`
}

DeploymentCreateRequest defines model for DeploymentCreateRequest.

type DeploymentCreateResponse

type DeploymentCreateResponse struct {
	Application           string                                  `json:"application"`
	ApplicationVersion    string                                  `json:"application_version"`
	CloudProviderId       DeploymentCreateResponseCloudProviderId `json:"cloud_provider_id"`
	Name                  string                                  `json:"name"`
	NumAdditionalAppNodes *int32                                  `json:"num_additional_app_nodes,omitempty"`
	Plan                  string                                  `json:"plan"`
	PlanType              string                                  `json:"plan_type"`
	PrivateVpc            *int32                                  `json:"private_vpc,omitempty"`
	RegionId              string                                  `json:"region_id"`
	TerminationLock       bool                                    `json:"termination_lock"`
}

DeploymentCreateResponse defines model for DeploymentCreateResponse.

type DeploymentCreateResponseCloudProviderId

type DeploymentCreateResponseCloudProviderId string

DeploymentCreateResponseCloudProviderId defines model for DeploymentCreateResponse.CloudProviderId.

Defines values for DeploymentCreateResponseCloudProviderId.

type DeploymentDeleteResponse

type DeploymentDeleteResponse struct {
	Message *string `json:"message,omitempty"`
	Success *bool   `json:"success,omitempty"`
}

DeploymentDeleteResponse defines model for DeploymentDeleteResponse.

type DeploymentListResponse

type DeploymentListResponse struct {
	Count    *int32  `json:"count,omitempty"`
	Next     *string `json:"next,omitempty"`
	Previous *string `json:"previous,omitempty"`
	Results  *[]struct {
		Application                 *string             `json:"application,omitempty"`
		ApplicationNodesCount       *int32              `json:"application_nodes_count,omitempty"`
		ApplicationVersion          *string             `json:"application_version,omitempty"`
		Backup                      *string             `json:"backup,omitempty"`
		BackupsEnabled              *bool               `json:"backups_enabled,omitempty"`
		CloudProvider               *string             `json:"cloud_provider,omitempty"`
		CloudProviderId             *string             `json:"cloud_provider_id,omitempty"`
		DateCreated                 *openapi_types.Date `json:"date_created,omitempty"`
		DeploymentType              *string             `json:"deployment_type,omitempty"`
		DesiredTier                 *string             `json:"desired_tier,omitempty"`
		Dr                          *string             `json:"dr,omitempty"`
		DrEnabled                   *bool               `json:"dr_enabled,omitempty"`
		DrPlanType                  *string             `json:"dr_plan_type,omitempty"`
		HttpEndpoint                *string             `json:"http_endpoint,omitempty"`
		IsMasterSlave               *bool               `json:"is_master_slave,omitempty"`
		Name                        *string             `json:"name,omitempty"`
		NumAdditionalAppNodes       *int32              `json:"num_additional_app_nodes,omitempty"`
		NumAdditionalZookeeperNodes *int32              `json:"num_additional_zookeeper_nodes,omitempty"`
		NumNodesDefault             *int32              `json:"num_nodes_default,omitempty"`
		NumZookeeperNodesDefault    *int32              `json:"num_zookeeper_nodes_default,omitempty"`
		Onboarding                  *bool               `json:"onboarding,omitempty"`
		PaymentMethod               *string             `json:"payment_method,omitempty"`
		Plan                        *string             `json:"plan,omitempty"`
		PlanType                    *string             `json:"plan_type,omitempty"`
		ProvisionState              *string             `json:"provision_state,omitempty"`
		PurchaseOrder               *string             `json:"purchase_order,omitempty"`
		RegionId                    *string             `json:"region_id,omitempty"`
		Savings                     *string             `json:"savings,omitempty"`
		SecurityPack                *bool               `json:"security_pack,omitempty"`
		SelectedNodeCount           *int32              `json:"selected_node_count,omitempty"`
		SelectedPlanMemory          *int32              `json:"selected_plan_memory,omitempty"`
		SelectedPlanStorage         *int32              `json:"selected_plan_storage,omitempty"`
		Servers                     *string             `json:"servers,omitempty"`
		SlaActive                   *bool               `json:"sla_active,omitempty"`
		Specifications              *string             `json:"specifications,omitempty"`
		StateChanged                *string             `json:"state_changed,omitempty"`
		Status                      *string             `json:"status,omitempty"`
		Subscription                *string             `json:"subscription,omitempty"`
		Tag                         *string             `json:"tag,omitempty"`
		TermEnd                     *string             `json:"term_end,omitempty"`
		TerminationLock             *bool               `json:"termination_lock,omitempty"`
		Tier                        *string             `json:"tier,omitempty"`
		Uid                         *string             `json:"uid,omitempty"`
		VpcName                     *string             `json:"vpc_name,omitempty"`
		VpcType                     *string             `json:"vpc_type,omitempty"`
		ZookeeperEnsemble           *string             `json:"zookeeper_ensemble,omitempty"`
	} `json:"results,omitempty"`
}

DeploymentListResponse defines model for DeploymentListResponse.

type GenerateNewTokenParams

type GenerateNewTokenParams struct {
	// Username This is the email address used when you log into the SearchStax server.
	Username string `form:"username" json:"username"`

	// Password This is the password associated with that username.
	Password string `form:"password" json:"password"`

	// TfaToken This is a six-digit code supplied by the Google Authenticator to enable two-factor authentication. Each code is good for one minute, so move fast. <br> The eight-character backup codes work with no time limit, but only once each.<br> If TFA is not enabled for this user account, this token is ignored.
	TfaToken *string `form:"tfa_token,omitempty" json:"tfa_token,omitempty"`
}

GenerateNewTokenParams defines parameters for GenerateNewToken.

type GenerateNewTokenResponse

type GenerateNewTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseGenerateNewTokenResponse

func ParseGenerateNewTokenResponse(rsp *http.Response) (*GenerateNewTokenResponse, error)

ParseGenerateNewTokenResponse parses an HTTP response from a GenerateNewTokenWithResponse call

func (GenerateNewTokenResponse) Status

func (r GenerateNewTokenResponse) Status() string

Status returns HTTPResponse.Status

func (GenerateNewTokenResponse) StatusCode

func (r GenerateNewTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDeploymentsListParams

type GetDeploymentsListParams struct {
	// AuthorizationToken The token returned from the authorization endpoint. Use this token in each request.
	AuthorizationToken AuthorizationToken `json:"Authorization: Token"`
}

GetDeploymentsListParams defines parameters for GetDeploymentsList.

type GetDeploymentsListResponse

type GetDeploymentsListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DeploymentListResponse
}

func ParseGetDeploymentsListResponse

func ParseGetDeploymentsListResponse(rsp *http.Response) (*GetDeploymentsListResponse, error)

ParseGetDeploymentsListResponse parses an HTTP response from a GetDeploymentsListWithResponse call

func (GetDeploymentsListResponse) Status

Status returns HTTPResponse.Status

func (GetDeploymentsListResponse) StatusCode

func (r GetDeploymentsListResponse) 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 RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

Jump to

Keyboard shortcuts

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