go-swagger: github.com/go-swagger/go-swagger/examples/authentication/client/customers Index | Files

package customers

import "github.com/go-swagger/go-swagger/examples/authentication/client/customers"

Index

Package Files

create_parameters.go create_responses.go customers_client.go get_id_parameters.go get_id_responses.go

type Client Uses

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

Client for customers API

func (*Client) Create Uses

func (a *Client) Create(params *CreateParams, authInfo runtime.ClientAuthInfoWriter) (*CreateCreated, error)

Create creates a new customer to track

func (*Client) GetID Uses

func (a *Client) GetID(params *GetIDParams, authInfo runtime.ClientAuthInfoWriter) (*GetIDOK, error)

GetID gets a customer Id given an s s n

func (*Client) SetTransport Uses

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

SetTransport changes the transport on the client

type ClientService Uses

type ClientService interface {
    Create(params *CreateParams, authInfo runtime.ClientAuthInfoWriter) (*CreateCreated, error)

    GetID(params *GetIDParams, authInfo runtime.ClientAuthInfoWriter) (*GetIDOK, error)

    SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New Uses

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

New creates a new customers API client.

type CreateCreated Uses

type CreateCreated struct {
    Payload *models.Customer
}
CreateCreated describes a response with status code 201, with default header values.

created

func NewCreateCreated Uses

func NewCreateCreated() *CreateCreated

NewCreateCreated creates a CreateCreated with default headers values

func (*CreateCreated) Error Uses

func (o *CreateCreated) Error() string

func (*CreateCreated) GetPayload Uses

func (o *CreateCreated) GetPayload() *models.Customer

type CreateDefault Uses

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

error

func NewCreateDefault Uses

func NewCreateDefault(code int) *CreateDefault

NewCreateDefault creates a CreateDefault with default headers values

func (*CreateDefault) Code Uses

func (o *CreateDefault) Code() int

Code gets the status code for the create default response

func (*CreateDefault) Error Uses

func (o *CreateDefault) Error() string

func (*CreateDefault) GetPayload Uses

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

type CreateParams Uses

type CreateParams struct {

    // Info.
    Info *models.Customer

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

CreateParams contains all the parameters to send to the API endpoint

for the create operation.

Typically these are written to a http.Request.

func NewCreateParams Uses

func NewCreateParams() *CreateParams

NewCreateParams creates a new CreateParams 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 NewCreateParamsWithContext Uses

func NewCreateParamsWithContext(ctx context.Context) *CreateParams

NewCreateParamsWithContext creates a new CreateParams object with the ability to set a context for a request.

func NewCreateParamsWithHTTPClient Uses

func NewCreateParamsWithHTTPClient(client *http.Client) *CreateParams

NewCreateParamsWithHTTPClient creates a new CreateParams object with the ability to set a custom HTTPClient for a request.

func NewCreateParamsWithTimeout Uses

func NewCreateParamsWithTimeout(timeout time.Duration) *CreateParams

NewCreateParamsWithTimeout creates a new CreateParams object with the ability to set a timeout on a request.

func (*CreateParams) SetContext Uses

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

SetContext adds the context to the create params

func (*CreateParams) SetDefaults Uses

func (o *CreateParams) SetDefaults()

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

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

func (*CreateParams) SetHTTPClient Uses

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

SetHTTPClient adds the HTTPClient to the create params

func (*CreateParams) SetInfo Uses

func (o *CreateParams) SetInfo(info *models.Customer)

SetInfo adds the info to the create params

func (*CreateParams) SetTimeout Uses

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

SetTimeout adds the timeout to the create params

func (*CreateParams) WithContext Uses

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

WithContext adds the context to the create params

func (*CreateParams) WithDefaults Uses

func (o *CreateParams) WithDefaults() *CreateParams

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

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

func (*CreateParams) WithHTTPClient Uses

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

WithHTTPClient adds the HTTPClient to the create params

func (*CreateParams) WithInfo Uses

func (o *CreateParams) WithInfo(info *models.Customer) *CreateParams

WithInfo adds the info to the create params

func (*CreateParams) WithTimeout Uses

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

WithTimeout adds the timeout to the create params

func (*CreateParams) WriteToRequest Uses

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

WriteToRequest writes these params to a swagger request

type CreateReader Uses

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

CreateReader is a Reader for the Create structure.

func (*CreateReader) ReadResponse Uses

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

ReadResponse reads a server response into the received o.

type GetIDDefault Uses

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

error

func NewGetIDDefault Uses

func NewGetIDDefault(code int) *GetIDDefault

NewGetIDDefault creates a GetIDDefault with default headers values

func (*GetIDDefault) Code Uses

func (o *GetIDDefault) Code() int

Code gets the status code for the get Id default response

func (*GetIDDefault) Error Uses

func (o *GetIDDefault) Error() string

func (*GetIDDefault) GetPayload Uses

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

type GetIDNotFound Uses

type GetIDNotFound struct {
    Payload *models.Error
}
GetIDNotFound describes a response with status code 404, with default header values.

resource not found

func NewGetIDNotFound Uses

func NewGetIDNotFound() *GetIDNotFound

NewGetIDNotFound creates a GetIDNotFound with default headers values

func (*GetIDNotFound) Error Uses

func (o *GetIDNotFound) Error() string

func (*GetIDNotFound) GetPayload Uses

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

type GetIDOK Uses

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

OK

func NewGetIDOK Uses

func NewGetIDOK() *GetIDOK

NewGetIDOK creates a GetIDOK with default headers values

func (*GetIDOK) Error Uses

func (o *GetIDOK) Error() string

func (*GetIDOK) GetPayload Uses

func (o *GetIDOK) GetPayload() *models.Customer

type GetIDParams Uses

type GetIDParams struct {

    // Info.
    Info *models.SocialID

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

GetIDParams contains all the parameters to send to the API endpoint

for the get Id operation.

Typically these are written to a http.Request.

func NewGetIDParams Uses

func NewGetIDParams() *GetIDParams

NewGetIDParams creates a new GetIDParams 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 NewGetIDParamsWithContext Uses

func NewGetIDParamsWithContext(ctx context.Context) *GetIDParams

NewGetIDParamsWithContext creates a new GetIDParams object with the ability to set a context for a request.

func NewGetIDParamsWithHTTPClient Uses

func NewGetIDParamsWithHTTPClient(client *http.Client) *GetIDParams

NewGetIDParamsWithHTTPClient creates a new GetIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetIDParamsWithTimeout Uses

func NewGetIDParamsWithTimeout(timeout time.Duration) *GetIDParams

NewGetIDParamsWithTimeout creates a new GetIDParams object with the ability to set a timeout on a request.

func (*GetIDParams) SetContext Uses

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

SetContext adds the context to the get Id params

func (*GetIDParams) SetDefaults Uses

func (o *GetIDParams) SetDefaults()

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

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

func (*GetIDParams) SetHTTPClient Uses

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

SetHTTPClient adds the HTTPClient to the get Id params

func (*GetIDParams) SetInfo Uses

func (o *GetIDParams) SetInfo(info *models.SocialID)

SetInfo adds the info to the get Id params

func (*GetIDParams) SetTimeout Uses

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

SetTimeout adds the timeout to the get Id params

func (*GetIDParams) WithContext Uses

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

WithContext adds the context to the get Id params

func (*GetIDParams) WithDefaults Uses

func (o *GetIDParams) WithDefaults() *GetIDParams

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

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

func (*GetIDParams) WithHTTPClient Uses

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

WithHTTPClient adds the HTTPClient to the get Id params

func (*GetIDParams) WithInfo Uses

func (o *GetIDParams) WithInfo(info *models.SocialID) *GetIDParams

WithInfo adds the info to the get Id params

func (*GetIDParams) WithTimeout Uses

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

WithTimeout adds the timeout to the get Id params

func (*GetIDParams) WriteToRequest Uses

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

WriteToRequest writes these params to a swagger request

type GetIDReader Uses

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

GetIDReader is a Reader for the GetID structure.

func (*GetIDReader) ReadResponse Uses

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

ReadResponse reads a server response into the received o.

type GetIDUnauthorized Uses

type GetIDUnauthorized struct {
    Payload *models.Error
}
GetIDUnauthorized describes a response with status code 401, with default header values.

unauthorized

func NewGetIDUnauthorized Uses

func NewGetIDUnauthorized() *GetIDUnauthorized

NewGetIDUnauthorized creates a GetIDUnauthorized with default headers values

func (*GetIDUnauthorized) Error Uses

func (o *GetIDUnauthorized) Error() string

func (*GetIDUnauthorized) GetPayload Uses

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

Package customers imports 10 packages (graph) and is imported by 2 packages. Updated 2021-01-26. Refresh now. Tools for package owners.