global

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: GPL-3.0 Imports: 11 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 global API

func (*Client) Ping

func (a *Client) Ping(params *PingParams, opts ...ClientOption) (*PingOK, error)

Ping nitrados API status

Check the status of the 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 {
	Ping(params *PingParams, opts ...ClientOption) (*PingOK, 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 global API client.

type PingDefault

type PingDefault struct {
	Payload *models.ErrorModel
	// contains filtered or unexported fields
}
PingDefault describes a response with status code -1, with default header values.

error payload

func NewPingDefault

func NewPingDefault(code int) *PingDefault

NewPingDefault creates a PingDefault with default headers values

func (*PingDefault) Code

func (o *PingDefault) Code() int

Code gets the status code for the ping default response

func (*PingDefault) Error

func (o *PingDefault) Error() string

func (*PingDefault) GetPayload

func (o *PingDefault) GetPayload() *models.ErrorModel

type PingOK

type PingOK struct {
	Payload *PingOKBody
}
PingOK describes a response with status code 200, with default header values.

success response

func NewPingOK

func NewPingOK() *PingOK

NewPingOK creates a PingOK with default headers values

func (*PingOK) Error

func (o *PingOK) Error() string

func (*PingOK) GetPayload

func (o *PingOK) GetPayload() *PingOKBody

type PingOKBody

type PingOKBody struct {

	// message
	Message string `json:"message,omitempty"`

	// status
	Status string `json:"status,omitempty"`
}

PingOKBody ping o k body swagger:model PingOKBody

func (*PingOKBody) ContextValidate

func (o *PingOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this ping o k body based on context it is used

func (*PingOKBody) MarshalBinary

func (o *PingOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PingOKBody) UnmarshalBinary

func (o *PingOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PingOKBody) Validate

func (o *PingOKBody) Validate(formats strfmt.Registry) error

Validate validates this ping o k body

type PingParams

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

PingParams contains all the parameters to send to the API endpoint

for the ping operation.

Typically these are written to a http.Request.

func NewPingParams

func NewPingParams() *PingParams

NewPingParams creates a new PingParams 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 NewPingParamsWithContext

func NewPingParamsWithContext(ctx context.Context) *PingParams

NewPingParamsWithContext creates a new PingParams object with the ability to set a context for a request.

func NewPingParamsWithHTTPClient

func NewPingParamsWithHTTPClient(client *http.Client) *PingParams

NewPingParamsWithHTTPClient creates a new PingParams object with the ability to set a custom HTTPClient for a request.

func NewPingParamsWithTimeout

func NewPingParamsWithTimeout(timeout time.Duration) *PingParams

NewPingParamsWithTimeout creates a new PingParams object with the ability to set a timeout on a request.

func (*PingParams) SetContext

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

SetContext adds the context to the ping params

func (*PingParams) SetDefaults

func (o *PingParams) SetDefaults()

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

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

func (*PingParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the ping params

func (*PingParams) SetTimeout

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

SetTimeout adds the timeout to the ping params

func (*PingParams) WithContext

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

WithContext adds the context to the ping params

func (*PingParams) WithDefaults

func (o *PingParams) WithDefaults() *PingParams

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

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

func (*PingParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the ping params

func (*PingParams) WithTimeout

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

WithTimeout adds the timeout to the ping params

func (*PingParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PingReader

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

PingReader is a Reader for the Ping structure.

func (*PingReader) ReadResponse

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