identity

package
v0.0.0-...-acbd0ad Latest Latest
Warning

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

Go to latest
Published: May 8, 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 identity API

func (*Client) CreateUser

func (a *Client) CreateUser(params *CreateUserParams, opts ...ClientOption) (*CreateUserCreated, error)

CreateUser Create User

func (*Client) GetUser

func (a *Client) GetUser(params *GetUserParams, opts ...ClientOption) (*GetUserOK, error)

GetUser Get User Info by id

func (*Client) Login

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

Login User Login

func (*Client) Logout

func (a *Client) Logout(params *LogoutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LogoutOK, error)

Logout Logout

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) Whoami

func (a *Client) Whoami(params *WhoamiParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WhoamiOK, error)

Whoami Get Current User's Info

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CreateUser(params *CreateUserParams, opts ...ClientOption) (*CreateUserCreated, error)

	GetUser(params *GetUserParams, opts ...ClientOption) (*GetUserOK, error)

	Login(params *LoginParams, opts ...ClientOption) (*LoginOK, error)

	Logout(params *LogoutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LogoutOK, error)

	Whoami(params *WhoamiParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WhoamiOK, 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 identity API client.

type CreateUserConflict

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

Create User Failed, cause user exist

func NewCreateUserConflict

func NewCreateUserConflict() *CreateUserConflict

NewCreateUserConflict creates a CreateUserConflict with default headers values

func (*CreateUserConflict) Error

func (o *CreateUserConflict) Error() string

func (*CreateUserConflict) GetPayload

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

type CreateUserCreated

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

Create User Success

func NewCreateUserCreated

func NewCreateUserCreated() *CreateUserCreated

NewCreateUserCreated creates a CreateUserCreated with default headers values

func (*CreateUserCreated) Error

func (o *CreateUserCreated) Error() string

func (*CreateUserCreated) GetPayload

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

type CreateUserInternalServerError

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

Server Error

func NewCreateUserInternalServerError

func NewCreateUserInternalServerError() *CreateUserInternalServerError

NewCreateUserInternalServerError creates a CreateUserInternalServerError with default headers values

func (*CreateUserInternalServerError) Error

func (*CreateUserInternalServerError) GetPayload

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

type CreateUserParams

type CreateUserParams struct {

	// Body.
	Body *models.UserInfo

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

CreateUserParams contains all the parameters to send to the API endpoint

for the create user operation.

Typically these are written to a http.Request.

func NewCreateUserParams

func NewCreateUserParams() *CreateUserParams

NewCreateUserParams creates a new CreateUserParams 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 NewCreateUserParamsWithContext

func NewCreateUserParamsWithContext(ctx context.Context) *CreateUserParams

NewCreateUserParamsWithContext creates a new CreateUserParams object with the ability to set a context for a request.

func NewCreateUserParamsWithHTTPClient

func NewCreateUserParamsWithHTTPClient(client *http.Client) *CreateUserParams

NewCreateUserParamsWithHTTPClient creates a new CreateUserParams object with the ability to set a custom HTTPClient for a request.

func NewCreateUserParamsWithTimeout

func NewCreateUserParamsWithTimeout(timeout time.Duration) *CreateUserParams

NewCreateUserParamsWithTimeout creates a new CreateUserParams object with the ability to set a timeout on a request.

func (*CreateUserParams) SetBody

func (o *CreateUserParams) SetBody(body *models.UserInfo)

SetBody adds the body to the create user params

func (*CreateUserParams) SetContext

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

SetContext adds the context to the create user params

func (*CreateUserParams) SetDefaults

func (o *CreateUserParams) SetDefaults()

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

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

func (*CreateUserParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create user params

func (*CreateUserParams) SetTimeout

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

SetTimeout adds the timeout to the create user params

func (*CreateUserParams) WithBody

func (o *CreateUserParams) WithBody(body *models.UserInfo) *CreateUserParams

WithBody adds the body to the create user params

func (*CreateUserParams) WithContext

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

WithContext adds the context to the create user params

func (*CreateUserParams) WithDefaults

func (o *CreateUserParams) WithDefaults() *CreateUserParams

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

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

func (*CreateUserParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create user params

func (*CreateUserParams) WithTimeout

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

WithTimeout adds the timeout to the create user params

func (*CreateUserParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateUserReader

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

CreateUserReader is a Reader for the CreateUser structure.

func (*CreateUserReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetUserInternalServerError

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

Server Error

func NewGetUserInternalServerError

func NewGetUserInternalServerError() *GetUserInternalServerError

NewGetUserInternalServerError creates a GetUserInternalServerError with default headers values

func (*GetUserInternalServerError) Error

func (*GetUserInternalServerError) GetPayload

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

type GetUserOK

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

Get User Success

func NewGetUserOK

func NewGetUserOK() *GetUserOK

NewGetUserOK creates a GetUserOK with default headers values

func (*GetUserOK) Error

func (o *GetUserOK) Error() string

func (*GetUserOK) GetPayload

func (o *GetUserOK) GetPayload() *models.UserInfo

type GetUserParams

type GetUserParams struct {

	/* ID.

	   User id
	*/
	ID int64

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

GetUserParams contains all the parameters to send to the API endpoint

for the get user operation.

Typically these are written to a http.Request.

func NewGetUserParams

func NewGetUserParams() *GetUserParams

NewGetUserParams creates a new GetUserParams 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 NewGetUserParamsWithContext

func NewGetUserParamsWithContext(ctx context.Context) *GetUserParams

NewGetUserParamsWithContext creates a new GetUserParams object with the ability to set a context for a request.

func NewGetUserParamsWithHTTPClient

func NewGetUserParamsWithHTTPClient(client *http.Client) *GetUserParams

NewGetUserParamsWithHTTPClient creates a new GetUserParams object with the ability to set a custom HTTPClient for a request.

func NewGetUserParamsWithTimeout

func NewGetUserParamsWithTimeout(timeout time.Duration) *GetUserParams

NewGetUserParamsWithTimeout creates a new GetUserParams object with the ability to set a timeout on a request.

func (*GetUserParams) SetContext

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

SetContext adds the context to the get user params

func (*GetUserParams) SetDefaults

func (o *GetUserParams) SetDefaults()

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

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

func (*GetUserParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get user params

func (*GetUserParams) SetID

func (o *GetUserParams) SetID(id int64)

SetID adds the id to the get user params

func (*GetUserParams) SetTimeout

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

SetTimeout adds the timeout to the get user params

func (*GetUserParams) WithContext

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

WithContext adds the context to the get user params

func (*GetUserParams) WithDefaults

func (o *GetUserParams) WithDefaults() *GetUserParams

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

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

func (*GetUserParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get user params

func (*GetUserParams) WithID

func (o *GetUserParams) WithID(id int64) *GetUserParams

WithID adds the id to the get user params

func (*GetUserParams) WithTimeout

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

WithTimeout adds the timeout to the get user params

func (*GetUserParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetUserReader

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

GetUserReader is a Reader for the GetUser structure.

func (*GetUserReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type LoginInternalServerError

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

Server Error

func NewLoginInternalServerError

func NewLoginInternalServerError() *LoginInternalServerError

NewLoginInternalServerError creates a LoginInternalServerError with default headers values

func (*LoginInternalServerError) Error

func (o *LoginInternalServerError) Error() string

func (*LoginInternalServerError) GetPayload

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

type LoginOK

type LoginOK struct {

	/* Set-Cookie, set token
	 */
	SetCookie string

	Payload *models.UserInfo
}
LoginOK describes a response with status code 200, with default header values.

Login Success, return user info.

func NewLoginOK

func NewLoginOK() *LoginOK

NewLoginOK creates a LoginOK with default headers values

func (*LoginOK) Error

func (o *LoginOK) Error() string

func (*LoginOK) GetPayload

func (o *LoginOK) GetPayload() *models.UserInfo

type LoginParams

type LoginParams struct {

	// Body.
	Body *models.UserInfo

	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 *models.UserInfo)

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

func (o *LoginParams) WithBody(body *models.UserInfo) *LoginParams

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.

type LoginUnauthorized

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

Login Failed

func NewLoginUnauthorized

func NewLoginUnauthorized() *LoginUnauthorized

NewLoginUnauthorized creates a LoginUnauthorized with default headers values

func (*LoginUnauthorized) Error

func (o *LoginUnauthorized) Error() string

func (*LoginUnauthorized) GetPayload

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

type LogoutInternalServerError

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

Server Error

func NewLogoutInternalServerError

func NewLogoutInternalServerError() *LogoutInternalServerError

NewLogoutInternalServerError creates a LogoutInternalServerError with default headers values

func (*LogoutInternalServerError) Error

func (o *LogoutInternalServerError) Error() string

func (*LogoutInternalServerError) GetPayload

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

type LogoutOK

type LogoutOK struct {
}
LogoutOK describes a response with status code 200, with default header values.

Logout Success

func NewLogoutOK

func NewLogoutOK() *LogoutOK

NewLogoutOK creates a LogoutOK with default headers values

func (*LogoutOK) Error

func (o *LogoutOK) Error() string

type LogoutParams

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

LogoutParams contains all the parameters to send to the API endpoint

for the logout operation.

Typically these are written to a http.Request.

func NewLogoutParams

func NewLogoutParams() *LogoutParams

NewLogoutParams creates a new LogoutParams 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 NewLogoutParamsWithContext

func NewLogoutParamsWithContext(ctx context.Context) *LogoutParams

NewLogoutParamsWithContext creates a new LogoutParams object with the ability to set a context for a request.

func NewLogoutParamsWithHTTPClient

func NewLogoutParamsWithHTTPClient(client *http.Client) *LogoutParams

NewLogoutParamsWithHTTPClient creates a new LogoutParams object with the ability to set a custom HTTPClient for a request.

func NewLogoutParamsWithTimeout

func NewLogoutParamsWithTimeout(timeout time.Duration) *LogoutParams

NewLogoutParamsWithTimeout creates a new LogoutParams object with the ability to set a timeout on a request.

func (*LogoutParams) SetContext

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

SetContext adds the context to the logout params

func (*LogoutParams) SetDefaults

func (o *LogoutParams) SetDefaults()

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

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

func (*LogoutParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the logout params

func (*LogoutParams) SetTimeout

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

SetTimeout adds the timeout to the logout params

func (*LogoutParams) WithContext

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

WithContext adds the context to the logout params

func (*LogoutParams) WithDefaults

func (o *LogoutParams) WithDefaults() *LogoutParams

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

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

func (*LogoutParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the logout params

func (*LogoutParams) WithTimeout

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

WithTimeout adds the timeout to the logout params

func (*LogoutParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type LogoutReader

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

LogoutReader is a Reader for the Logout structure.

func (*LogoutReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type LogoutUnauthorized

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

Logout Failed, no login

func NewLogoutUnauthorized

func NewLogoutUnauthorized() *LogoutUnauthorized

NewLogoutUnauthorized creates a LogoutUnauthorized with default headers values

func (*LogoutUnauthorized) Error

func (o *LogoutUnauthorized) Error() string

func (*LogoutUnauthorized) GetPayload

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

type WhoamiOK

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

Get Current User's Info Success

func NewWhoamiOK

func NewWhoamiOK() *WhoamiOK

NewWhoamiOK creates a WhoamiOK with default headers values

func (*WhoamiOK) Error

func (o *WhoamiOK) Error() string

func (*WhoamiOK) GetPayload

func (o *WhoamiOK) GetPayload() *models.UserInfo

type WhoamiParams

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

WhoamiParams contains all the parameters to send to the API endpoint

for the whoami operation.

Typically these are written to a http.Request.

func NewWhoamiParams

func NewWhoamiParams() *WhoamiParams

NewWhoamiParams creates a new WhoamiParams 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 NewWhoamiParamsWithContext

func NewWhoamiParamsWithContext(ctx context.Context) *WhoamiParams

NewWhoamiParamsWithContext creates a new WhoamiParams object with the ability to set a context for a request.

func NewWhoamiParamsWithHTTPClient

func NewWhoamiParamsWithHTTPClient(client *http.Client) *WhoamiParams

NewWhoamiParamsWithHTTPClient creates a new WhoamiParams object with the ability to set a custom HTTPClient for a request.

func NewWhoamiParamsWithTimeout

func NewWhoamiParamsWithTimeout(timeout time.Duration) *WhoamiParams

NewWhoamiParamsWithTimeout creates a new WhoamiParams object with the ability to set a timeout on a request.

func (*WhoamiParams) SetContext

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

SetContext adds the context to the whoami params

func (*WhoamiParams) SetDefaults

func (o *WhoamiParams) SetDefaults()

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

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

func (*WhoamiParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the whoami params

func (*WhoamiParams) SetTimeout

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

SetTimeout adds the timeout to the whoami params

func (*WhoamiParams) WithContext

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

WithContext adds the context to the whoami params

func (*WhoamiParams) WithDefaults

func (o *WhoamiParams) WithDefaults() *WhoamiParams

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

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

func (*WhoamiParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the whoami params

func (*WhoamiParams) WithTimeout

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

WithTimeout adds the timeout to the whoami params

func (*WhoamiParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type WhoamiReader

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

WhoamiReader is a Reader for the Whoami structure.

func (*WhoamiReader) ReadResponse

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