version

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 12 Imported by: 1

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 version API

func (*Client) Info

func (a *Client) Info(params *InfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InfoOK, error)

Info returns the current version information of this module

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption added in v0.13.1

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

type ClientService added in v0.11.0

type ClientService interface {
	Info(params *InfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InfoOK, 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 version API client.

func NewClientWithBasicAuth added in v0.32.0

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new version API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken added in v0.32.0

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new version API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type InfoDefault added in v0.15.7

type InfoDefault struct {
	Payload *httperrors.HTTPErrorResponse
	// contains filtered or unexported fields
}

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

Error

func NewInfoDefault added in v0.15.7

func NewInfoDefault(code int) *InfoDefault

NewInfoDefault creates a InfoDefault with default headers values

func (*InfoDefault) Code added in v0.15.7

func (o *InfoDefault) Code() int

Code gets the status code for the info default response

func (*InfoDefault) Error added in v0.15.7

func (o *InfoDefault) Error() string

func (*InfoDefault) GetPayload added in v0.15.7

func (o *InfoDefault) GetPayload() *httperrors.HTTPErrorResponse

func (*InfoDefault) IsClientError added in v0.19.3

func (o *InfoDefault) IsClientError() bool

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

func (*InfoDefault) IsCode added in v0.19.3

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

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

func (*InfoDefault) IsRedirect added in v0.19.3

func (o *InfoDefault) IsRedirect() bool

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

func (*InfoDefault) IsServerError added in v0.19.3

func (o *InfoDefault) IsServerError() bool

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

func (*InfoDefault) IsSuccess added in v0.19.3

func (o *InfoDefault) IsSuccess() bool

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

func (*InfoDefault) String added in v0.19.3

func (o *InfoDefault) String() string

type InfoOK

type InfoOK struct {
	Payload *models.RestVersion
}

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

OK

func NewInfoOK

func NewInfoOK() *InfoOK

NewInfoOK creates a InfoOK with default headers values

func (*InfoOK) Code added in v0.22.1

func (o *InfoOK) Code() int

Code gets the status code for the info o k response

func (*InfoOK) Error

func (o *InfoOK) Error() string

func (*InfoOK) GetPayload added in v0.11.0

func (o *InfoOK) GetPayload() *models.RestVersion

func (*InfoOK) IsClientError added in v0.19.3

func (o *InfoOK) IsClientError() bool

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

func (*InfoOK) IsCode added in v0.19.3

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

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

func (*InfoOK) IsRedirect added in v0.19.3

func (o *InfoOK) IsRedirect() bool

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

func (*InfoOK) IsServerError added in v0.19.3

func (o *InfoOK) IsServerError() bool

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

func (*InfoOK) IsSuccess added in v0.19.3

func (o *InfoOK) IsSuccess() bool

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

func (*InfoOK) String added in v0.19.3

func (o *InfoOK) String() string

type InfoParams

type InfoParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

InfoParams contains all the parameters to send to the API endpoint

for the info operation.

Typically these are written to a http.Request.

func NewInfoParams

func NewInfoParams() *InfoParams

NewInfoParams creates a new InfoParams 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 NewInfoParamsWithContext

func NewInfoParamsWithContext(ctx context.Context) *InfoParams

NewInfoParamsWithContext creates a new InfoParams object with the ability to set a context for a request.

func NewInfoParamsWithHTTPClient

func NewInfoParamsWithHTTPClient(client *http.Client) *InfoParams

NewInfoParamsWithHTTPClient creates a new InfoParams object with the ability to set a custom HTTPClient for a request.

func NewInfoParamsWithTimeout

func NewInfoParamsWithTimeout(timeout time.Duration) *InfoParams

NewInfoParamsWithTimeout creates a new InfoParams object with the ability to set a timeout on a request.

func (*InfoParams) SetContext

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

SetContext adds the context to the info params

func (*InfoParams) SetDefaults added in v0.12.1

func (o *InfoParams) SetDefaults()

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

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

func (*InfoParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the info params

func (*InfoParams) SetTimeout

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

SetTimeout adds the timeout to the info params

func (*InfoParams) WithContext

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

WithContext adds the context to the info params

func (*InfoParams) WithDefaults added in v0.12.1

func (o *InfoParams) WithDefaults() *InfoParams

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

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

func (*InfoParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the info params

func (*InfoParams) WithTimeout

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

WithTimeout adds the timeout to the info params

func (*InfoParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type InfoReader

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

InfoReader is a Reader for the Info structure.

func (*InfoReader) ReadResponse

func (o *InfoReader) 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