auth

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

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) V1Test

func (a *Client) V1Test(params *V1TestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1TestOK, error)
V1Test pings function that tests the API key

**Description**

An endpoint that always responds with the string `authorized!` when authentication works. This can be used as a check that the authentication on a request is valid.

Please include your key on the `Authorization` header or the query parameter `api_key`

**No account required**

This endpoint requires an account to be accessed, but does not count as a lookup. Requests may still be rejected due to rate limiting by any facet (account, IP, etc), in order to preserve the health of the service.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	V1Test(params *V1TestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1TestOK, 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 auth API client.

type V1TestOK

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

authorized!

func NewV1TestOK

func NewV1TestOK() *V1TestOK

NewV1TestOK creates a V1TestOK with default headers values

func (*V1TestOK) Error

func (o *V1TestOK) Error() string

func (*V1TestOK) GetPayload

func (o *V1TestOK) GetPayload() string

type V1TestParams

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

V1TestParams contains all the parameters to send to the API endpoint

for the v1 test operation.

Typically these are written to a http.Request.

func NewV1TestParams

func NewV1TestParams() *V1TestParams

NewV1TestParams creates a new V1TestParams 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 NewV1TestParamsWithContext

func NewV1TestParamsWithContext(ctx context.Context) *V1TestParams

NewV1TestParamsWithContext creates a new V1TestParams object with the ability to set a context for a request.

func NewV1TestParamsWithHTTPClient

func NewV1TestParamsWithHTTPClient(client *http.Client) *V1TestParams

NewV1TestParamsWithHTTPClient creates a new V1TestParams object with the ability to set a custom HTTPClient for a request.

func NewV1TestParamsWithTimeout

func NewV1TestParamsWithTimeout(timeout time.Duration) *V1TestParams

NewV1TestParamsWithTimeout creates a new V1TestParams object with the ability to set a timeout on a request.

func (*V1TestParams) SetContext

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

SetContext adds the context to the v1 test params

func (*V1TestParams) SetDefaults

func (o *V1TestParams) SetDefaults()

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

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

func (*V1TestParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the v1 test params

func (*V1TestParams) SetTimeout

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

SetTimeout adds the timeout to the v1 test params

func (*V1TestParams) WithContext

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

WithContext adds the context to the v1 test params

func (*V1TestParams) WithDefaults

func (o *V1TestParams) WithDefaults() *V1TestParams

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

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

func (*V1TestParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the v1 test params

func (*V1TestParams) WithTimeout

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

WithTimeout adds the timeout to the v1 test params

func (*V1TestParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type V1TestReader

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

V1TestReader is a Reader for the V1Test structure.

func (*V1TestReader) ReadResponse

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