sessions

package
v0.0.0-...-a28b298 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 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 sessions API

func (*Client) GetWhoami

func (a *Client) GetWhoami(params *GetWhoamiParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetWhoamiOK, error)

GetWhoami whos am i

Get basic information about your current API or WebAuthN user and their organization. Affords Sub-Organization look ups via Parent Organization for WebAuthN or API key users.

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 {
	GetWhoami(params *GetWhoamiParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetWhoamiOK, 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 sessions API client.

type GetWhoamiOK

type GetWhoamiOK struct {
	Payload *models.GetWhoamiResponse
}

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

A successful response.

func NewGetWhoamiOK

func NewGetWhoamiOK() *GetWhoamiOK

NewGetWhoamiOK creates a GetWhoamiOK with default headers values

func (*GetWhoamiOK) Code

func (o *GetWhoamiOK) Code() int

Code gets the status code for the get whoami o k response

func (*GetWhoamiOK) Error

func (o *GetWhoamiOK) Error() string

func (*GetWhoamiOK) GetPayload

func (o *GetWhoamiOK) GetPayload() *models.GetWhoamiResponse

func (*GetWhoamiOK) IsClientError

func (o *GetWhoamiOK) IsClientError() bool

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

func (*GetWhoamiOK) IsCode

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

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

func (*GetWhoamiOK) IsRedirect

func (o *GetWhoamiOK) IsRedirect() bool

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

func (*GetWhoamiOK) IsServerError

func (o *GetWhoamiOK) IsServerError() bool

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

func (*GetWhoamiOK) IsSuccess

func (o *GetWhoamiOK) IsSuccess() bool

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

func (*GetWhoamiOK) String

func (o *GetWhoamiOK) String() string

type GetWhoamiParams

type GetWhoamiParams struct {

	// Body.
	Body *models.GetWhoamiRequest

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

GetWhoamiParams contains all the parameters to send to the API endpoint

for the get whoami operation.

Typically these are written to a http.Request.

func NewGetWhoamiParams

func NewGetWhoamiParams() *GetWhoamiParams

NewGetWhoamiParams creates a new GetWhoamiParams 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 NewGetWhoamiParamsWithContext

func NewGetWhoamiParamsWithContext(ctx context.Context) *GetWhoamiParams

NewGetWhoamiParamsWithContext creates a new GetWhoamiParams object with the ability to set a context for a request.

func NewGetWhoamiParamsWithHTTPClient

func NewGetWhoamiParamsWithHTTPClient(client *http.Client) *GetWhoamiParams

NewGetWhoamiParamsWithHTTPClient creates a new GetWhoamiParams object with the ability to set a custom HTTPClient for a request.

func NewGetWhoamiParamsWithTimeout

func NewGetWhoamiParamsWithTimeout(timeout time.Duration) *GetWhoamiParams

NewGetWhoamiParamsWithTimeout creates a new GetWhoamiParams object with the ability to set a timeout on a request.

func (*GetWhoamiParams) SetBody

func (o *GetWhoamiParams) SetBody(body *models.GetWhoamiRequest)

SetBody adds the body to the get whoami params

func (*GetWhoamiParams) SetContext

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

SetContext adds the context to the get whoami params

func (*GetWhoamiParams) SetDefaults

func (o *GetWhoamiParams) SetDefaults()

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

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

func (*GetWhoamiParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get whoami params

func (*GetWhoamiParams) SetTimeout

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

SetTimeout adds the timeout to the get whoami params

func (*GetWhoamiParams) WithBody

WithBody adds the body to the get whoami params

func (*GetWhoamiParams) WithContext

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

WithContext adds the context to the get whoami params

func (*GetWhoamiParams) WithDefaults

func (o *GetWhoamiParams) WithDefaults() *GetWhoamiParams

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

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

func (*GetWhoamiParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get whoami params

func (*GetWhoamiParams) WithTimeout

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

WithTimeout adds the timeout to the get whoami params

func (*GetWhoamiParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetWhoamiReader

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

GetWhoamiReader is a Reader for the GetWhoami structure.

func (*GetWhoamiReader) ReadResponse

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