user

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 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 user API

func (*Client) PostLogin

func (a *Client) PostLogin(params *PostLoginParams) (*PostLoginOK, error)

PostLogin Login with the FreeIPA username and password. Returns the user object including the api_token for further requests. If the user has admin priviledges, a X-Auth-Token header with a JWT token is returned to be used in the /admin section.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	PostLogin(params *PostLoginParams) (*PostLoginOK, 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 PostLoginOK

type PostLoginOK struct {
	Payload *PostLoginOKBody
}

PostLoginOK handles this case with default header values.

successfull operation

func NewPostLoginOK

func NewPostLoginOK() *PostLoginOK

NewPostLoginOK creates a PostLoginOK with default headers values

func (*PostLoginOK) Error

func (o *PostLoginOK) Error() string

func (*PostLoginOK) GetPayload

func (o *PostLoginOK) GetPayload() *PostLoginOKBody

type PostLoginOKBody

type PostLoginOKBody struct {

	// data
	Data *models.User `json:"data,omitempty"`
}

PostLoginOKBody post login o k body swagger:model PostLoginOKBody

func (*PostLoginOKBody) MarshalBinary

func (o *PostLoginOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PostLoginOKBody) UnmarshalBinary

func (o *PostLoginOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PostLoginOKBody) Validate

func (o *PostLoginOKBody) Validate(formats strfmt.Registry) error

Validate validates this post login o k body

type PostLoginParams

type PostLoginParams struct {

	/*Password
	  The password of the user to login.

	*/
	Password string
	/*Username
	  The username of the user to login.

	*/
	Username string

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

PostLoginParams contains all the parameters to send to the API endpoint for the post login operation typically these are written to a http.Request

func NewPostLoginParams

func NewPostLoginParams() *PostLoginParams

NewPostLoginParams creates a new PostLoginParams object with the default values initialized.

func NewPostLoginParamsWithContext

func NewPostLoginParamsWithContext(ctx context.Context) *PostLoginParams

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

func NewPostLoginParamsWithHTTPClient

func NewPostLoginParamsWithHTTPClient(client *http.Client) *PostLoginParams

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

func NewPostLoginParamsWithTimeout

func NewPostLoginParamsWithTimeout(timeout time.Duration) *PostLoginParams

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

func (*PostLoginParams) SetContext

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

SetContext adds the context to the post login params

func (*PostLoginParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post login params

func (*PostLoginParams) SetPassword

func (o *PostLoginParams) SetPassword(password string)

SetPassword adds the password to the post login params

func (*PostLoginParams) SetTimeout

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

SetTimeout adds the timeout to the post login params

func (*PostLoginParams) SetUsername

func (o *PostLoginParams) SetUsername(username string)

SetUsername adds the username to the post login params

func (*PostLoginParams) WithContext

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

WithContext adds the context to the post login params

func (*PostLoginParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the post login params

func (*PostLoginParams) WithPassword

func (o *PostLoginParams) WithPassword(password string) *PostLoginParams

WithPassword adds the password to the post login params

func (*PostLoginParams) WithTimeout

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

WithTimeout adds the timeout to the post login params

func (*PostLoginParams) WithUsername

func (o *PostLoginParams) WithUsername(username string) *PostLoginParams

WithUsername adds the username to the post login params

func (*PostLoginParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostLoginReader

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

PostLoginReader is a Reader for the PostLogin structure.

func (*PostLoginReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostLoginUnauthorized

type PostLoginUnauthorized struct {
}

PostLoginUnauthorized handles this case with default header values.

not authorized

func NewPostLoginUnauthorized

func NewPostLoginUnauthorized() *PostLoginUnauthorized

NewPostLoginUnauthorized creates a PostLoginUnauthorized with default headers values

func (*PostLoginUnauthorized) Error

func (o *PostLoginUnauthorized) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL