clusters

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for clusters API

func (*Client) GetCluster

func (a *Client) GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error)

GetCluster get cluster API

func (*Client) ListClusters

func (a *Client) ListClusters(params *ListClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListClustersOK, error)

ListClusters list clusters API

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error)

	ListClusters(params *ListClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListClustersOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new clusters API client.

type GetClusterDefault

type GetClusterDefault struct {
	Payload *cloud.GoogleRPCStatus
	// contains filtered or unexported fields
}

GetClusterDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewGetClusterDefault

func NewGetClusterDefault(code int) *GetClusterDefault

NewGetClusterDefault creates a GetClusterDefault with default headers values

func (*GetClusterDefault) Code

func (o *GetClusterDefault) Code() int

Code gets the status code for the get cluster default response

func (*GetClusterDefault) Error

func (o *GetClusterDefault) Error() string

func (*GetClusterDefault) GetPayload

func (o *GetClusterDefault) GetPayload() *cloud.GoogleRPCStatus

func (*GetClusterDefault) IsClientError

func (o *GetClusterDefault) IsClientError() bool

IsClientError returns true when this get cluster default response has a 4xx status code

func (*GetClusterDefault) IsCode

func (o *GetClusterDefault) IsCode(code int) bool

IsCode returns true when this get cluster default response a status code equal to that given

func (*GetClusterDefault) IsRedirect

func (o *GetClusterDefault) IsRedirect() bool

IsRedirect returns true when this get cluster default response has a 3xx status code

func (*GetClusterDefault) IsServerError

func (o *GetClusterDefault) IsServerError() bool

IsServerError returns true when this get cluster default response has a 5xx status code

func (*GetClusterDefault) IsSuccess

func (o *GetClusterDefault) IsSuccess() bool

IsSuccess returns true when this get cluster default response has a 2xx status code

func (*GetClusterDefault) String

func (o *GetClusterDefault) String() string

type GetClusterOK

GetClusterOK describes a response with status code 200, with default header values.

A successful response.

func NewGetClusterOK

func NewGetClusterOK() *GetClusterOK

NewGetClusterOK creates a GetClusterOK with default headers values

func (*GetClusterOK) Code

func (o *GetClusterOK) Code() int

Code gets the status code for the get cluster o k response

func (*GetClusterOK) Error

func (o *GetClusterOK) Error() string

func (*GetClusterOK) IsClientError

func (o *GetClusterOK) IsClientError() bool

IsClientError returns true when this get cluster o k response has a 4xx status code

func (*GetClusterOK) IsCode

func (o *GetClusterOK) IsCode(code int) bool

IsCode returns true when this get cluster o k response a status code equal to that given

func (*GetClusterOK) IsRedirect

func (o *GetClusterOK) IsRedirect() bool

IsRedirect returns true when this get cluster o k response has a 3xx status code

func (*GetClusterOK) IsServerError

func (o *GetClusterOK) IsServerError() bool

IsServerError returns true when this get cluster o k response has a 5xx status code

func (*GetClusterOK) IsSuccess

func (o *GetClusterOK) IsSuccess() bool

IsSuccess returns true when this get cluster o k response has a 2xx status code

func (*GetClusterOK) String

func (o *GetClusterOK) String() string

type GetClusterParams

type GetClusterParams struct {

	/* ResourceName.

	   Resource name will be of the form `consul/project/<project_id>/cluster/<cluster_id>`
	*/
	ResourceName string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetClusterParams contains all the parameters to send to the API endpoint

for the get cluster operation.

Typically these are written to a http.Request.

func NewGetClusterParams

func NewGetClusterParams() *GetClusterParams

NewGetClusterParams creates a new GetClusterParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetClusterParamsWithContext

func NewGetClusterParamsWithContext(ctx context.Context) *GetClusterParams

NewGetClusterParamsWithContext creates a new GetClusterParams object with the ability to set a context for a request.

func NewGetClusterParamsWithHTTPClient

func NewGetClusterParamsWithHTTPClient(client *http.Client) *GetClusterParams

NewGetClusterParamsWithHTTPClient creates a new GetClusterParams object with the ability to set a custom HTTPClient for a request.

func NewGetClusterParamsWithTimeout

func NewGetClusterParamsWithTimeout(timeout time.Duration) *GetClusterParams

NewGetClusterParamsWithTimeout creates a new GetClusterParams object with the ability to set a timeout on a request.

func (*GetClusterParams) SetContext

func (o *GetClusterParams) SetContext(ctx context.Context)

SetContext adds the context to the get cluster params

func (*GetClusterParams) SetDefaults

func (o *GetClusterParams) SetDefaults()

SetDefaults hydrates default values in the get cluster params (not the query body).

All values with no default are reset to their zero value.

func (*GetClusterParams) SetHTTPClient

func (o *GetClusterParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get cluster params

func (*GetClusterParams) SetResourceName

func (o *GetClusterParams) SetResourceName(resourceName string)

SetResourceName adds the resourceName to the get cluster params

func (*GetClusterParams) SetTimeout

func (o *GetClusterParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get cluster params

func (*GetClusterParams) WithContext

func (o *GetClusterParams) WithContext(ctx context.Context) *GetClusterParams

WithContext adds the context to the get cluster params

func (*GetClusterParams) WithDefaults

func (o *GetClusterParams) WithDefaults() *GetClusterParams

WithDefaults hydrates default values in the get cluster params (not the query body).

All values with no default are reset to their zero value.

func (*GetClusterParams) WithHTTPClient

func (o *GetClusterParams) WithHTTPClient(client *http.Client) *GetClusterParams

WithHTTPClient adds the HTTPClient to the get cluster params

func (*GetClusterParams) WithResourceName

func (o *GetClusterParams) WithResourceName(resourceName string) *GetClusterParams

WithResourceName adds the resourceName to the get cluster params

func (*GetClusterParams) WithTimeout

func (o *GetClusterParams) WithTimeout(timeout time.Duration) *GetClusterParams

WithTimeout adds the timeout to the get cluster params

func (*GetClusterParams) WriteToRequest

func (o *GetClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetClusterReader

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

GetClusterReader is a Reader for the GetCluster structure.

func (*GetClusterReader) ReadResponse

func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type ListClustersDefault

type ListClustersDefault struct {
	Payload *cloud.GoogleRPCStatus
	// contains filtered or unexported fields
}

ListClustersDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewListClustersDefault

func NewListClustersDefault(code int) *ListClustersDefault

NewListClustersDefault creates a ListClustersDefault with default headers values

func (*ListClustersDefault) Code

func (o *ListClustersDefault) Code() int

Code gets the status code for the list clusters default response

func (*ListClustersDefault) Error

func (o *ListClustersDefault) Error() string

func (*ListClustersDefault) GetPayload

func (o *ListClustersDefault) GetPayload() *cloud.GoogleRPCStatus

func (*ListClustersDefault) IsClientError

func (o *ListClustersDefault) IsClientError() bool

IsClientError returns true when this list clusters default response has a 4xx status code

func (*ListClustersDefault) IsCode

func (o *ListClustersDefault) IsCode(code int) bool

IsCode returns true when this list clusters default response a status code equal to that given

func (*ListClustersDefault) IsRedirect

func (o *ListClustersDefault) IsRedirect() bool

IsRedirect returns true when this list clusters default response has a 3xx status code

func (*ListClustersDefault) IsServerError

func (o *ListClustersDefault) IsServerError() bool

IsServerError returns true when this list clusters default response has a 5xx status code

func (*ListClustersDefault) IsSuccess

func (o *ListClustersDefault) IsSuccess() bool

IsSuccess returns true when this list clusters default response has a 2xx status code

func (*ListClustersDefault) String

func (o *ListClustersDefault) String() string

type ListClustersOK

ListClustersOK describes a response with status code 200, with default header values.

A successful response.

func NewListClustersOK

func NewListClustersOK() *ListClustersOK

NewListClustersOK creates a ListClustersOK with default headers values

func (*ListClustersOK) Code

func (o *ListClustersOK) Code() int

Code gets the status code for the list clusters o k response

func (*ListClustersOK) Error

func (o *ListClustersOK) Error() string

func (*ListClustersOK) IsClientError

func (o *ListClustersOK) IsClientError() bool

IsClientError returns true when this list clusters o k response has a 4xx status code

func (*ListClustersOK) IsCode

func (o *ListClustersOK) IsCode(code int) bool

IsCode returns true when this list clusters o k response a status code equal to that given

func (*ListClustersOK) IsRedirect

func (o *ListClustersOK) IsRedirect() bool

IsRedirect returns true when this list clusters o k response has a 3xx status code

func (*ListClustersOK) IsServerError

func (o *ListClustersOK) IsServerError() bool

IsServerError returns true when this list clusters o k response has a 5xx status code

func (*ListClustersOK) IsSuccess

func (o *ListClustersOK) IsSuccess() bool

IsSuccess returns true when this list clusters o k response has a 2xx status code

func (*ListClustersOK) String

func (o *ListClustersOK) String() string

type ListClustersParams

type ListClustersParams struct {

	/* Name.

	   Query param filter: `name` of the cluster
	*/
	Name *string

	/* OrderBy.

	   Sorts the services based on a field. Allowed fields: `name`, `state`, `created_at`. The value needs to be of the format <{name/state/created_at} {asc/desc}>. For example: `name asc`, `state desc`.
	*/
	OrderBy []string

	/* PaginationNextPageToken.

	     Specifies a page token to use to retrieve the next page. Set this parameter to the
	`next_page_token` returned by previous list requests to get the next page of
	results. If set, `previous_page_token` must not be set.
	*/
	PaginationNextPageToken *string

	/* PaginationPageSize.

	     The maximum number of results per page to return. If the number
	of available results is larger than `page_size`, a `next_page_token` is
	returned, which you can use to get the next page of results in subsequent
	requests. A value of zero causes `page_size` to be defaulted.

	     Format: int64
	*/
	PaginationPageSize *int64

	/* PaginationPreviousPageToken.

	     Specifies a page token to use to retrieve the previous page. Set this parameter to
	the `previous_page_token` returned by previous list requests to get the
	previous page of results. If set, `next_page_token` must not be set.
	*/
	PaginationPreviousPageToken *string

	/* ParentResourceName.

	   Parent Resource name will be of the form `project/<project_id>`
	*/
	ParentResourceName string

	/* State.

	   Query param filter: `state` of the cluster. This can be combination of `creating`, 'pending', `running`, `disconnected`.
	*/
	State []string

	/* Type.

	   Query param filter: `type` of the cluster. This can be combination of `self_managed`, `hcp-managed`.
	*/
	Type []string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ListClustersParams contains all the parameters to send to the API endpoint

for the list clusters operation.

Typically these are written to a http.Request.

func NewListClustersParams

func NewListClustersParams() *ListClustersParams

NewListClustersParams creates a new ListClustersParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewListClustersParamsWithContext

func NewListClustersParamsWithContext(ctx context.Context) *ListClustersParams

NewListClustersParamsWithContext creates a new ListClustersParams object with the ability to set a context for a request.

func NewListClustersParamsWithHTTPClient

func NewListClustersParamsWithHTTPClient(client *http.Client) *ListClustersParams

NewListClustersParamsWithHTTPClient creates a new ListClustersParams object with the ability to set a custom HTTPClient for a request.

func NewListClustersParamsWithTimeout

func NewListClustersParamsWithTimeout(timeout time.Duration) *ListClustersParams

NewListClustersParamsWithTimeout creates a new ListClustersParams object with the ability to set a timeout on a request.

func (*ListClustersParams) SetContext

func (o *ListClustersParams) SetContext(ctx context.Context)

SetContext adds the context to the list clusters params

func (*ListClustersParams) SetDefaults

func (o *ListClustersParams) SetDefaults()

SetDefaults hydrates default values in the list clusters params (not the query body).

All values with no default are reset to their zero value.

func (*ListClustersParams) SetHTTPClient

func (o *ListClustersParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the list clusters params

func (*ListClustersParams) SetName

func (o *ListClustersParams) SetName(name *string)

SetName adds the name to the list clusters params

func (*ListClustersParams) SetOrderBy

func (o *ListClustersParams) SetOrderBy(orderBy []string)

SetOrderBy adds the orderBy to the list clusters params

func (*ListClustersParams) SetPaginationNextPageToken

func (o *ListClustersParams) SetPaginationNextPageToken(paginationNextPageToken *string)

SetPaginationNextPageToken adds the paginationNextPageToken to the list clusters params

func (*ListClustersParams) SetPaginationPageSize

func (o *ListClustersParams) SetPaginationPageSize(paginationPageSize *int64)

SetPaginationPageSize adds the paginationPageSize to the list clusters params

func (*ListClustersParams) SetPaginationPreviousPageToken

func (o *ListClustersParams) SetPaginationPreviousPageToken(paginationPreviousPageToken *string)

SetPaginationPreviousPageToken adds the paginationPreviousPageToken to the list clusters params

func (*ListClustersParams) SetParentResourceName

func (o *ListClustersParams) SetParentResourceName(parentResourceName string)

SetParentResourceName adds the parentResourceName to the list clusters params

func (*ListClustersParams) SetState

func (o *ListClustersParams) SetState(state []string)

SetState adds the state to the list clusters params

func (*ListClustersParams) SetTimeout

func (o *ListClustersParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the list clusters params

func (*ListClustersParams) SetType

func (o *ListClustersParams) SetType(typeVar []string)

SetType adds the type to the list clusters params

func (*ListClustersParams) WithContext

WithContext adds the context to the list clusters params

func (*ListClustersParams) WithDefaults

func (o *ListClustersParams) WithDefaults() *ListClustersParams

WithDefaults hydrates default values in the list clusters params (not the query body).

All values with no default are reset to their zero value.

func (*ListClustersParams) WithHTTPClient

func (o *ListClustersParams) WithHTTPClient(client *http.Client) *ListClustersParams

WithHTTPClient adds the HTTPClient to the list clusters params

func (*ListClustersParams) WithName

func (o *ListClustersParams) WithName(name *string) *ListClustersParams

WithName adds the name to the list clusters params

func (*ListClustersParams) WithOrderBy

func (o *ListClustersParams) WithOrderBy(orderBy []string) *ListClustersParams

WithOrderBy adds the orderBy to the list clusters params

func (*ListClustersParams) WithPaginationNextPageToken

func (o *ListClustersParams) WithPaginationNextPageToken(paginationNextPageToken *string) *ListClustersParams

WithPaginationNextPageToken adds the paginationNextPageToken to the list clusters params

func (*ListClustersParams) WithPaginationPageSize

func (o *ListClustersParams) WithPaginationPageSize(paginationPageSize *int64) *ListClustersParams

WithPaginationPageSize adds the paginationPageSize to the list clusters params

func (*ListClustersParams) WithPaginationPreviousPageToken

func (o *ListClustersParams) WithPaginationPreviousPageToken(paginationPreviousPageToken *string) *ListClustersParams

WithPaginationPreviousPageToken adds the paginationPreviousPageToken to the list clusters params

func (*ListClustersParams) WithParentResourceName

func (o *ListClustersParams) WithParentResourceName(parentResourceName string) *ListClustersParams

WithParentResourceName adds the parentResourceName to the list clusters params

func (*ListClustersParams) WithState

func (o *ListClustersParams) WithState(state []string) *ListClustersParams

WithState adds the state to the list clusters params

func (*ListClustersParams) WithTimeout

func (o *ListClustersParams) WithTimeout(timeout time.Duration) *ListClustersParams

WithTimeout adds the timeout to the list clusters params

func (*ListClustersParams) WithType

func (o *ListClustersParams) WithType(typeVar []string) *ListClustersParams

WithType adds the typeVar to the list clusters params

func (*ListClustersParams) WriteToRequest

func (o *ListClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type ListClustersReader

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

ListClustersReader is a Reader for the ListClusters structure.

func (*ListClustersReader) ReadResponse

func (o *ListClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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