geo

package
v0.0.0-...-2f60d0a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: MIT Imports: 10 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 geo API

func (*Client) GetCountries

func (a *Client) GetCountries(params *GetCountriesParams, opts ...ClientOption) (*GetCountriesOK, error)

GetCountries lists of available countries

func (*Client) GetLocations

func (a *Client) GetLocations(params *GetLocationsParams, opts ...ClientOption) (*GetLocationsOK, error)

GetLocations lists of available locations

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 {
	GetCountries(params *GetCountriesParams, opts ...ClientOption) (*GetCountriesOK, error)

	GetLocations(params *GetLocationsParams, opts ...ClientOption) (*GetLocationsOK, 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 geo API client.

type GetCountriesDefault

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

Unexpected error

func NewGetCountriesDefault

func NewGetCountriesDefault(code int) *GetCountriesDefault

NewGetCountriesDefault creates a GetCountriesDefault with default headers values

func (*GetCountriesDefault) Code

func (o *GetCountriesDefault) Code() int

Code gets the status code for the get countries default response

func (*GetCountriesDefault) Error

func (o *GetCountriesDefault) Error() string

func (*GetCountriesDefault) GetPayload

func (o *GetCountriesDefault) GetPayload() *models.Error

type GetCountriesOK

type GetCountriesOK struct {
	Payload []*models.Country
}
GetCountriesOK describes a response with status code 200, with default header values.

OK

func NewGetCountriesOK

func NewGetCountriesOK() *GetCountriesOK

NewGetCountriesOK creates a GetCountriesOK with default headers values

func (*GetCountriesOK) Error

func (o *GetCountriesOK) Error() string

func (*GetCountriesOK) GetPayload

func (o *GetCountriesOK) GetPayload() []*models.Country

type GetCountriesParams

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

GetCountriesParams contains all the parameters to send to the API endpoint

for the get countries operation.

Typically these are written to a http.Request.

func NewGetCountriesParams

func NewGetCountriesParams() *GetCountriesParams

NewGetCountriesParams creates a new GetCountriesParams 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 NewGetCountriesParamsWithContext

func NewGetCountriesParamsWithContext(ctx context.Context) *GetCountriesParams

NewGetCountriesParamsWithContext creates a new GetCountriesParams object with the ability to set a context for a request.

func NewGetCountriesParamsWithHTTPClient

func NewGetCountriesParamsWithHTTPClient(client *http.Client) *GetCountriesParams

NewGetCountriesParamsWithHTTPClient creates a new GetCountriesParams object with the ability to set a custom HTTPClient for a request.

func NewGetCountriesParamsWithTimeout

func NewGetCountriesParamsWithTimeout(timeout time.Duration) *GetCountriesParams

NewGetCountriesParamsWithTimeout creates a new GetCountriesParams object with the ability to set a timeout on a request.

func (*GetCountriesParams) SetContext

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

SetContext adds the context to the get countries params

func (*GetCountriesParams) SetDefaults

func (o *GetCountriesParams) SetDefaults()

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

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

func (*GetCountriesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get countries params

func (*GetCountriesParams) SetTimeout

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

SetTimeout adds the timeout to the get countries params

func (*GetCountriesParams) WithContext

WithContext adds the context to the get countries params

func (*GetCountriesParams) WithDefaults

func (o *GetCountriesParams) WithDefaults() *GetCountriesParams

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

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

func (*GetCountriesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get countries params

func (*GetCountriesParams) WithTimeout

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

WithTimeout adds the timeout to the get countries params

func (*GetCountriesParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetCountriesReader

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

GetCountriesReader is a Reader for the GetCountries structure.

func (*GetCountriesReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetLocationsDefault

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

Unexpected error

func NewGetLocationsDefault

func NewGetLocationsDefault(code int) *GetLocationsDefault

NewGetLocationsDefault creates a GetLocationsDefault with default headers values

func (*GetLocationsDefault) Code

func (o *GetLocationsDefault) Code() int

Code gets the status code for the get locations default response

func (*GetLocationsDefault) Error

func (o *GetLocationsDefault) Error() string

func (*GetLocationsDefault) GetPayload

func (o *GetLocationsDefault) GetPayload() *models.Error

type GetLocationsOK

type GetLocationsOK struct {
	Payload []*models.Location
}
GetLocationsOK describes a response with status code 200, with default header values.

OK

func NewGetLocationsOK

func NewGetLocationsOK() *GetLocationsOK

NewGetLocationsOK creates a GetLocationsOK with default headers values

func (*GetLocationsOK) Error

func (o *GetLocationsOK) Error() string

func (*GetLocationsOK) GetPayload

func (o *GetLocationsOK) GetPayload() []*models.Location

type GetLocationsParams

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

GetLocationsParams contains all the parameters to send to the API endpoint

for the get locations operation.

Typically these are written to a http.Request.

func NewGetLocationsParams

func NewGetLocationsParams() *GetLocationsParams

NewGetLocationsParams creates a new GetLocationsParams 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 NewGetLocationsParamsWithContext

func NewGetLocationsParamsWithContext(ctx context.Context) *GetLocationsParams

NewGetLocationsParamsWithContext creates a new GetLocationsParams object with the ability to set a context for a request.

func NewGetLocationsParamsWithHTTPClient

func NewGetLocationsParamsWithHTTPClient(client *http.Client) *GetLocationsParams

NewGetLocationsParamsWithHTTPClient creates a new GetLocationsParams object with the ability to set a custom HTTPClient for a request.

func NewGetLocationsParamsWithTimeout

func NewGetLocationsParamsWithTimeout(timeout time.Duration) *GetLocationsParams

NewGetLocationsParamsWithTimeout creates a new GetLocationsParams object with the ability to set a timeout on a request.

func (*GetLocationsParams) SetContext

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

SetContext adds the context to the get locations params

func (*GetLocationsParams) SetDefaults

func (o *GetLocationsParams) SetDefaults()

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

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

func (*GetLocationsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get locations params

func (*GetLocationsParams) SetTimeout

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

SetTimeout adds the timeout to the get locations params

func (*GetLocationsParams) WithContext

WithContext adds the context to the get locations params

func (*GetLocationsParams) WithDefaults

func (o *GetLocationsParams) WithDefaults() *GetLocationsParams

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

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

func (*GetLocationsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get locations params

func (*GetLocationsParams) WithTimeout

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

WithTimeout adds the timeout to the get locations params

func (*GetLocationsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetLocationsReader

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

GetLocationsReader is a Reader for the GetLocations structure.

func (*GetLocationsReader) ReadResponse

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