session

package
v0.0.0-...-9dad3f6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT 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 session API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new session API client.

func (*Client) Session

func (a *Client) Session(params *SessionParams) (*SessionOK, error)

Session gets session

### Get API Session

Returns information about the current API session, such as which workspace is selected for the session.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) UpdateSession

func (a *Client) UpdateSession(params *UpdateSessionParams) (*UpdateSessionOK, error)

UpdateSession updates session

### Update API Session

#### API Session Workspace

You can use this endpoint to change the active workspace for the current API session.

Only one workspace can be active in a session. The active workspace can be changed any number of times in a session.

The default workspace for API sessions is the "production" workspace.

All Looker APIs that use projects or lookml models (such as running queries) will use the version of project and model files defined by this workspace for the lifetime of the current API session or until the session workspace is changed again.

An API session has the same lifetime as the access_token used to authenticate API requests. Each successful API login generates a new access_token and a new API session.

If your Looker API client application needs to work in a dev workspace across multiple API sessions, be sure to select the dev workspace after each login.

type SessionBadRequest

type SessionBadRequest struct {
	Payload *models.Error
}

SessionBadRequest handles this case with default header values.

Bad Request

func NewSessionBadRequest

func NewSessionBadRequest() *SessionBadRequest

NewSessionBadRequest creates a SessionBadRequest with default headers values

func (*SessionBadRequest) Error

func (o *SessionBadRequest) Error() string

func (*SessionBadRequest) GetPayload

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

type SessionNotFound

type SessionNotFound struct {
	Payload *models.Error
}

SessionNotFound handles this case with default header values.

Not Found

func NewSessionNotFound

func NewSessionNotFound() *SessionNotFound

NewSessionNotFound creates a SessionNotFound with default headers values

func (*SessionNotFound) Error

func (o *SessionNotFound) Error() string

func (*SessionNotFound) GetPayload

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

type SessionOK

type SessionOK struct {
	Payload *models.APISession
}

SessionOK handles this case with default header values.

Session

func NewSessionOK

func NewSessionOK() *SessionOK

NewSessionOK creates a SessionOK with default headers values

func (*SessionOK) Error

func (o *SessionOK) Error() string

func (*SessionOK) GetPayload

func (o *SessionOK) GetPayload() *models.APISession

type SessionParams

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

SessionParams contains all the parameters to send to the API endpoint for the session operation typically these are written to a http.Request

func NewSessionParams

func NewSessionParams() *SessionParams

NewSessionParams creates a new SessionParams object with the default values initialized.

func NewSessionParamsWithContext

func NewSessionParamsWithContext(ctx context.Context) *SessionParams

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

func NewSessionParamsWithHTTPClient

func NewSessionParamsWithHTTPClient(client *http.Client) *SessionParams

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

func NewSessionParamsWithTimeout

func NewSessionParamsWithTimeout(timeout time.Duration) *SessionParams

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

func (*SessionParams) SetContext

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

SetContext adds the context to the session params

func (*SessionParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the session params

func (*SessionParams) SetTimeout

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

SetTimeout adds the timeout to the session params

func (*SessionParams) WithContext

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

WithContext adds the context to the session params

func (*SessionParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the session params

func (*SessionParams) WithTimeout

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

WithTimeout adds the timeout to the session params

func (*SessionParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type SessionReader

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

SessionReader is a Reader for the Session structure.

func (*SessionReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type UpdateSessionBadRequest

type UpdateSessionBadRequest struct {
	Payload *models.Error
}

UpdateSessionBadRequest handles this case with default header values.

Bad Request

func NewUpdateSessionBadRequest

func NewUpdateSessionBadRequest() *UpdateSessionBadRequest

NewUpdateSessionBadRequest creates a UpdateSessionBadRequest with default headers values

func (*UpdateSessionBadRequest) Error

func (o *UpdateSessionBadRequest) Error() string

func (*UpdateSessionBadRequest) GetPayload

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

type UpdateSessionNotFound

type UpdateSessionNotFound struct {
	Payload *models.Error
}

UpdateSessionNotFound handles this case with default header values.

Not Found

func NewUpdateSessionNotFound

func NewUpdateSessionNotFound() *UpdateSessionNotFound

NewUpdateSessionNotFound creates a UpdateSessionNotFound with default headers values

func (*UpdateSessionNotFound) Error

func (o *UpdateSessionNotFound) Error() string

func (*UpdateSessionNotFound) GetPayload

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

type UpdateSessionOK

type UpdateSessionOK struct {
	Payload *models.APISession
}

UpdateSessionOK handles this case with default header values.

Session

func NewUpdateSessionOK

func NewUpdateSessionOK() *UpdateSessionOK

NewUpdateSessionOK creates a UpdateSessionOK with default headers values

func (*UpdateSessionOK) Error

func (o *UpdateSessionOK) Error() string

func (*UpdateSessionOK) GetPayload

func (o *UpdateSessionOK) GetPayload() *models.APISession

type UpdateSessionParams

type UpdateSessionParams struct {

	/*Body
	  Session

	*/
	Body *models.APISession

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

UpdateSessionParams contains all the parameters to send to the API endpoint for the update session operation typically these are written to a http.Request

func NewUpdateSessionParams

func NewUpdateSessionParams() *UpdateSessionParams

NewUpdateSessionParams creates a new UpdateSessionParams object with the default values initialized.

func NewUpdateSessionParamsWithContext

func NewUpdateSessionParamsWithContext(ctx context.Context) *UpdateSessionParams

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

func NewUpdateSessionParamsWithHTTPClient

func NewUpdateSessionParamsWithHTTPClient(client *http.Client) *UpdateSessionParams

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

func NewUpdateSessionParamsWithTimeout

func NewUpdateSessionParamsWithTimeout(timeout time.Duration) *UpdateSessionParams

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

func (*UpdateSessionParams) SetBody

func (o *UpdateSessionParams) SetBody(body *models.APISession)

SetBody adds the body to the update session params

func (*UpdateSessionParams) SetContext

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

SetContext adds the context to the update session params

func (*UpdateSessionParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the update session params

func (*UpdateSessionParams) SetTimeout

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

SetTimeout adds the timeout to the update session params

func (*UpdateSessionParams) WithBody

WithBody adds the body to the update session params

func (*UpdateSessionParams) WithContext

WithContext adds the context to the update session params

func (*UpdateSessionParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the update session params

func (*UpdateSessionParams) WithTimeout

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

WithTimeout adds the timeout to the update session params

func (*UpdateSessionParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type UpdateSessionReader

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

UpdateSessionReader is a Reader for the UpdateSession structure.

func (*UpdateSessionReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type UpdateSessionUnprocessableEntity

type UpdateSessionUnprocessableEntity struct {
	Payload *models.ValidationError
}

UpdateSessionUnprocessableEntity handles this case with default header values.

Validation Error

func NewUpdateSessionUnprocessableEntity

func NewUpdateSessionUnprocessableEntity() *UpdateSessionUnprocessableEntity

NewUpdateSessionUnprocessableEntity creates a UpdateSessionUnprocessableEntity with default headers values

func (*UpdateSessionUnprocessableEntity) Error

func (*UpdateSessionUnprocessableEntity) GetPayload

Jump to

Keyboard shortcuts

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