login

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

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

func (*Client) Login

func (a *Client) Login(params *LoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LoginOK, error)

Login logs in a user and returns a j w t token

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 {
	Login(params *LoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LoginOK, 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 login API client.

type LoginBadRequest

type LoginBadRequest struct {
	Payload apiserver_params.APIErrorResponse
}

LoginBadRequest describes a response with status code 400, with default header values.

APIErrorResponse

func NewLoginBadRequest

func NewLoginBadRequest() *LoginBadRequest

NewLoginBadRequest creates a LoginBadRequest with default headers values

func (*LoginBadRequest) Code

func (o *LoginBadRequest) Code() int

Code gets the status code for the login bad request response

func (*LoginBadRequest) Error

func (o *LoginBadRequest) Error() string

func (*LoginBadRequest) GetPayload

func (*LoginBadRequest) IsClientError

func (o *LoginBadRequest) IsClientError() bool

IsClientError returns true when this login bad request response has a 4xx status code

func (*LoginBadRequest) IsCode

func (o *LoginBadRequest) IsCode(code int) bool

IsCode returns true when this login bad request response a status code equal to that given

func (*LoginBadRequest) IsRedirect

func (o *LoginBadRequest) IsRedirect() bool

IsRedirect returns true when this login bad request response has a 3xx status code

func (*LoginBadRequest) IsServerError

func (o *LoginBadRequest) IsServerError() bool

IsServerError returns true when this login bad request response has a 5xx status code

func (*LoginBadRequest) IsSuccess

func (o *LoginBadRequest) IsSuccess() bool

IsSuccess returns true when this login bad request response has a 2xx status code

func (*LoginBadRequest) String

func (o *LoginBadRequest) String() string

type LoginOK

type LoginOK struct {
	Payload garm_params.JWTResponse
}

LoginOK describes a response with status code 200, with default header values.

JWTResponse

func NewLoginOK

func NewLoginOK() *LoginOK

NewLoginOK creates a LoginOK with default headers values

func (*LoginOK) Code

func (o *LoginOK) Code() int

Code gets the status code for the login o k response

func (*LoginOK) Error

func (o *LoginOK) Error() string

func (*LoginOK) GetPayload

func (o *LoginOK) GetPayload() garm_params.JWTResponse

func (*LoginOK) IsClientError

func (o *LoginOK) IsClientError() bool

IsClientError returns true when this login o k response has a 4xx status code

func (*LoginOK) IsCode

func (o *LoginOK) IsCode(code int) bool

IsCode returns true when this login o k response a status code equal to that given

func (*LoginOK) IsRedirect

func (o *LoginOK) IsRedirect() bool

IsRedirect returns true when this login o k response has a 3xx status code

func (*LoginOK) IsServerError

func (o *LoginOK) IsServerError() bool

IsServerError returns true when this login o k response has a 5xx status code

func (*LoginOK) IsSuccess

func (o *LoginOK) IsSuccess() bool

IsSuccess returns true when this login o k response has a 2xx status code

func (*LoginOK) String

func (o *LoginOK) String() string

type LoginParams

type LoginParams struct {

	/* Body.

	   Login information.
	*/
	Body garm_params.PasswordLoginParams

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

LoginParams contains all the parameters to send to the API endpoint

for the login operation.

Typically these are written to a http.Request.

func NewLoginParams

func NewLoginParams() *LoginParams

NewLoginParams creates a new LoginParams 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 NewLoginParamsWithContext

func NewLoginParamsWithContext(ctx context.Context) *LoginParams

NewLoginParamsWithContext creates a new LoginParams object with the ability to set a context for a request.

func NewLoginParamsWithHTTPClient

func NewLoginParamsWithHTTPClient(client *http.Client) *LoginParams

NewLoginParamsWithHTTPClient creates a new LoginParams object with the ability to set a custom HTTPClient for a request.

func NewLoginParamsWithTimeout

func NewLoginParamsWithTimeout(timeout time.Duration) *LoginParams

NewLoginParamsWithTimeout creates a new LoginParams object with the ability to set a timeout on a request.

func (*LoginParams) SetBody

func (o *LoginParams) SetBody(body garm_params.PasswordLoginParams)

SetBody adds the body to the login params

func (*LoginParams) SetContext

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

SetContext adds the context to the login params

func (*LoginParams) SetDefaults

func (o *LoginParams) SetDefaults()

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

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

func (*LoginParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the login params

func (*LoginParams) SetTimeout

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

SetTimeout adds the timeout to the login params

func (*LoginParams) WithBody

WithBody adds the body to the login params

func (*LoginParams) WithContext

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

WithContext adds the context to the login params

func (*LoginParams) WithDefaults

func (o *LoginParams) WithDefaults() *LoginParams

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

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

func (*LoginParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the login params

func (*LoginParams) WithTimeout

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

WithTimeout adds the timeout to the login params

func (*LoginParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type LoginReader

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

LoginReader is a Reader for the Login structure.

func (*LoginReader) ReadResponse

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