Documentation
¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)
- func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
- func Int(v int) *int
- func StreamToString(stream io.Reader) string
- func String(v string) *string
- func Stringify(message interface{}) string
- type ApiConfig
- type ArgError
- type AuthToken
- type Client
- func (c *Client) CreateDevConnection(ctx context.Context, rc RequestCompletionCallback) (*Client, *Session, error)
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)
- func (c *Client) EnsureStaticToken(ctx context.Context, parentClient *Client, apiUserID string) error
- func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
- func (c *Client) SetBaseURL(bu string) error
- func (c *Client) SetOauthCredentials(ctx context.Context, clientId string, clientSecret string) error
- func (c *Client) SetOauthStaticToken(ctx context.Context, token *oauth2.Token) error
- func (c *Client) SetRequestHeaders(headers map[string]string) error
- func (c *Client) SetUserAgent(ua string) error
- type ClientOpt
- type ConnectionsResource
- type ConnectionsResourceOp
- func (s ConnectionsResourceOp) Create(ctx context.Context, connection *DBConnection) (*DBConnection, *Response, error)
- func (s ConnectionsResourceOp) Delete(ctx context.Context, connectionName string) (*Response, error)
- func (s ConnectionsResourceOp) Get(ctx context.Context, connectionName string) (*DBConnection, *Response, error)
- func (s ConnectionsResourceOp) Update(ctx context.Context, connectionName string, connection *DBConnection) (*DBConnection, *Response, error)
- func (s ConnectionsResourceOp) ValidateConfig(ctx context.Context, connection *DBConnection) (dbcv []DBConnectionValidation, resp *Response, err error)
- func (s ConnectionsResourceOp) ValidateConnection(ctx context.Context, connectionName string, tests []string) (dbcv []DBConnectionValidation, resp *Response, err error)
- type CredentialEmail
- type CredentialSaml
- type DBConnection
- type DBConnectionValidation
- type DBDialect
- type Dashboard
- type Error
- type ErrorResponse
- type Folder
- type FoldersResource
- type FoldersResourceOp
- func (s *FoldersResourceOp) Create(ctx context.Context, requestFolder *Folder) (*Folder, *Response, error)
- func (s *FoldersResourceOp) Delete(ctx context.Context, FolderId string) (*Response, error)
- func (s *FoldersResourceOp) Get(ctx context.Context, FolderId string) (*Folder, *Response, error)
- func (s *FoldersResourceOp) List(ctx context.Context, opt *ListOptions) ([]Folder, *Response, error)
- func (s *FoldersResourceOp) ListByName(ctx context.Context, name string, opt *ListOptions) ([]Folder, *Response, error)
- func (s *FoldersResourceOp) Update(ctx context.Context, FolderId string, requestFolder *Folder) (*Folder, *Response, error)
- type GitBranch
- type GitBranchRef
- type Group
- type GroupsResource
- type GroupsResourceOp
- func (s *GroupsResourceOp) AddMemberGroup(ctx context.Context, parentID int, memberID int) (*Group, *Response, error)
- func (s *GroupsResourceOp) AddMemberUser(ctx context.Context, parentID int, memberID int) (*User, *Response, error)
- func (s *GroupsResourceOp) Create(ctx context.Context, createReq *Group) (*Group, *Response, error)
- func (s *GroupsResourceOp) Delete(ctx context.Context, id int) (*Response, error)
- func (s *GroupsResourceOp) Get(ctx context.Context, id int) (*Group, *Response, error)
- func (s *GroupsResourceOp) List(ctx context.Context, opt *ListOptions) ([]Group, *Response, error)
- func (s *GroupsResourceOp) ListById(ctx context.Context, ids []int, opt *ListOptions) ([]Group, *Response, error)
- func (s *GroupsResourceOp) ListByName(ctx context.Context, name string, opt *ListOptions) ([]Group, *Response, error)
- func (s *GroupsResourceOp) ListMemberGroups(ctx context.Context, id int, opt *ListOptions) ([]Group, *Response, error)
- func (s *GroupsResourceOp) ListMemberUsers(ctx context.Context, id int, opt *ListOptions) ([]User, *Response, error)
- func (s *GroupsResourceOp) RemoveMemberGroup(ctx context.Context, parentID int, memberID int) (*Response, error)
- func (s *GroupsResourceOp) RemoveMemberUser(ctx context.Context, parentID int, memberID int) (*Response, error)
- func (s *GroupsResourceOp) Update(ctx context.Context, id int, updateReq *Group) (*Group, *Response, error)
- type ListOptions
- type Look
- type LookMLModel
- type LookMlModelsResource
- type LookMlModelsResourceOp
- func (s LookMlModelsResourceOp) Create(ctx context.Context, requestLookMLModel *LookMLModel) (*LookMLModel, *Response, error)
- func (s LookMlModelsResourceOp) Delete(ctx context.Context, LookMLModelName string) (*Response, error)
- func (s LookMlModelsResourceOp) Get(ctx context.Context, LookMLModelName string) (*LookMLModel, *Response, error)
- func (s LookMlModelsResourceOp) List(ctx context.Context) ([]LookMLModel, *Response, error)
- func (s LookMlModelsResourceOp) Update(ctx context.Context, LookMLModelName string, requestLookMLModel *LookMLModel) (*LookMLModel, *Response, error)
- type LookModel
- type ModelSet
- type ModelSetsResource
- type ModelSetsResourceOp
- func (s ModelSetsResourceOp) Create(ctx context.Context, modelSet *ModelSet) (*ModelSet, *Response, error)
- func (s ModelSetsResourceOp) Delete(ctx context.Context, modelSetId string) (*Response, error)
- func (s ModelSetsResourceOp) Get(ctx context.Context, modelSetId string) (*ModelSet, *Response, error)
- func (s ModelSetsResourceOp) List(ctx context.Context) ([]ModelSet, *Response, error)
- func (s ModelSetsResourceOp) Update(ctx context.Context, modelSetId string, modelSet *ModelSet) (*ModelSet, *Response, error)
- type NewGroupMemberGroup
- type NewGroupMemberUser
- type Permission
- type PermissionSet
- type PermissionSetSlice
- type Project
- type ProjectsResource
- type ProjectsResourceOp
- func (s *ProjectsResourceOp) AllowWarnings(ctx context.Context, projectName string, value bool) (*Response, error)
- func (s *ProjectsResourceOp) Create(ctx context.Context, proj *Project) (*Project, *Response, error)
- func (s *ProjectsResourceOp) Delete(ctx context.Context, projectName string) (*Response, error)
- func (s *ProjectsResourceOp) DeleteGitRepo(ctx context.Context, projectName string) (*Response, error)
- func (s *ProjectsResourceOp) DeployToProduction(ctx context.Context, projectName string) (*string, *Response, error)
- func (s *ProjectsResourceOp) Get(ctx context.Context, projectName string) (*Project, *Response, error)
- func (s *ProjectsResourceOp) GitBranchActiveGet(ctx context.Context, projectName string) (*GitBranch, *Response, error)
- func (s *ProjectsResourceOp) GitBranchCheckout(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)
- func (s *ProjectsResourceOp) GitBranchDelete(ctx context.Context, projectName string, branchName string) (*Response, error)
- func (s *ProjectsResourceOp) GitBranchDeployToProduction(ctx context.Context, projectName string, branch string) (*string, *Response, error)
- func (s *ProjectsResourceOp) GitBranchListByName(ctx context.Context, projectName string, branchName string) (*GitBranch, *Response, error)
- func (s *ProjectsResourceOp) GitBranchUpdate(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)
- func (s *ProjectsResourceOp) GitBranchesList(ctx context.Context, projectName string, opt *ListOptions) ([]GitBranch, *Response, error)
- func (s *ProjectsResourceOp) GitDeployKeyCreate(ctx context.Context, projectName string) (*string, *Response, error)
- func (s *ProjectsResourceOp) GitDeployKeyGet(ctx context.Context, projectName string) (*string, *Response, error)
- func (s *ProjectsResourceOp) GitRefDeployToProduction(ctx context.Context, projectName string, ref string) (*string, *Response, error)
- func (s *ProjectsResourceOp) Update(ctx context.Context, projectName string, proj *Project) (*Project, *Response, error)
- type Rate
- type RequestCompletionCallback
- type Response
- type Role
- type RolesResource
- type RolesResourceOp
- func (s *RolesResourceOp) Create(ctx context.Context, createReq *Role) (*Role, *Response, error)
- func (s *RolesResourceOp) Delete(ctx context.Context, id int) (*Response, error)
- func (s *RolesResourceOp) Get(ctx context.Context, id int) (*Role, *Response, error)
- func (s *RolesResourceOp) List(ctx context.Context, opt *ListOptions) ([]Role, *Response, error)
- func (s *RolesResourceOp) PermissionSetGet(ctx context.Context, id int) (*PermissionSet, *Response, error)
- func (s *RolesResourceOp) PermissionSetListById(ctx context.Context, ids []int, opt *ListOptions) ([]PermissionSet, *Response, error)
- func (s *RolesResourceOp) PermissionSetListByName(ctx context.Context, name string, opt *ListOptions) ([]PermissionSet, *Response, error)
- func (s *RolesResourceOp) PermissionSetsList(ctx context.Context, opt *ListOptions) (PermissionSetSlice, *Response, error)
- func (s *RolesResourceOp) RoleGroupsList(ctx context.Context, id int, opt *ListOptions) ([]Group, *Response, error)
- func (s *RolesResourceOp) RoleGroupsSet(ctx context.Context, id int, groupIds []string) ([]Group, *Response, error)
- func (s *RolesResourceOp) RoleUsersList(ctx context.Context, id int, opt *ListOptions) ([]User, *Response, error)
- func (s *RolesResourceOp) RoleUsersSet(ctx context.Context, id int, userIds []string) ([]User, *Response, error)
- func (s *RolesResourceOp) Update(ctx context.Context, id int, updateReq *Role) (*Role, *Response, error)
- type Session
- type SessionsResource
- type SessionsResourceOp
- func (s *SessionsResourceOp) Get(ctx context.Context) (*Session, *Response, error)
- func (s *SessionsResourceOp) GetCurrentUser(ctx context.Context) (*User, *Response, error)
- func (s *SessionsResourceOp) GetLoginUserToken(ctx context.Context, userId string) (*oauth2.Token, *Response, error)
- func (s *SessionsResourceOp) SetWorkspaceId(ctx context.Context, workspaceId string) (session *Session, resp *Response, err error)
- type SliceStringInts
- type Snippet
- type Timestamp
- type User
- type UsersResource
- type UsersResourceOp
- func (s *UsersResourceOp) Create(ctx context.Context, createReq *User) (*User, *Response, error)
- func (s *UsersResourceOp) CreateEmail(ctx context.Context, id int, createReq *CredentialEmail) (*CredentialEmail, *Response, error)
- func (s *UsersResourceOp) CreatePasswordReset(ctx context.Context, id int) (*CredentialEmail, *Response, error)
- func (s *UsersResourceOp) Delete(ctx context.Context, id int) (*Response, error)
- func (s *UsersResourceOp) DeleteEmail(ctx context.Context, id int) (*Response, error)
- func (s *UsersResourceOp) Get(ctx context.Context, id int) (*User, *Response, error)
- func (s *UsersResourceOp) GetEmail(ctx context.Context, id int) (*CredentialEmail, *Response, error)
- func (s *UsersResourceOp) GetRoles(ctx context.Context, id int) ([]Role, *Response, error)
- func (s *UsersResourceOp) List(ctx context.Context, opt *ListOptions) ([]User, *Response, error)
- func (s *UsersResourceOp) ListByEmail(ctx context.Context, email string, opt *ListOptions) ([]User, *Response, error)
- func (s *UsersResourceOp) ListById(ctx context.Context, ids []int, opt *ListOptions) ([]User, *Response, error)
- func (s *UsersResourceOp) SendPasswordReset(ctx context.Context, id int) (*CredentialEmail, *Response, error)
- func (s *UsersResourceOp) SetRoles(ctx context.Context, id int, roleIds []string) ([]Role, *Response, error)
- func (s *UsersResourceOp) Update(ctx context.Context, id int, updateReq *User) (*User, *Response, error)
- func (s *UsersResourceOp) UpdateEmail(ctx context.Context, id int, updateReq *CredentialEmail) (*CredentialEmail, *Response, error)
- type WorkspacesResource
- type WorkspacesResourceOp
Constants ¶
const FoldersBasePath = "4.0/folders"
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored. If the API error response does not include the request ID in its body, the one from its header will be used.
func DoRequestWithClient ¶
func DoRequestWithClient( ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
DoRequestWithClient submits an HTTP request using the specified client.
func Int ¶
Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.
func StreamToString ¶
StreamToString converts a reader to a string
Types ¶
type ApiConfig ¶
type ApiConfig struct { ClientId string ClientSecret string BaseURL string ClientCtx context.Context }
ApiConfig -
type ArgError ¶
type ArgError struct {
// contains filtered or unexported fields
}
ArgError is an error that represents an error with an input to pkg. It identifies the argument and the cause (if possible).
func NewArgError ¶
NewArgError creates an InputError.
type AuthToken ¶
type AuthToken struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type,omitempty"` ExpiresIn int `json:"expires_in,omitempty"` // Differs from oauth2.Token{}: `json:"expiry,omitempty" RefreshToken *string `json:"refresh_token,omitempty"` // contains filtered or unexported fields }
AuthToken -
type Client ¶
type Client struct { // Base URL for API requests. BaseURL *url.URL // User agent for HTTP client UserAgent string // Rate contains the current rate limit for the client as determined by the most recent // API call. It is not thread-safe. Please consider using GetRate() instead. Rate Rate // Resources used for communicating with the API Groups GroupsResource Users UsersResource Roles RolesResource Folders FoldersResource Workspaces WorkspacesResource Projects ProjectsResource Sessions SessionsResource ModelSets ModelSetsResource Connections ConnectionsResource LookMLModel LookMlModelsResource // Production or dev workspace Workspace string // contains filtered or unexported fields }
Client manages communication with the API.
func NewFromStaticToken ¶
NewFromStaticToken returns a new API client using the given API token.
func (*Client) CreateDevConnection ¶
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.
func (*Client) EnsureStaticToken ¶
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.
func (*Client) OnRequestCompleted ¶
func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
OnRequestCompleted sets the DO API request completion callback
func (*Client) SetBaseURL ¶
SetBaseURL is a client option for setting the base URL.
func (*Client) SetOauthCredentials ¶
func (*Client) SetOauthStaticToken ¶
func (*Client) SetRequestHeaders ¶
SetRequestHeaders sets optional HTTP headers on the client that are sent on each HTTP request.
func (*Client) SetUserAgent ¶
SetUserAgent is a client option for setting the user agent.
type ConnectionsResource ¶
type ConnectionsResource interface { Get(ctx context.Context, connectionName string) (*DBConnection, *Response, error) Create(ctx context.Context, connection *DBConnection) (*DBConnection, *Response, error) Update(ctx context.Context, connectionName string, connection *DBConnection) (*DBConnection, *Response, error) Delete(ctx context.Context, connectionName string) (*Response, error) ValidateConfig(ctx context.Context, connection *DBConnection) ([]DBConnectionValidation, *Response, error) ValidateConnection(ctx context.Context, connectionName string, tests []string) ([]DBConnectionValidation, *Response, error) }
type ConnectionsResourceOp ¶
type ConnectionsResourceOp struct {
// contains filtered or unexported fields
}
func (ConnectionsResourceOp) Create ¶
func (s ConnectionsResourceOp) Create(ctx context.Context, connection *DBConnection) (*DBConnection, *Response, error)
func (ConnectionsResourceOp) Get ¶
func (s ConnectionsResourceOp) Get(ctx context.Context, connectionName string) (*DBConnection, *Response, error)
func (ConnectionsResourceOp) Update ¶
func (s ConnectionsResourceOp) Update(ctx context.Context, connectionName string, connection *DBConnection) (*DBConnection, *Response, error)
func (ConnectionsResourceOp) ValidateConfig ¶
func (s ConnectionsResourceOp) ValidateConfig(ctx context.Context, connection *DBConnection) (dbcv []DBConnectionValidation, resp *Response, err error)
func (ConnectionsResourceOp) ValidateConnection ¶
func (s ConnectionsResourceOp) ValidateConnection(ctx context.Context, connectionName string, tests []string) (dbcv []DBConnectionValidation, resp *Response, err error)
ValidateConnection - Possible for most db's: first do connect test; next do kill,query test
type CredentialEmail ¶
type CredentialEmail struct { Email string `json:"email"` ForcedReset bool `json:"forced_password_reset_at_next_login"` IsDisabled bool `json:"is_disabled,omitempty"` }
CredentialEmail -
type CredentialSaml ¶
type DBConnection ¶
type DBConnection struct { // Name of the connection. Also used as the unique identifier Name string `json:"name,omitempty"` Dialect *DBDialect `json:"dialect,omitempty"` // SQL Runner snippets for this connection Snippets []Snippet `json:"snippets,omitempty"` // True if PDTs are enabled on this connection PdtsEnabled *bool `json:"pdts_enabled,omitempty"` // Host name/address of server Host string `json:"host,omitempty"` // Port number on server Port string `json:"port,omitempty"` // Username for server authentication Username string `json:"username,omitempty"` // (Write-Only) Password for server authentication Password string `json:"password,omitempty"` // Whether the connection uses OAuth for authentication. UsesOauth *bool `json:"uses_oauth,omitempty"` // (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). Certificate string `json:"certificate,omitempty"` // (Write-Only) Certificate keyfile type - .json or .p12 FileType string `json:"file_type,omitempty"` // Database name Database string `json:"database,omitempty"` // Time zone of database DbTimezone string `json:"db_timezone,omitempty"` // Timezone to use in queries QueryTimezone string `json:"query_timezone,omitempty"` // Scheme name Schema string `json:"schema,omitempty"` // Maximum number of concurrent connection to use MaxConnections int64 `json:"max_connections,omitempty"` // Maximum size of query in GBs (BigQuery only, can be a user_attribute name) MaxBillingGigabytes string `json:"max_billing_gigabytes,omitempty"` // Use SSL/TLS when connecting to server Ssl *bool `json:"ssl,omitempty"` // Verify the SSL VerifySsl *bool `json:"verify_ssl,omitempty"` // Name of temporary database (if used) TmpDbName string `json:"tmp_db_name,omitempty"` // Additional params to add to JDBC connection string JdbcAdditionalParams string `json:"jdbc_additional_params,omitempty"` // Connection Pool Timeout, in seconds PoolTimeout int64 `json:"pool_timeout,omitempty"` // (Read/Write) SQL Dialect name DialectName string `json:"dialect_name,omitempty"` // Creation date for this connection CreatedAt string `json:"created_at,omitempty"` // Id of user who last modified this connection configuration UserId string `json:"user_id,omitempty"` // Is this an example connection? Example *bool `json:"example,omitempty"` // (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password UserDbCredentials *bool `json:"user_db_credentials,omitempty"` // Fields whose values map to user attribute names UserAttributeFields []string `json:"user_attribute_fields,omitempty"` // Cron string specifying when maintenance such as PDT trigger checks and drops should be performed MaintenanceCron string `json:"maintenance_cron,omitempty"` // Unix timestamp at start of last completed PDT trigger check process LastRegenAt string `json:"last_regen_at,omitempty"` // Unix timestamp at start of last completed PDT reap process LastReapAt string `json:"last_reap_at,omitempty"` // Precache tables in the SQL Runner SqlRunnerPrecacheTables *bool `json:"sql_runner_precache_tables,omitempty"` // Fetch Information Schema For SQL Writing SqlWritingWithInfoSchema *bool `json:"sql_writing_with_info_schema,omitempty"` // SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature AfterConnectStatements string `json:"after_connect_statements,omitempty"` // Not implemented // PdtContextOverride DBConnectionOverride `json:"pdt_context_override,omitempty"` // Is this connection created and managed by Looker Managed *bool `json:"managed,omitempty"` // The Id of the ssh tunnel this connection uses TunnelId string `json:"tunnel_id,omitempty"` // Maximum number of threads to use to build PDTs in parallel PdtConcurrency int64 `json:"pdt_concurrency,omitempty"` // When disable_context_comment is true comment will not be added to SQL DisableContextComment *bool `json:"disable_context_comment,omitempty"` // An External OAuth Application to use for authenticating to the database OauthApplicationId string `json:"oauth_application_id,omitempty"` // When true, error PDTs will be retried every regenerator cycle AlwaysRetryFailedBuilds *bool `json:"always_retry_failed_builds,omitempty"` // When true, query cost estimate will be displayed in explore. CostEstimateEnabled *bool `json:"cost_estimate_enabled,omitempty"` // PDT builds on this connection can be kicked off and cancelled via API. PdtApiControlEnabled *bool `json:"pdt_api_control_enabled,omitempty"` }
<editor-fold desc="type_structs"> DBConnection struct for DBConnection
type DBConnectionValidation ¶
type DBDialect ¶
type DBDialect struct { // The name of the dialect Name string `json:"name,omitempty"` // The human-readable label of the connection Label string `json:"label,omitempty"` // Whether the dialect supports query cost estimates SupportsCostEstimate *bool `json:"supports_cost_estimate,omitempty"` // How the dialect handles cost estimation CostEstimateStyle string `json:"cost_estimate_style,omitempty"` // PDT index columns PersistentTableIndexes string `json:"persistent_table_indexes,omitempty"` // PDT sortkey columns PersistentTableSortkeys string `json:"persistent_table_sortkeys,omitempty"` // PDT distkey column PersistentTableDistkey string `json:"persistent_table_distkey,omitempty"` // Suports streaming results SupportsStreaming *bool `json:"supports_streaming,omitempty"` // Should SQL Runner snippets automatically be run AutomaticallyRunSqlRunnerSnippets *bool `json:"automatically_run_sql_runner_snippets,omitempty"` // Array of names of the tests that can be run on a connection using this dialect ConnectionTests []string `json:"connection_tests,omitempty"` // Is supported with the inducer (i.e. generate from sql) SupportsInducer *bool `json:"supports_inducer,omitempty"` // Can multiple databases be accessed from a connection using this dialect SupportsMultipleDatabases *bool `json:"supports_multiple_databases,omitempty"` // Whether the dialect supports allowing Looker to build persistent derived tables SupportsPersistentDerivedTables *bool `json:"supports_persistent_derived_tables,omitempty"` // Does the database have client SSL support settable through the JDBC string explicitly? HasSslSupport *bool `json:"has_ssl_support,omitempty"` }
type Dashboard ¶
type Dashboard struct { ContentFavoriteId string `json:"content_favorite_id,omitempty"` ContentMetadataId string `json:"content_metadata_id,omitempty"` Description string `json:"description,omitempty"` Hidden bool `json:"hidden,omitempty"` Id string `json:"id,omitempty"` Model *LookModel `json:"model,omitempty"` QueryTimezone string `json:"query_timezone,omitempty"` Readonly bool `json:"readonly,omitempty"` RefreshInterval string `json:"refresh_interval,omitempty"` RefreshIntervalToI int64 `json:"refresh_interval_to_i,omitempty"` Folder *Folder `json:"folder,omitempty"` Title string `json:"title,omitempty"` UserId string `json:"user_id,omitempty"` Slug string `json:"slug,omitempty"` PreferredViewer string `json:"preferred_viewer,omitempty"` }
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response // Error message Message string `json:"message"` // RequestID returned from the API, useful to contact support. DocsURL string `json:"docs"` // More specific error msg Errors []Error `json:"errors,omitempty"` }
An ErrorResponse reports the error caused by an API request
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type Folder ¶
type Folder struct { Name string `json:"name,omitempty"` ParentId string `json:"parent_id,omitempty"` Id string `json:"id,omitempty"` ContentMetadataId string `json:"content_metadata_id,omitempty"` CreatedAt string `json:"created_at,omitempty"` CreatorId string `json:"creator_id,omitempty"` ChildCount int64 `json:"child_count,omitempty"` ExternalId string `json:"external_id,omitempty"` IsEmbed bool `json:"is_embed,omitempty"` IsEmbedUsersRoot bool `json:"is_embed_users_root,omitempty"` IsPersonal bool `json:"is_personal,omitempty"` IsPersonalDescendant bool `json:"is_personal_descendant,omitempty"` IsUsersRoot bool `json:"is_users_root,omitempty"` }
type FoldersResource ¶
type FoldersResource interface { List(context.Context, *ListOptions) ([]Folder, *Response, error) ListByName(context.Context, string, *ListOptions) ([]Folder, *Response, error) Get(context.Context, string) (*Folder, *Response, error) //Get(context.Context,*ListOptions, string) ([]Folder, *Response, error) Create(context.Context, *Folder) (*Folder, *Response, error) Update(context.Context, string, *Folder) (*Folder, *Response, error) Delete(context.Context, string) (*Response, error) }
type FoldersResourceOp ¶
type FoldersResourceOp struct {
// contains filtered or unexported fields
}
func (*FoldersResourceOp) List ¶
func (s *FoldersResourceOp) List(ctx context.Context, opt *ListOptions) ([]Folder, *Response, error)
func (*FoldersResourceOp) ListByName ¶
func (s *FoldersResourceOp) ListByName(ctx context.Context, name string, opt *ListOptions) ([]Folder, *Response, error)
type GitBranch ¶
type GitBranch struct { // The short name on the local. Updating `name` results in `git checkout <new_name>` Name string `json:"name,omitempty"` // The name of the remote Remote string `json:"remote,omitempty"` // The short name on the remote RemoteName string `json:"remote_name,omitempty"` // Name of error Error string `json:"error,omitempty"` // Message describing an error if present Message string `json:"message,omitempty"` // Name of the owner of a personal branch OwnerName string `json:"owner_name,omitempty"` // Whether or not this branch is readonly Readonly *bool `json:"readonly,omitempty"` // Whether or not this branch is a personal branch - readonly for all developers except the owner Personal *bool `json:"personal,omitempty"` // Whether or not a local ref exists for the branch IsLocal *bool `json:"is_local,omitempty"` // Whether or not a remote ref exists for the branch IsRemote *bool `json:"is_remote,omitempty"` // Whether or not this is the production branch IsProduction *bool `json:"is_production,omitempty"` // Number of commits the local branch is ahead of the remote AheadCount int64 `json:"ahead_count,omitempty"` // Number of commits the local branch is behind the remote BehindCount int64 `json:"behind_count,omitempty"` // UNIX timestamp at which this branch was last committed. CommitAt int64 `json:"commit_at,omitempty"` // The resolved ref of this branch. Updating `ref` results in `git reset --hard <new_ref>“. Ref string `json:"ref,omitempty"` // The resolved ref of this branch remote. RemoteRef string `json:"remote_ref,omitempty"` }
GitBranch struct for GitBranch
type GitBranchRef ¶
GitBranchRef -
type Group ¶
type Group struct { CanAddToContentMetadata bool `json:"can_add_to_content_metadata,omitempty"` ExternalGroupId bool `json:"external_group_id,omitempty"` Id int `json:"id,string,omitempty"` Name string `json:"name"` UserCount int `json:"user_count,omitempty"` // ! not stringified ExternallyManaged bool `json:"externally_managed,omitempty"` IncludeByDefault bool `json:"include_by_default,omitempty"` ContainsCurrentUser bool `json:"contains_current_user,omitempty"` ParentGroupIds SliceStringInts `json:"parent_group_ids,omitempty"` RoleIds SliceStringInts `json:"role_ids,omitempty"` }
Group - Ref: https://developers.looker.com/api/explorer/4.0/types/Group/Group
type GroupsResource ¶
type GroupsResource interface { List(context.Context, *ListOptions) ([]Group, *Response, error) ListByName(context.Context, string, *ListOptions) ([]Group, *Response, error) ListById(context.Context, []int, *ListOptions) ([]Group, *Response, error) Get(context.Context, int) (*Group, *Response, error) Create(context.Context, *Group) (*Group, *Response, error) Update(context.Context, int, *Group) (*Group, *Response, error) Delete(context.Context, int) (*Response, error) ListMemberGroups(context.Context, int, *ListOptions) ([]Group, *Response, error) AddMemberGroup(context.Context, int, int) (*Group, *Response, error) RemoveMemberGroup(context.Context, int, int) (*Response, error) ListMemberUsers(context.Context, int, *ListOptions) ([]User, *Response, error) AddMemberUser(context.Context, int, int) (*User, *Response, error) RemoveMemberUser(context.Context, int, int) (*Response, error) }
GroupsResource is an interface for interfacing with the Group resource endpoints of the API. Ref: https://developers.looker.com/api/explorer/4.0/methods/Group
https://blob.b-cdn.net/looker_api4.0_ref-1652781627.html#operation/group
type GroupsResourceOp ¶
type GroupsResourceOp struct {
// contains filtered or unexported fields
}
GroupsResourceOp handles operations between Group related methods of the API.
func (*GroupsResourceOp) AddMemberGroup ¶
func (s *GroupsResourceOp) AddMemberGroup(ctx context.Context, parentID int, memberID int) (*Group, *Response, error)
AddMemberGroup -
func (*GroupsResourceOp) AddMemberUser ¶
func (s *GroupsResourceOp) AddMemberUser(ctx context.Context, parentID int, memberID int) (*User, *Response, error)
AddMemberUser -
func (*GroupsResourceOp) List ¶
func (s *GroupsResourceOp) List(ctx context.Context, opt *ListOptions) ([]Group, *Response, error)
List all groups
func (*GroupsResourceOp) ListById ¶
func (s *GroupsResourceOp) ListById(ctx context.Context, ids []int, opt *ListOptions) ([]Group, *Response, error)
func (*GroupsResourceOp) ListByName ¶
func (s *GroupsResourceOp) ListByName(ctx context.Context, name string, opt *ListOptions) ([]Group, *Response, error)
func (*GroupsResourceOp) ListMemberGroups ¶
func (s *GroupsResourceOp) ListMemberGroups(ctx context.Context, id int, opt *ListOptions) ([]Group, *Response, error)
ListMemberGroups gets all member groups inside a group.
func (*GroupsResourceOp) ListMemberUsers ¶
func (s *GroupsResourceOp) ListMemberUsers(ctx context.Context, id int, opt *ListOptions) ([]User, *Response, error)
ListMemberUsers gets all member groups inside a group.
func (*GroupsResourceOp) RemoveMemberGroup ¶
func (s *GroupsResourceOp) RemoveMemberGroup(ctx context.Context, parentID int, memberID int) (*Response, error)
RemoveMemberGroup -
func (*GroupsResourceOp) RemoveMemberUser ¶
func (s *GroupsResourceOp) RemoveMemberUser(ctx context.Context, parentID int, memberID int) (*Response, error)
RemoveMemberUser -
type ListOptions ¶
type ListOptions struct { // For paginated result sets, page of results to retrieve. Limit int `url:"limit,omitempty"` // For paginated result sets, the number of results to include per page. Offset int `url:"offset,omitempty"` }
ListOptions specifies the optional parameters to various List methods that support ~~pagination~~ limit/offset querystring.
type Look ¶
type Look struct { ContentMetadataId string `json:"content_metadata_id,omitempty"` Id string `json:"id,omitempty"` Title string `json:"title,omitempty"` UserId string `json:"user_id,omitempty"` ContentFavoriteId string `json:"content_favorite_id,omitempty"` CreatedAt string `json:"created_at,omitempty"` Deleted bool `json:"deleted,omitempty"` DeletedAt string `json:"deleted_at,omitempty"` Description string `json:"description,omitempty"` EmbededUrl string `json:"embeded_url,omitempty"` ExcelFileUrl string `json:"excel_file_url,omitempty"` FavoriteCount int64 `json:"favorite_count,omitempty"` GoogleSpreadsheetFormula string `json:"google_spreadsheet_formula,omitempty"` ImageEmbedUrl string `json:"image_embed_url,omitempty"` IsRunOnLoad bool `json:"is_run_on_load,omitempty"` LastAccessedAt string `json:"last_accessed_at,omitempty"` LastUpdaterId string `json:"last_updater_id,omitempty"` LastViewedAt string `json:"last_viewed_at,omitempty"` Model *LookModel `json:"model,omitempty"` Public bool `json:"public,omitempty"` PublicSlug string `json:"public_slug,omitempty"` PublicUrl string `json:"public_url,omitempty"` QueryId string `json:"query_id,omitempty"` ShortUrl string `json:"short_url,omitempty"` Folder *Folder `json:"folder,omitempty"` FolderId string `json:"folder_id,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` ViewCount int64 `json:"view_count,omitempty"` Dashboards *Dashboard `json:"dashboards,omitempty"` }
type LookMLModel ¶
type LookMLModel struct { Name string `json:"name,omitempty"` Project_name string `json:"project_name,omitempty"` Label string `json:"label,omitempty"` Allowed_db_connection_names []string `json:"allowed_db_connection_names,omitempty"` Unlimited_db_connections bool `json:"unlimited_db_connections,omitempty" ` }
type LookMlModelsResource ¶
type LookMlModelsResource interface { List(ctx context.Context) ([]LookMLModel, *Response, error) Get(ctx context.Context, LookMLModelName string) (*LookMLModel, *Response, error) Create(ctx context.Context, LookMLModel *LookMLModel) (*LookMLModel, *Response, error) Update(ctx context.Context, LookMLModelName string, LookMLModel *LookMLModel) (*LookMLModel, *Response, error) Delete(ctx context.Context, LookMLModelName string) (*Response, error) }
type LookMlModelsResourceOp ¶
type LookMlModelsResourceOp struct {
// contains filtered or unexported fields
}
func (LookMlModelsResourceOp) Create ¶
func (s LookMlModelsResourceOp) Create(ctx context.Context, requestLookMLModel *LookMLModel) (*LookMLModel, *Response, error)
func (LookMlModelsResourceOp) Get ¶
func (s LookMlModelsResourceOp) Get(ctx context.Context, LookMLModelName string) (*LookMLModel, *Response, error)
func (LookMlModelsResourceOp) List ¶
func (s LookMlModelsResourceOp) List(ctx context.Context) ([]LookMLModel, *Response, error)
func (LookMlModelsResourceOp) Update ¶
func (s LookMlModelsResourceOp) Update(ctx context.Context, LookMLModelName string, requestLookMLModel *LookMLModel) (*LookMLModel, *Response, error)
type ModelSetsResource ¶
type ModelSetsResource interface { List(ctx context.Context) ([]ModelSet, *Response, error) Get(ctx context.Context, modelSetId string) (*ModelSet, *Response, error) Create(ctx context.Context, modelSet *ModelSet) (*ModelSet, *Response, error) Update(ctx context.Context, modelSetId string, modelSet *ModelSet) (*ModelSet, *Response, error) Delete(ctx context.Context, modelSetId string) (*Response, error) }
type ModelSetsResourceOp ¶
type ModelSetsResourceOp struct {
// contains filtered or unexported fields
}
type NewGroupMemberGroup ¶
type NewGroupMemberGroup struct {
GroupID int `json:"group_id"`
}
type NewGroupMemberUser ¶
type NewGroupMemberUser struct {
UserID int `json:"user_id"`
}
type Permission ¶
type PermissionSet ¶
type PermissionSetSlice ¶
type PermissionSetSlice []PermissionSet
func (PermissionSetSlice) HasById ¶
func (items PermissionSetSlice) HasById(qId int) (has bool, set *PermissionSet)
func (PermissionSetSlice) HasByName ¶
func (items PermissionSetSlice) HasByName(qName string) (has bool, set *PermissionSet)
type Project ¶
type Project struct { // Project Id Id string `json:"id,omitempty"` // Project display name Name string `json:"name,omitempty"` // If true the project is configured with a git repository UsesGit *bool `json:"uses_git,omitempty"` // Git remote repository url GitRemoteUrl string `json:"git_remote_url,omitempty"` // Git username for HTTPS authentication. (For production only, if using user attributes.) GitUsername string `json:"git_username,omitempty"` // (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.) GitPassword string `json:"git_password,omitempty"` // Git production branch name. Defaults to master. Supported only in Looker 21.0 and higher. GitProductionBranchName string `json:"git_production_branch_name,omitempty"` // If true, the project uses a git cookie for authentication. UseGitCookieAuth *bool `json:"use_git_cookie_auth,omitempty"` // User attribute name for username in per-user HTTPS authentication. GitUsernameUserAttribute string `json:"git_username_user_attribute,omitempty"` // User attribute name for password in per-user HTTPS authentication. GitPasswordUserAttribute string `json:"git_password_user_attribute,omitempty"` // Name of the git service provider GitServiceName string `json:"git_service_name,omitempty"` // Port that HTTP(S) application server is running on (for PRs, file browsing, etc.) GitApplicationServerHttpPort int64 `json:"git_application_server_http_port,omitempty"` // Scheme that is running on application server (for PRs, file browsing, etc.) GitApplicationServerHttpScheme string `json:"git_application_server_http_scheme,omitempty"` // (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated. DeploySecret string `json:"deploy_secret,omitempty"` // (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint. UnsetDeploySecret *bool `json:"unset_deploy_secret,omitempty"` // The git pull request policy for this project. Valid values are: \"off\", \"links\", \"recommended\", \"required\". PullRequestMode string `json:"pull_request_mode,omitempty"` // Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository ValidationRequired *bool `json:"validation_required,omitempty"` // If true, advanced git release management is enabled for this project GitReleaseMgmtEnabled *bool `json:"git_release_mgmt_enabled,omitempty"` // Validation policy: If true, the project can be committed with warnings when `validation_required` is true. (`allow_warnings` does nothing if `validation_required` is false). AllowWarnings *bool `json:"allow_warnings,omitempty"` // If true the project is an example project and cannot be modified IsExample *bool `json:"is_example,omitempty"` // Status of dependencies in your manifest & lockfile DependencyStatus string `json:"dependency_status,omitempty"` }
Project struct for Project
type ProjectsResource ¶
type ProjectsResource interface { Get(ctx context.Context, projectName string) (*Project, *Response, error) // !!! NOT rest compliant !!! // name is required. git_remote_url is not allowed. // To configure Git for the newly created project, follow the instructions in update_project. Create(ctx context.Context, proj *Project) (*Project, *Response, error) Update(ctx context.Context, projectName string, proj *Project) (*Project, *Response, error) Delete(ctx context.Context, projectName string) (*Response, error) AllowWarnings(ctx context.Context, projectName string, value bool) (*Response, error) DeleteGitRepo(ctx context.Context, projectName string) (*Response, error) GitBranchesList(ctx context.Context, projectName string, opt *ListOptions) ([]GitBranch, *Response, error) GitBranchActiveGet(ctx context.Context, projectName string) (*GitBranch, *Response, error) GitBranchCheckout(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error) GitBranchUpdate(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error) GitBranchListByName(ctx context.Context, projectName string, branchName string) (*GitBranch, *Response, error) GitBranchDelete(ctx context.Context, projectName string, branchName string) (*Response, error) GitBranchDeployToProduction(ctx context.Context, projectName string, branch string) (*string, *Response, error) GitRefDeployToProduction(ctx context.Context, projectName string, ref string) (*string, *Response, error) DeployToProduction(ctx context.Context, projectName string) (*string, *Response, error) GitDeployKeyGet(ctx context.Context, projectName string) (*string, *Response, error) GitDeployKeyCreate(ctx context.Context, projectName string) (*string, *Response, error) }
type ProjectsResourceOp ¶
type ProjectsResourceOp struct {
// contains filtered or unexported fields
}
func (*ProjectsResourceOp) AllowWarnings ¶
func (*ProjectsResourceOp) Create ¶
func (s *ProjectsResourceOp) Create(ctx context.Context, proj *Project) (*Project, *Response, error)
Create Project
Create A Project ¶
dev mode required.
Call update_session to select the 'dev' workspace. name is required. git_remote_url is not allowed. To configure Git for the newly created project, follow the instructions in update_project.
func (*ProjectsResourceOp) DeleteGitRepo ¶
func (*ProjectsResourceOp) DeployToProduction ¶
func (*ProjectsResourceOp) GitBranchActiveGet ¶
func (*ProjectsResourceOp) GitBranchCheckout ¶
func (s *ProjectsResourceOp) GitBranchCheckout(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)
func (*ProjectsResourceOp) GitBranchDelete ¶
func (*ProjectsResourceOp) GitBranchDeployToProduction ¶
func (*ProjectsResourceOp) GitBranchListByName ¶
func (*ProjectsResourceOp) GitBranchUpdate ¶
func (s *ProjectsResourceOp) GitBranchUpdate(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)
func (*ProjectsResourceOp) GitBranchesList ¶
func (s *ProjectsResourceOp) GitBranchesList(ctx context.Context, projectName string, opt *ListOptions) ([]GitBranch, *Response, error)
func (*ProjectsResourceOp) GitDeployKeyCreate ¶
func (*ProjectsResourceOp) GitDeployKeyGet ¶
func (*ProjectsResourceOp) GitRefDeployToProduction ¶
func (*ProjectsResourceOp) Update ¶
func (s *ProjectsResourceOp) Update(ctx context.Context, projectName string, proj *Project) (*Project, *Response, error)
Update Project
Update Project Configuration ¶
Apply changes to a project's configuration.
Configuring Git for a Project ¶
To set up a Looker project with a remote git repository, follow these steps:
Call update_session to select the 'dev' workspace. Call create_git_deploy_key to create a new deploy key for the project Copy the deploy key text into the remote git repository's ssh key configuration Call update_project to set project's git_remote_url ()and git_service_name, if necessary). When you modify a project's git_remote_url, Looker connects to the remote repository to fetch metadata. The remote git repository MUST be configured with the Looker-generated deploy key for this project prior to setting the project's git_remote_url.
To set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo):
Call update_session to select the 'dev' workspace. Call update_project setting git_remote_url to null and git_service_name to "bare".
type Rate ¶
type Rate struct { // The number of request per hour the client is currently limited to. Limit int `json:"limit"` // The number of remaining requests the client can make this hour. Remaining int `json:"remaining"` // The time at which the current rate limit will reset. Reset Timestamp `json:"reset"` }
Rate contains the rate limit for the current client.
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function
type Response ¶
Response is an API response. This wraps the standard http.Response returned from the API.
type Role ¶
type Role struct { Id int `json:"id,string,omitempty"` Name string `json:"name,omitempty"` PermissionSet PermissionSet `json:"permission_set,omitempty"` PermissionSetID string `json:"permission_set_id,omitempty"` ModelSet ModelSet `json:"model_set,omitempty"` ModelSetID string `json:"model_set_id,omitempty"` }
type RolesResource ¶
type RolesResource interface { PermissionSetsList(context.Context, *ListOptions) (PermissionSetSlice, *Response, error) PermissionSetListById(context.Context, []int, *ListOptions) ([]PermissionSet, *Response, error) PermissionSetListByName(context.Context, string, *ListOptions) ([]PermissionSet, *Response, error) PermissionSetGet(context.Context, int) (*PermissionSet, *Response, error) List(context.Context, *ListOptions) ([]Role, *Response, error) Get(context.Context, int) (*Role, *Response, error) Create(context.Context, *Role) (*Role, *Response, error) Update(context.Context, int, *Role) (*Role, *Response, error) Delete(context.Context, int) (*Response, error) RoleGroupsList(context.Context, int, *ListOptions) ([]Group, *Response, error) RoleGroupsSet(context.Context, int, []string) ([]Group, *Response, error) RoleUsersList(context.Context, int, *ListOptions) ([]User, *Response, error) RoleUsersSet(context.Context, int, []string) ([]User, *Response, error) }
RolesResource is an interface for interfacing with the Role resource endpoints of the API. Ref: https://developers.looker.com/api/explorer/4.0/methods/Role
type RolesResourceOp ¶
type RolesResourceOp struct {
// contains filtered or unexported fields
}
RolesResourceOp handles operations between Role related methods of the API.
func (*RolesResourceOp) List ¶
func (s *RolesResourceOp) List(ctx context.Context, opt *ListOptions) ([]Role, *Response, error)
List -
func (*RolesResourceOp) PermissionSetGet ¶
func (s *RolesResourceOp) PermissionSetGet(ctx context.Context, id int) (*PermissionSet, *Response, error)
func (*RolesResourceOp) PermissionSetListById ¶
func (s *RolesResourceOp) PermissionSetListById(ctx context.Context, ids []int, opt *ListOptions) ([]PermissionSet, *Response, error)
func (*RolesResourceOp) PermissionSetListByName ¶
func (s *RolesResourceOp) PermissionSetListByName(ctx context.Context, name string, opt *ListOptions) ([]PermissionSet, *Response, error)
func (*RolesResourceOp) PermissionSetsList ¶
func (s *RolesResourceOp) PermissionSetsList(ctx context.Context, opt *ListOptions) (PermissionSetSlice, *Response, error)
PermissionSetsList -
func (*RolesResourceOp) RoleGroupsList ¶
func (s *RolesResourceOp) RoleGroupsList(ctx context.Context, id int, opt *ListOptions) ([]Group, *Response, error)
RoleGroupsList -
func (*RolesResourceOp) RoleGroupsSet ¶
func (s *RolesResourceOp) RoleGroupsSet(ctx context.Context, id int, groupIds []string) ([]Group, *Response, error)
RoleGroupsSet -
func (*RolesResourceOp) RoleUsersList ¶
func (s *RolesResourceOp) RoleUsersList(ctx context.Context, id int, opt *ListOptions) ([]User, *Response, error)
RoleUsersList -
func (*RolesResourceOp) RoleUsersSet ¶
func (s *RolesResourceOp) RoleUsersSet(ctx context.Context, id int, userIds []string) ([]User, *Response, error)
RoleUsersSet -
type SessionsResource ¶
type SessionsResource interface { Get(ctx context.Context) (*Session, *Response, error) SetWorkspaceId(ctx context.Context, workspaceId string) (*Session, *Response, error) GetCurrentUser(ctx context.Context) (*User, *Response, error) GetLoginUserToken(ctx context.Context, userId string) (*oauth2.Token, *Response, error) }
type SessionsResourceOp ¶
type SessionsResourceOp struct {
// contains filtered or unexported fields
}
func (*SessionsResourceOp) GetCurrentUser ¶
GetCurrentUser -
func (*SessionsResourceOp) GetLoginUserToken ¶
func (s *SessionsResourceOp) GetLoginUserToken(ctx context.Context, userId string) (*oauth2.Token, *Response, error)
GetLoginUserToken -
func (*SessionsResourceOp) SetWorkspaceId ¶
func (s *SessionsResourceOp) SetWorkspaceId(ctx context.Context, workspaceId string) (session *Session, resp *Response, err error)
SetWorkspaceId -
type SliceStringInts ¶
type SliceStringInts []int
SliceStringInts is an intermediate/shim type to make the json result return stringified integers, while being able to use correct integer types internally.
func FromSliceOfStrings ¶
func FromSliceOfStrings(s []string) SliceStringInts
func (*SliceStringInts) MarshalJSON ¶
func (c *SliceStringInts) MarshalJSON() ([]byte, error)
func (*SliceStringInts) ToSliceOfStrings ¶
func (c *SliceStringInts) ToSliceOfStrings() []string
func (*SliceStringInts) UnmarshalJSON ¶
func (c *SliceStringInts) UnmarshalJSON(b []byte) error
type Timestamp ¶
Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or Unix timestamp. All exported methods of time.Time can be called on Timestamp.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.
type User ¶
type User struct { Id int `json:"id,string,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` CredentialEmail *CredentialEmail `json:"credentials_email,omitempty" ` CredentialSaml *CredentialSaml `json:"credentials_saml,omitempty"` DisplayName string `json:"display_name,omitempty"` RoleIds SliceStringInts `json:"role_ids,omitempty"` Email string `json:"email,omitempty"` }
User defines a user in the database Ref: https://github.com/looker-open-source/sdk-codegen/blob/main/go/sdk/v4/models.go#L3508
type UsersResource ¶
type UsersResource interface { List(context.Context, *ListOptions) ([]User, *Response, error) ListById(context.Context, []int, *ListOptions) ([]User, *Response, error) ListByEmail(context.Context, string, *ListOptions) ([]User, *Response, error) Get(context.Context, int) (*User, *Response, error) Create(context.Context, *User) (*User, *Response, error) Update(context.Context, int, *User) (*User, *Response, error) Delete(context.Context, int) (*Response, error) CreateEmail(context.Context, int, *CredentialEmail) (*CredentialEmail, *Response, error) GetEmail(context.Context, int) (*CredentialEmail, *Response, error) UpdateEmail(context.Context, int, *CredentialEmail) (*CredentialEmail, *Response, error) DeleteEmail(context.Context, int) (*Response, error) CreatePasswordReset(context.Context, int) (*CredentialEmail, *Response, error) SendPasswordReset(context.Context, int) (*CredentialEmail, *Response, error) GetRoles(context.Context, int) ([]Role, *Response, error) SetRoles(context.Context, int, []string) ([]Role, *Response, error) }
UsersResource is an interface for interfacing with the User resource endpoints of the API. Ref: https://developers.looker.com/api/explorer/4.0/methods/User
type UsersResourceOp ¶
type UsersResourceOp struct {
// contains filtered or unexported fields
}
UsersResourceOp handles operations between User related methods of the API.
func (*UsersResourceOp) CreateEmail ¶
func (s *UsersResourceOp) CreateEmail(ctx context.Context, id int, createReq *CredentialEmail) (*CredentialEmail, *Response, error)
CreateEmail -
func (*UsersResourceOp) CreatePasswordReset ¶
func (s *UsersResourceOp) CreatePasswordReset(ctx context.Context, id int) (*CredentialEmail, *Response, error)
CreatePasswordReset -
func (*UsersResourceOp) DeleteEmail ¶
DeleteEmail -
func (*UsersResourceOp) GetEmail ¶
func (s *UsersResourceOp) GetEmail(ctx context.Context, id int) (*CredentialEmail, *Response, error)
GetEmail -
func (*UsersResourceOp) List ¶
func (s *UsersResourceOp) List(ctx context.Context, opt *ListOptions) ([]User, *Response, error)
List all users
func (*UsersResourceOp) ListByEmail ¶
func (s *UsersResourceOp) ListByEmail(ctx context.Context, email string, opt *ListOptions) ([]User, *Response, error)
func (*UsersResourceOp) ListById ¶
func (s *UsersResourceOp) ListById(ctx context.Context, ids []int, opt *ListOptions) ([]User, *Response, error)
func (*UsersResourceOp) SendPasswordReset ¶
func (s *UsersResourceOp) SendPasswordReset(ctx context.Context, id int) (*CredentialEmail, *Response, error)
SendPasswordReset -
func (*UsersResourceOp) SetRoles ¶
func (s *UsersResourceOp) SetRoles(ctx context.Context, id int, roleIds []string) ([]Role, *Response, error)
SetRoles -
func (*UsersResourceOp) Update ¶
func (s *UsersResourceOp) Update(ctx context.Context, id int, updateReq *User) (*User, *Response, error)
Update -
func (*UsersResourceOp) UpdateEmail ¶
func (s *UsersResourceOp) UpdateEmail(ctx context.Context, id int, updateReq *CredentialEmail) (*CredentialEmail, *Response, error)
UpdateEmail -
type WorkspacesResource ¶
type WorkspacesResource interface { }
type WorkspacesResourceOp ¶
type WorkspacesResourceOp struct {
// contains filtered or unexported fields
}