user

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT 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 user API

func (*Client) GetMe

func (a *Client) GetMe(params *GetMeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMeOK, error)

GetMe extracts the connecting user from auth header

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 {
	GetMe(params *GetMeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMeOK, 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 user API client.

type GetMeDefault

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

Error

func NewGetMeDefault

func NewGetMeDefault(code int) *GetMeDefault

NewGetMeDefault creates a GetMeDefault with default headers values

func (*GetMeDefault) Code

func (o *GetMeDefault) Code() int

Code gets the status code for the get me default response

func (*GetMeDefault) Error

func (o *GetMeDefault) Error() string

func (*GetMeDefault) GetPayload

func (o *GetMeDefault) GetPayload() *httperrors.HTTPErrorResponse

type GetMeOK

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

OK

func NewGetMeOK

func NewGetMeOK() *GetMeOK

NewGetMeOK creates a GetMeOK with default headers values

func (*GetMeOK) Error

func (o *GetMeOK) Error() string

func (*GetMeOK) GetPayload

func (o *GetMeOK) GetPayload() *models.V1User

type GetMeParams

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

GetMeParams contains all the parameters to send to the API endpoint

for the get me operation.

Typically these are written to a http.Request.

func NewGetMeParams

func NewGetMeParams() *GetMeParams

NewGetMeParams creates a new GetMeParams 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 NewGetMeParamsWithContext

func NewGetMeParamsWithContext(ctx context.Context) *GetMeParams

NewGetMeParamsWithContext creates a new GetMeParams object with the ability to set a context for a request.

func NewGetMeParamsWithHTTPClient

func NewGetMeParamsWithHTTPClient(client *http.Client) *GetMeParams

NewGetMeParamsWithHTTPClient creates a new GetMeParams object with the ability to set a custom HTTPClient for a request.

func NewGetMeParamsWithTimeout

func NewGetMeParamsWithTimeout(timeout time.Duration) *GetMeParams

NewGetMeParamsWithTimeout creates a new GetMeParams object with the ability to set a timeout on a request.

func (*GetMeParams) SetContext

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

SetContext adds the context to the get me params

func (*GetMeParams) SetDefaults

func (o *GetMeParams) SetDefaults()

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

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

func (*GetMeParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get me params

func (*GetMeParams) SetTimeout

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

SetTimeout adds the timeout to the get me params

func (*GetMeParams) WithContext

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

WithContext adds the context to the get me params

func (*GetMeParams) WithDefaults

func (o *GetMeParams) WithDefaults() *GetMeParams

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

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

func (*GetMeParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get me params

func (*GetMeParams) WithTimeout

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

WithTimeout adds the timeout to the get me params

func (*GetMeParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetMeReader

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

GetMeReader is a Reader for the GetMe structure.

func (*GetMeReader) ReadResponse

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