Help us shape the future of Go! Take the 2026 Go Developer Survey

demo

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: AGPL-3.0 Imports: 11 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 demo API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new demo API client.

func (*Client) Error

func (a *Client) Error(params *ErrorParams) (*ErrorOK, error)

Error error API

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ErrorOK

type ErrorOK struct {
	Payload models.APIDemoErrorResponse
}

ErrorOK handles this case with default header values.

(empty)

func NewErrorOK

func NewErrorOK() *ErrorOK

NewErrorOK creates a ErrorOK with default headers values

func (*ErrorOK) Error

func (o *ErrorOK) Error() string

type ErrorParams

type ErrorParams struct {

	/*Code*/
	Code *int64
	/*Key*/
	Key *string
	/*Value*/
	Value *string

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

ErrorParams contains all the parameters to send to the API endpoint for the error operation typically these are written to a http.Request

func NewErrorParams

func NewErrorParams() *ErrorParams

NewErrorParams creates a new ErrorParams object with the default values initialized.

func NewErrorParamsWithContext

func NewErrorParamsWithContext(ctx context.Context) *ErrorParams

NewErrorParamsWithContext creates a new ErrorParams object with the default values initialized, and the ability to set a context for a request

func NewErrorParamsWithHTTPClient

func NewErrorParamsWithHTTPClient(client *http.Client) *ErrorParams

NewErrorParamsWithHTTPClient creates a new ErrorParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewErrorParamsWithTimeout

func NewErrorParamsWithTimeout(timeout time.Duration) *ErrorParams

NewErrorParamsWithTimeout creates a new ErrorParams object with the default values initialized, and the ability to set a timeout on a request

func (*ErrorParams) SetCode

func (o *ErrorParams) SetCode(code *int64)

SetCode adds the code to the error params

func (*ErrorParams) SetContext

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

SetContext adds the context to the error params

func (*ErrorParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the error params

func (*ErrorParams) SetKey

func (o *ErrorParams) SetKey(key *string)

SetKey adds the key to the error params

func (*ErrorParams) SetTimeout

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

SetTimeout adds the timeout to the error params

func (*ErrorParams) SetValue

func (o *ErrorParams) SetValue(value *string)

SetValue adds the value to the error params

func (*ErrorParams) WithCode

func (o *ErrorParams) WithCode(code *int64) *ErrorParams

WithCode adds the code to the error params

func (*ErrorParams) WithContext

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

WithContext adds the context to the error params

func (*ErrorParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the error params

func (*ErrorParams) WithKey

func (o *ErrorParams) WithKey(key *string) *ErrorParams

WithKey adds the key to the error params

func (*ErrorParams) WithTimeout

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

WithTimeout adds the timeout to the error params

func (*ErrorParams) WithValue

func (o *ErrorParams) WithValue(value *string) *ErrorParams

WithValue adds the value to the error params

func (*ErrorParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ErrorReader

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

ErrorReader is a Reader for the Error structure.

func (*ErrorReader) ReadResponse

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