dns

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

func (*Client) Lookup

func (a *Client) Lookup(params *LookupParams, opts ...ClientOption) (*LookupOK, error)

Lookup DNSs lookup

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 {
	Lookup(params *LookupParams, opts ...ClientOption) (*LookupOK, 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 dns API client.

type LookupDefault

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

error

func NewLookupDefault

func NewLookupDefault(code int) *LookupDefault

NewLookupDefault creates a LookupDefault with default headers values

func (*LookupDefault) Code

func (o *LookupDefault) Code() int

Code gets the status code for the lookup default response

func (*LookupDefault) Error

func (o *LookupDefault) Error() string

func (*LookupDefault) GetPayload

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

type LookupNotFound

type LookupNotFound struct {
}
LookupNotFound describes a response with status code 404, with default header values.

Not found

func NewLookupNotFound

func NewLookupNotFound() *LookupNotFound

NewLookupNotFound creates a LookupNotFound with default headers values

func (*LookupNotFound) Error

func (o *LookupNotFound) Error() string

type LookupOK

type LookupOK struct {
	Payload *models.Lookup
}
LookupOK describes a response with status code 200, with default header values.

OK

func NewLookupOK

func NewLookupOK() *LookupOK

NewLookupOK creates a LookupOK with default headers values

func (*LookupOK) Error

func (o *LookupOK) Error() string

func (*LookupOK) GetPayload

func (o *LookupOK) GetPayload() *models.Lookup

type LookupParams

type LookupParams struct {

	// Request.
	Request *models.LookupRequest

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

LookupParams contains all the parameters to send to the API endpoint

for the lookup operation.

Typically these are written to a http.Request.

func NewLookupParams

func NewLookupParams() *LookupParams

NewLookupParams creates a new LookupParams 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 NewLookupParamsWithContext

func NewLookupParamsWithContext(ctx context.Context) *LookupParams

NewLookupParamsWithContext creates a new LookupParams object with the ability to set a context for a request.

func NewLookupParamsWithHTTPClient

func NewLookupParamsWithHTTPClient(client *http.Client) *LookupParams

NewLookupParamsWithHTTPClient creates a new LookupParams object with the ability to set a custom HTTPClient for a request.

func NewLookupParamsWithTimeout

func NewLookupParamsWithTimeout(timeout time.Duration) *LookupParams

NewLookupParamsWithTimeout creates a new LookupParams object with the ability to set a timeout on a request.

func (*LookupParams) SetContext

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

SetContext adds the context to the lookup params

func (*LookupParams) SetDefaults

func (o *LookupParams) SetDefaults()

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

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

func (*LookupParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the lookup params

func (*LookupParams) SetRequest

func (o *LookupParams) SetRequest(request *models.LookupRequest)

SetRequest adds the request to the lookup params

func (*LookupParams) SetTimeout

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

SetTimeout adds the timeout to the lookup params

func (*LookupParams) WithContext

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

WithContext adds the context to the lookup params

func (*LookupParams) WithDefaults

func (o *LookupParams) WithDefaults() *LookupParams

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

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

func (*LookupParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the lookup params

func (*LookupParams) WithRequest

func (o *LookupParams) WithRequest(request *models.LookupRequest) *LookupParams

WithRequest adds the request to the lookup params

func (*LookupParams) WithTimeout

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

WithTimeout adds the timeout to the lookup params

func (*LookupParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type LookupReader

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

LookupReader is a Reader for the Lookup structure.

func (*LookupReader) ReadResponse

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