ping

package
v0.0.0-...-417219d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 8 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 ping API

func (*Client) Ping

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

Ping This is a health check endpoint that can be used to determine Vantage API healthiness. It will return 200 if everything is running smoothly.

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, authInfo runtime.ClientAuthInfoWriter, 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 ping API client.

type PingOK

type PingOK struct {
}

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

This is a health check endpoint that can be used to determine Vantage API healthiness. It will return 200 if everything is running smoothly.

func NewPingOK

func NewPingOK() *PingOK

NewPingOK creates a PingOK with default headers values

func (*PingOK) Code

func (o *PingOK) Code() int

Code gets the status code for the ping o k response

func (*PingOK) Error

func (o *PingOK) Error() string

func (*PingOK) IsClientError

func (o *PingOK) IsClientError() bool

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

func (*PingOK) IsCode

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

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

func (*PingOK) IsRedirect

func (o *PingOK) IsRedirect() bool

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

func (*PingOK) IsServerError

func (o *PingOK) IsServerError() bool

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

func (*PingOK) IsSuccess

func (o *PingOK) IsSuccess() bool

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

func (*PingOK) String

func (o *PingOK) String() string

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