Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type SessionBadRequest
- type SessionNotFound
- type SessionOK
- type SessionParams
- func (o *SessionParams) SetContext(ctx context.Context)
- func (o *SessionParams) SetDefaults()
- func (o *SessionParams) SetHTTPClient(client *http.Client)
- func (o *SessionParams) SetTimeout(timeout time.Duration)
- func (o *SessionParams) WithContext(ctx context.Context) *SessionParams
- func (o *SessionParams) WithDefaults() *SessionParams
- func (o *SessionParams) WithHTTPClient(client *http.Client) *SessionParams
- func (o *SessionParams) WithTimeout(timeout time.Duration) *SessionParams
- func (o *SessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type SessionReader
- type UpdateSessionBadRequest
- type UpdateSessionNotFound
- type UpdateSessionOK
- type UpdateSessionParams
- func (o *UpdateSessionParams) SetBody(body *models.APISession)
- func (o *UpdateSessionParams) SetContext(ctx context.Context)
- func (o *UpdateSessionParams) SetDefaults()
- func (o *UpdateSessionParams) SetHTTPClient(client *http.Client)
- func (o *UpdateSessionParams) SetTimeout(timeout time.Duration)
- func (o *UpdateSessionParams) WithBody(body *models.APISession) *UpdateSessionParams
- func (o *UpdateSessionParams) WithContext(ctx context.Context) *UpdateSessionParams
- func (o *UpdateSessionParams) WithDefaults() *UpdateSessionParams
- func (o *UpdateSessionParams) WithHTTPClient(client *http.Client) *UpdateSessionParams
- func (o *UpdateSessionParams) WithTimeout(timeout time.Duration) *UpdateSessionParams
- func (o *UpdateSessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type UpdateSessionReader
- type UpdateSessionTooManyRequests
- type UpdateSessionUnprocessableEntity
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 (*Client) Session ¶
func (a *Client) Session(params *SessionParams, opts ...ClientOption) (*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, opts ...ClientOption) (*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 ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { Session(params *SessionParams, opts ...ClientOption) (*SessionOK, error) UpdateSession(params *UpdateSessionParams, opts ...ClientOption) (*UpdateSessionOK, 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 session API client.
type SessionBadRequest ¶
SessionBadRequest describes a response with status code 400, 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 ¶
SessionNotFound describes a response with status code 404, 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 describes a response with status code 200, with default header values.
Session
func NewSessionOK ¶
func NewSessionOK() *SessionOK
NewSessionOK creates a SessionOK with default headers values
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 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 NewSessionParamsWithContext ¶
func NewSessionParamsWithContext(ctx context.Context) *SessionParams
NewSessionParamsWithContext creates a new SessionParams object with 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 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 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) SetDefaults ¶
func (o *SessionParams) SetDefaults()
SetDefaults hydrates default values in the session params (not the query body).
All values with no default are reset to their zero value.
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) WithDefaults ¶
func (o *SessionParams) WithDefaults() *SessionParams
WithDefaults hydrates default values in the session params (not the query body).
All values with no default are reset to their zero value.
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 ¶
UpdateSessionBadRequest describes a response with status code 400, 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 ¶
UpdateSessionNotFound describes a response with status code 404, 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 describes a response with status code 200, 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 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 NewUpdateSessionParamsWithContext ¶
func NewUpdateSessionParamsWithContext(ctx context.Context) *UpdateSessionParams
NewUpdateSessionParamsWithContext creates a new UpdateSessionParams object with 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 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 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) SetDefaults ¶
func (o *UpdateSessionParams) SetDefaults()
SetDefaults hydrates default values in the update session params (not the query body).
All values with no default are reset to their zero value.
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 ¶
func (o *UpdateSessionParams) WithBody(body *models.APISession) *UpdateSessionParams
WithBody adds the body to the update session params
func (*UpdateSessionParams) WithContext ¶
func (o *UpdateSessionParams) WithContext(ctx context.Context) *UpdateSessionParams
WithContext adds the context to the update session params
func (*UpdateSessionParams) WithDefaults ¶
func (o *UpdateSessionParams) WithDefaults() *UpdateSessionParams
WithDefaults hydrates default values in the update session params (not the query body).
All values with no default are reset to their zero value.
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 UpdateSessionTooManyRequests ¶
UpdateSessionTooManyRequests describes a response with status code 429, with default header values.
Too Many Requests
func NewUpdateSessionTooManyRequests ¶
func NewUpdateSessionTooManyRequests() *UpdateSessionTooManyRequests
NewUpdateSessionTooManyRequests creates a UpdateSessionTooManyRequests with default headers values
func (*UpdateSessionTooManyRequests) Error ¶
func (o *UpdateSessionTooManyRequests) Error() string
func (*UpdateSessionTooManyRequests) GetPayload ¶
func (o *UpdateSessionTooManyRequests) GetPayload() *models.Error
type UpdateSessionUnprocessableEntity ¶
type UpdateSessionUnprocessableEntity struct {
Payload *models.ValidationError
}
UpdateSessionUnprocessableEntity describes a response with status code 422, with default header values.
Validation Error
func NewUpdateSessionUnprocessableEntity ¶
func NewUpdateSessionUnprocessableEntity() *UpdateSessionUnprocessableEntity
NewUpdateSessionUnprocessableEntity creates a UpdateSessionUnprocessableEntity with default headers values
func (*UpdateSessionUnprocessableEntity) Error ¶
func (o *UpdateSessionUnprocessableEntity) Error() string
func (*UpdateSessionUnprocessableEntity) GetPayload ¶
func (o *UpdateSessionUnprocessableEntity) GetPayload() *models.ValidationError