workspace

package
v0.0.0-...-09f9b81 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 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 AllWorkspacesBadRequest

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

Bad Request

func NewAllWorkspacesBadRequest

func NewAllWorkspacesBadRequest() *AllWorkspacesBadRequest

NewAllWorkspacesBadRequest creates a AllWorkspacesBadRequest with default headers values

func (*AllWorkspacesBadRequest) Error

func (o *AllWorkspacesBadRequest) Error() string

func (*AllWorkspacesBadRequest) GetPayload

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

type AllWorkspacesNotFound

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

Not Found

func NewAllWorkspacesNotFound

func NewAllWorkspacesNotFound() *AllWorkspacesNotFound

NewAllWorkspacesNotFound creates a AllWorkspacesNotFound with default headers values

func (*AllWorkspacesNotFound) Error

func (o *AllWorkspacesNotFound) Error() string

func (*AllWorkspacesNotFound) GetPayload

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

type AllWorkspacesOK

type AllWorkspacesOK struct {
	Payload []*models.Workspace
}
AllWorkspacesOK describes a response with status code 200, with default header values.

Workspace

func NewAllWorkspacesOK

func NewAllWorkspacesOK() *AllWorkspacesOK

NewAllWorkspacesOK creates a AllWorkspacesOK with default headers values

func (*AllWorkspacesOK) Error

func (o *AllWorkspacesOK) Error() string

func (*AllWorkspacesOK) GetPayload

func (o *AllWorkspacesOK) GetPayload() []*models.Workspace

type AllWorkspacesParams

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

AllWorkspacesParams contains all the parameters to send to the API endpoint

for the all workspaces operation.

Typically these are written to a http.Request.

func NewAllWorkspacesParams

func NewAllWorkspacesParams() *AllWorkspacesParams

NewAllWorkspacesParams creates a new AllWorkspacesParams 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 NewAllWorkspacesParamsWithContext

func NewAllWorkspacesParamsWithContext(ctx context.Context) *AllWorkspacesParams

NewAllWorkspacesParamsWithContext creates a new AllWorkspacesParams object with the ability to set a context for a request.

func NewAllWorkspacesParamsWithHTTPClient

func NewAllWorkspacesParamsWithHTTPClient(client *http.Client) *AllWorkspacesParams

NewAllWorkspacesParamsWithHTTPClient creates a new AllWorkspacesParams object with the ability to set a custom HTTPClient for a request.

func NewAllWorkspacesParamsWithTimeout

func NewAllWorkspacesParamsWithTimeout(timeout time.Duration) *AllWorkspacesParams

NewAllWorkspacesParamsWithTimeout creates a new AllWorkspacesParams object with the ability to set a timeout on a request.

func (*AllWorkspacesParams) SetContext

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

SetContext adds the context to the all workspaces params

func (*AllWorkspacesParams) SetDefaults

func (o *AllWorkspacesParams) SetDefaults()

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

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

func (*AllWorkspacesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the all workspaces params

func (*AllWorkspacesParams) SetTimeout

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

SetTimeout adds the timeout to the all workspaces params

func (*AllWorkspacesParams) WithContext

WithContext adds the context to the all workspaces params

func (*AllWorkspacesParams) WithDefaults

func (o *AllWorkspacesParams) WithDefaults() *AllWorkspacesParams

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

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

func (*AllWorkspacesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the all workspaces params

func (*AllWorkspacesParams) WithTimeout

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

WithTimeout adds the timeout to the all workspaces params

func (*AllWorkspacesParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type AllWorkspacesReader

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

AllWorkspacesReader is a Reader for the AllWorkspaces structure.

func (*AllWorkspacesReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type Client

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

Client for workspace API

func (*Client) AllWorkspaces

func (a *Client) AllWorkspaces(params *AllWorkspacesParams, opts ...ClientOption) (*AllWorkspacesOK, error)
AllWorkspaces gets all workspaces

### Get All Workspaces

Returns all workspaces available to the calling user.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) Workspace

func (a *Client) Workspace(params *WorkspaceParams, opts ...ClientOption) (*WorkspaceOK, error)
Workspace gets workspace

### Get A Workspace

Returns information about a workspace such as the git status and selected branches of all projects available to the caller's user account.

A workspace defines which versions of project files will be used to evaluate expressions and operations that use model definitions - operations such as running queries or rendering dashboards. Each project has its own git repository, and each project in a workspace may be configured to reference particular branch or revision within their respective repositories.

There are two predefined workspaces available: "production" and "dev".

The production workspace is shared across all Looker users. Models in the production workspace are read-only. Changing files in production is accomplished by modifying files in a git branch and using Pull Requests to merge the changes from the dev branch into the production branch, and then telling Looker to sync with production.

The dev workspace is local to each Looker user. Changes made to project/model files in the dev workspace only affect that user, and only when the dev workspace is selected as the active workspace for the API session. (See set_session_workspace()).

The dev workspace is NOT unique to an API session. Two applications accessing the Looker API using the same user account will see the same files in the dev workspace. To avoid collisions between API clients it's best to have each client login with API3 credentials for a different user account.

Changes made to files in a dev workspace are persistent across API sessions. It's a good idea to commit any changes you've made to the git repository, but not strictly required. Your modified files reside in a special user-specific directory on the Looker server and will still be there when you login in again later and use update_session(workspace_id: "dev") to select the dev workspace for the new API session.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	AllWorkspaces(params *AllWorkspacesParams, opts ...ClientOption) (*AllWorkspacesOK, error)

	Workspace(params *WorkspaceParams, opts ...ClientOption) (*WorkspaceOK, 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 workspace API client.

type WorkspaceBadRequest

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

Bad Request

func NewWorkspaceBadRequest

func NewWorkspaceBadRequest() *WorkspaceBadRequest

NewWorkspaceBadRequest creates a WorkspaceBadRequest with default headers values

func (*WorkspaceBadRequest) Error

func (o *WorkspaceBadRequest) Error() string

func (*WorkspaceBadRequest) GetPayload

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

type WorkspaceNotFound

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

Not Found

func NewWorkspaceNotFound

func NewWorkspaceNotFound() *WorkspaceNotFound

NewWorkspaceNotFound creates a WorkspaceNotFound with default headers values

func (*WorkspaceNotFound) Error

func (o *WorkspaceNotFound) Error() string

func (*WorkspaceNotFound) GetPayload

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

type WorkspaceOK

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

Workspace

func NewWorkspaceOK

func NewWorkspaceOK() *WorkspaceOK

NewWorkspaceOK creates a WorkspaceOK with default headers values

func (*WorkspaceOK) Error

func (o *WorkspaceOK) Error() string

func (*WorkspaceOK) GetPayload

func (o *WorkspaceOK) GetPayload() *models.Workspace

type WorkspaceParams

type WorkspaceParams struct {

	/* WorkspaceID.

	   Id of the workspace
	*/
	WorkspaceID string

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

WorkspaceParams contains all the parameters to send to the API endpoint

for the workspace operation.

Typically these are written to a http.Request.

func NewWorkspaceParams

func NewWorkspaceParams() *WorkspaceParams

NewWorkspaceParams creates a new WorkspaceParams 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 NewWorkspaceParamsWithContext

func NewWorkspaceParamsWithContext(ctx context.Context) *WorkspaceParams

NewWorkspaceParamsWithContext creates a new WorkspaceParams object with the ability to set a context for a request.

func NewWorkspaceParamsWithHTTPClient

func NewWorkspaceParamsWithHTTPClient(client *http.Client) *WorkspaceParams

NewWorkspaceParamsWithHTTPClient creates a new WorkspaceParams object with the ability to set a custom HTTPClient for a request.

func NewWorkspaceParamsWithTimeout

func NewWorkspaceParamsWithTimeout(timeout time.Duration) *WorkspaceParams

NewWorkspaceParamsWithTimeout creates a new WorkspaceParams object with the ability to set a timeout on a request.

func (*WorkspaceParams) SetContext

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

SetContext adds the context to the workspace params

func (*WorkspaceParams) SetDefaults

func (o *WorkspaceParams) SetDefaults()

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

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

func (*WorkspaceParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the workspace params

func (*WorkspaceParams) SetTimeout

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

SetTimeout adds the timeout to the workspace params

func (*WorkspaceParams) SetWorkspaceID

func (o *WorkspaceParams) SetWorkspaceID(workspaceID string)

SetWorkspaceID adds the workspaceId to the workspace params

func (*WorkspaceParams) WithContext

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

WithContext adds the context to the workspace params

func (*WorkspaceParams) WithDefaults

func (o *WorkspaceParams) WithDefaults() *WorkspaceParams

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

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

func (*WorkspaceParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the workspace params

func (*WorkspaceParams) WithTimeout

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

WithTimeout adds the timeout to the workspace params

func (*WorkspaceParams) WithWorkspaceID

func (o *WorkspaceParams) WithWorkspaceID(workspaceID string) *WorkspaceParams

WithWorkspaceID adds the workspaceID to the workspace params

func (*WorkspaceParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type WorkspaceReader

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

WorkspaceReader is a Reader for the Workspace structure.

func (*WorkspaceReader) ReadResponse

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