operations

package
v0.0.0-...-13341bd Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 9 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 operations API

func (*Client) Ping

func (a *Client) Ping(params *PingParams, opts ...ClientOption) (*PingOK, error)
Ping pings the service without credentials

An endpoint that always responds with the string "pong". This can be used as a

health check.<br><br>

This endpoint does not require an account to be accessed, and does not count as a lookup. Requests may still be rejected due to rate limiting to preserve the health of the service.

Alpha of Version 1 of the geo.codes API. Once V1 is stabilized, routes under `/v1` are guaranteed to follow semver-style backwards compatibility guarantees.

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 operations API client.

type PingOK

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

The string 'pong'

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() 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
⌂ 换网址