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 Alert
- type AlertAppliedDashboardFilter
- type AlertConditionState
- type AlertDestination
- type AlertField
- type AlertFieldFilter
- type AlertsResource
- type AlertsResourceOp
- func (s *AlertsResourceOp) Create(ctx context.Context, requestAlert *Alert) (*Alert, *Response, error)
- func (s *AlertsResourceOp) Delete(ctx context.Context, AlertId string) (*Response, error)
- func (s *AlertsResourceOp) Get(ctx context.Context, AlertId string) (*Alert, *Response, error)
- func (s *AlertsResourceOp) Update(ctx context.Context, AlertId string, requestAlert *Alert) (*Alert, *Response, error)
- 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 ColorCollection
- type ColorCollectionResource
- type ColorCollectionResourceOp
- func (s *ColorCollectionResourceOp) Create(ctx context.Context, requestColorCollection *WriteColorCollection) (*ColorCollection, *Response, error)
- func (s *ColorCollectionResourceOp) Delete(ctx context.Context, ColorCollectionId string) (*Response, error)
- func (s *ColorCollectionResourceOp) Get(ctx context.Context, ColorCollectionId string) (*ColorCollection, *Response, error)
- func (s *ColorCollectionResourceOp) List(ctx context.Context, opt *ListOptions) ([]ColorCollection, *Response, error)
- func (s *ColorCollectionResourceOp) Update(ctx context.Context, ColorCollectionId string, ...) (*ColorCollection, *Response, error)
- type ColorStop
- type ComparisonType
- 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 ContinuousPalette
- type CredentialsEmail
- type CredentialsEmbed
- type CredentialsSaml
- type DBConnection
- type DBConnectionOverride
- type DBConnectionValidation
- type DBDialect
- type Dashboard
- type DashboardBase
- type DestinationType
- type DiscretePalette
- type EgressIpAddresses
- type Error
- type ErrorResponse
- type Folder
- type FolderBase
- 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 InvestigativeContentType
- type ListOptions
- 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 LookWithDashboards
- type LookmlModelNavExplore
- 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 PermissionSetResource
- type PermissionSetResourceOp
- func (s *PermissionSetResourceOp) Create(ctx context.Context, permissionSet *PermissionSet) (*PermissionSet, *Response, error)
- func (s *PermissionSetResourceOp) Delete(ctx context.Context, PermissionSetId string) (*Response, error)
- func (s *PermissionSetResourceOp) Get(ctx context.Context, PermissionSetId string) (*PermissionSet, *Response, error)
- func (s *PermissionSetResourceOp) GetByName(ctx context.Context, PermissionSetName string, opt *ListOptions) ([]PermissionSet, *Response, error)
- func (s *PermissionSetResourceOp) List(ctx context.Context, opt *ListOptions) ([]PermissionSet, *Response, error)
- func (s *PermissionSetResourceOp) Update(ctx context.Context, PermissionSetId string, permissionSet *PermissionSet) (*PermissionSet, *Response, error)
- 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 PublicEgressIpsResource
- type PublicEgressIpsResourceOp
- type PullRequestMode
- 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) ListByName(ctx context.Context, name string, opt *ListOptions) ([]Role, *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 Theme
- type ThemeSettings
- type ThemesResource
- type ThemesResourceOp
- func (s *ThemesResourceOp) Create(ctx context.Context, requestTheme *Theme) (*Theme, *Response, error)
- func (s *ThemesResourceOp) Delete(ctx context.Context, ThemeId string) (*Response, error)
- func (s *ThemesResourceOp) Get(ctx context.Context, ThemeId string) (*Theme, *Response, error)
- func (s *ThemesResourceOp) Update(ctx context.Context, ThemeId string, requestTheme *Theme) (*Theme, *Response, error)
- type Timestamp
- type User
- type UserAttribute
- type UserAttributeGroupValue
- type UserAttributesResource
- type UserAttributesResourceOp
- func (s *UserAttributesResourceOp) Create(ctx context.Context, requestUserAttribute *UserAttribute) (*UserAttribute, *Response, error)
- func (s *UserAttributesResourceOp) Delete(ctx context.Context, UserAttributeId string) (*Response, error)
- func (s *UserAttributesResourceOp) Get(ctx context.Context, UserAttributeId int) (*UserAttribute, *Response, error)
- func (s *UserAttributesResourceOp) GetUserAttributeValue(ctx context.Context, UserAttributeId string) (*[]UserAttributeGroupValue, *Response, error)
- func (s *UserAttributesResourceOp) SetUserAttributeValue(ctx context.Context, userAtt []UserAttributeGroupValue, attributeId string) (*[]UserAttributeGroupValue, *Response, error)
- func (s *UserAttributesResourceOp) Update(ctx context.Context, UserAttributeId string, ...) (*UserAttribute, *Response, error)
- type UsersResource
- type UsersResourceOp
- func (s *UsersResourceOp) Create(ctx context.Context, createReq *User) (*User, *Response, error)
- func (s *UsersResourceOp) CreateEmail(ctx context.Context, id string, createReq *CredentialsEmail) (*CredentialsEmail, *Response, error)
- func (s *UsersResourceOp) CreatePasswordReset(ctx context.Context, id string) (*CredentialsEmail, *Response, error)
- func (s *UsersResourceOp) Delete(ctx context.Context, id string) (*Response, error)
- func (s *UsersResourceOp) DeleteEmail(ctx context.Context, id string) (*Response, error)
- func (s *UsersResourceOp) Get(ctx context.Context, id string) (*User, *Response, error)
- func (s *UsersResourceOp) GetEmail(ctx context.Context, id string) (*CredentialsEmail, *Response, error)
- func (s *UsersResourceOp) GetRoles(ctx context.Context, id string) ([]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 []string, opt *ListOptions) ([]User, *Response, error)
- func (s *UsersResourceOp) SendPasswordReset(ctx context.Context, id string) (*CredentialsEmail, *Response, error)
- func (s *UsersResourceOp) SetRoles(ctx context.Context, id string, roleIds []string) ([]Role, *Response, error)
- func (s *UsersResourceOp) Update(ctx context.Context, id string, updateReq *User) (*User, *Response, error)
- func (s *UsersResourceOp) UpdateEmail(ctx context.Context, id string, updateReq *CredentialsEmail) (*CredentialsEmail, *Response, error)
- type WorkspacesResource
- type WorkspacesResourceOp
- type WriteColorCollection
Constants ¶
const AlertsBasePath = "4.0/alerts"
const ColorCollectionBasePath = "4.0/color_collections"
const FoldersBasePath = "4.0/folders"
const ThemesBasePath = "4.0/themes"
const UserAttributesBasePath = "4.0/user_attributes"
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 Alert ¶ added in v0.2.10
type Alert struct { AppliedDashboardFilters *[]AlertAppliedDashboardFilter `json:"applied_dashboard_filters,omitempty"` // Filters coming from the dashboard that are applied. Example `[{ "filter_title": "Name", "field_name": "distribution_centers.name", "filter_value": "Los Angeles CA" }]` ComparisonType ComparisonType `json:"comparison_type"` // This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://cloud.google.com/looker/docs/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY". Cron string `json:"cron"` // Vixie-Style crontab specification when to run. At minumum, it has to be longer than 15 minute intervals CustomUrlBase *string `json:"custom_url_base,omitempty"` // Domain for the custom url selected by the alert creator from the admin defined domain allowlist CustomUrlParams *string `json:"custom_url_params,omitempty"` // Parameters and path for the custom url defined by the alert creator CustomUrlLabel *string `json:"custom_url_label,omitempty"` // Label for the custom url defined by the alert creator ShowCustomUrl *bool `json:"show_custom_url,omitempty"` // Boolean to determine if the custom url should be used CustomTitle *string `json:"custom_title,omitempty"` // An optional, user-defined title for the alert DashboardElementId *string `json:"dashboard_element_id,omitempty"` // ID of the dashboard element associated with the alert. Refer to [dashboard_element()](#!/Dashboard/DashboardElement) Description *string `json:"description,omitempty"` // An optional description for the alert. This supplements the title Destinations []AlertDestination `json:"destinations"` // Array of destinations to send alerts to. Must be the same type of destination. Example `[{ "destination_type": "EMAIL", "email_address": "test@test.com" }]` Field AlertField `json:"field"` Followed *bool `json:"followed,omitempty"` // Whether or not the user follows this alert. Followable *bool `json:"followable,omitempty"` // Whether or not the alert is followable Id *string `json:"id,omitempty"` // ID of the alert IsDisabled *bool `json:"is_disabled,omitempty"` // Whether or not the alert is disabled DisabledReason *string `json:"disabled_reason,omitempty"` // Reason for disabling alert IsPublic *bool `json:"is_public,omitempty"` // Whether or not the alert is public InvestigativeContentType *InvestigativeContentType `json:"investigative_content_type,omitempty"` // The type of the investigative content Valid values are: "dashboard". InvestigativeContentId *string `json:"investigative_content_id,omitempty"` // The ID of the investigative content. For dashboards, this will be the dashboard ID InvestigativeContentTitle *string `json:"investigative_content_title,omitempty"` // The title of the investigative content. LookmlDashboardId *string `json:"lookml_dashboard_id,omitempty"` // ID of the LookML dashboard associated with the alert LookmlLinkId *string `json:"lookml_link_id,omitempty"` // ID of the LookML dashboard element associated with the alert OwnerId string `json:"owner_id"` // User id of alert owner OwnerDisplayName *string `json:"owner_display_name,omitempty"` // Alert owner's display name Threshold float64 `json:"threshold"` // Value of the alert threshold TimeSeriesConditionState *AlertConditionState `json:"time_series_condition_state,omitempty"` }
type AlertAppliedDashboardFilter ¶ added in v0.2.10
type AlertAppliedDashboardFilter struct { FilterTitle string `json:"filter_title"` // Field Title. Refer to `DashboardFilter.title` in [DashboardFilter](#!/types/DashboardFilter). Example `Name` FieldName string `json:"field_name"` // Field Name. Refer to `DashboardFilter.dimension` in [DashboardFilter](#!/types/DashboardFilter). Example `distribution_centers.name` FilterValue string `json:"filter_value"` // Field Value. [Filter Expressions](https://cloud.google.com/looker/docs/reference/filter-expressions). Example `Los Angeles CA` FilterDescription *string `json:"filter_description,omitempty"` // Human Readable Filter Description. This may be null or auto-generated. Example `is Los Angeles CA` }
type AlertConditionState ¶ added in v0.2.10
type AlertDestination ¶ added in v0.2.10
type AlertDestination struct { DestinationType DestinationType `json:"destination_type"` // Type of destination that the alert will be sent to Valid values are: "EMAIL", "ACTION_HUB". EmailAddress *string `json:"email_address,omitempty"` // Email address for the 'email' type ActionHubIntegrationId *string `json:"action_hub_integration_id,omitempty"` // Action hub integration id for the 'action_hub' type. [Integration](#!/types/Integration) ActionHubFormParamsJson *string `json:"action_hub_form_params_json,omitempty"` // Action hub form params json for the 'action_hub' type [IntegrationParam](#!/types/IntegrationParam) }
type AlertField ¶ added in v0.2.10
type AlertField struct { Title string `json:"title"` // Field's title. Usually auto-generated to reflect field name and its filters Name string `json:"name"` // Field's name. Has the format `<view>.<field>` Refer to [docs](https://cloud.google.com/looker/docs/sharing-and-publishing/creating-alerts) for more details Filter *[]AlertFieldFilter `json:"filter,omitempty"` // (Optional / Advance Use) List of fields filter. This further restricts the alert to certain dashboard element's field values. This can be used on top of dashboard filters `applied_dashboard_filters`. To keep thing simple, it's suggested to just use dashboard filters. Example: `{ 'title': '12 Number on Hand', 'name': 'inventory_items.number_on_hand', 'filter': [{ 'field_name': 'inventory_items.id', 'field_value': 12, 'filter_value': null }] }` }
type AlertFieldFilter ¶ added in v0.2.10
type AlertFieldFilter struct { FieldName string `json:"field_name"` // Field Name. Has format `<view>.<field>` FieldValue string `json:"field_value"` // Field Value. Depends on the type of field - numeric or string. For [location](https://cloud.google.com/looker/docs/reference/field-reference/dimension-type-reference#location) type, it's a list of floats. Example `[1.0, 56.0]` FilterValue *string `json:"filter_value,omitempty"` // Filter Value. Usually null except for [location](https://cloud.google.com/looker/docs/reference/field-reference/dimension-type-reference#location) type. It'll be a string of lat,long ie `'1.0,56.0'` }
type AlertsResource ¶ added in v0.2.10
type AlertsResource interface { //List(context.Context, *ListOptions) ([]Alert, *Response, error) Get(context.Context, string) (*Alert, *Response, error) //Get(context.Context,*ListOptions, string) ([]Alert, *Response, error) Create(context.Context, *Alert) (*Alert, *Response, error) Update(context.Context, string, *Alert) (*Alert, *Response, error) Delete(context.Context, string) (*Response, error) }
type AlertsResourceOp ¶ added in v0.2.10
type AlertsResourceOp struct {
// contains filtered or unexported fields
}
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 ColorCollection ColorCollectionResource PermissionSets PermissionSetResource Alerts AlertsResource UserAttributes UserAttributesResource EgressIpAddresses PublicEgressIpsResource Themes ThemesResource // 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 ColorCollection ¶ added in v0.2.0
type ColorCollection struct { Id *string `json:"id,omitempty"` // Unique Id Label *string `json:"label,omitempty"` // Label of color collection CategoricalPalettes *[]DiscretePalette `json:"categoricalPalettes,omitempty"` // Array of categorical palette definitions SequentialPalettes *[]ContinuousPalette `json:"sequentialPalettes,omitempty"` // Array of discrete palette definitions DivergingPalettes *[]ContinuousPalette `json:"divergingPalettes,omitempty"` // Array of diverging palette definitions }
https://developers.looker.com/api/explorer/4.0/types/ColorCollection/ColorCollection
type ColorCollectionResource ¶ added in v0.2.0
type ColorCollectionResource interface { List(context.Context, *ListOptions) ([]ColorCollection, *Response, error) Get(context.Context, string) (*ColorCollection, *Response, error) Create(context.Context, *WriteColorCollection) (*ColorCollection, *Response, error) Update(context.Context, string, *WriteColorCollection) (*ColorCollection, *Response, error) Delete(context.Context, string) (*Response, error) }
type ColorCollectionResourceOp ¶ added in v0.2.0
type ColorCollectionResourceOp struct {
// contains filtered or unexported fields
}
func (*ColorCollectionResourceOp) Create ¶ added in v0.2.0
func (s *ColorCollectionResourceOp) Create(ctx context.Context, requestColorCollection *WriteColorCollection) (*ColorCollection, *Response, error)
func (*ColorCollectionResourceOp) Get ¶ added in v0.2.0
func (s *ColorCollectionResourceOp) Get(ctx context.Context, ColorCollectionId string) (*ColorCollection, *Response, error)
func (*ColorCollectionResourceOp) List ¶ added in v0.2.0
func (s *ColorCollectionResourceOp) List(ctx context.Context, opt *ListOptions) ([]ColorCollection, *Response, error)
func (*ColorCollectionResourceOp) Update ¶ added in v0.2.0
func (s *ColorCollectionResourceOp) Update(ctx context.Context, ColorCollectionId string, requestColorCollection *WriteColorCollection) (*ColorCollection, *Response, error)
type ColorStop ¶ added in v0.2.0
type ColorStop struct { Color *string `json:"color,omitempty"` // CSS color string Offset *int `json:"offset,omitempty"` // Offset in continuous palette (0 to 100) }
https://developers.looker.com/api/explorer/4.0/types/ColorCollection/ColorStop
type ComparisonType ¶ added in v0.2.10
type ComparisonType string
const ( ComparisonType_EQUAL_TO ComparisonType = "EQUAL_TO" ComparisonType_GREATER_THAN ComparisonType = "GREATER_THAN" ComparisonType_GREATER_THAN_OR_EQUAL_TO ComparisonType = "GREATER_THAN_OR_EQUAL_TO" ComparisonType_LESS_THAN ComparisonType = "LESS_THAN" ComparisonType_LESS_THAN_OR_EQUAL_TO ComparisonType = "LESS_THAN_OR_EQUAL_TO" ComparisonType_INCREASES_BY ComparisonType = "INCREASES_BY" ComparisonType_DECREASES_BY ComparisonType = "DECREASES_BY" ComparisonType_CHANGES_BY ComparisonType = "CHANGES_BY" )
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 ContinuousPalette ¶ added in v0.2.0
type ContinuousPalette struct { Id *string `json:"id,omitempty"` // Unique identity string Label *string `json:"label,omitempty"` // Label for palette Type *string `json:"type,omitempty"` // Type of palette Stops *[]ColorStop `json:"stops,omitempty"` // Array of ColorStops in the palette }
https://developers.looker.com/api/explorer/4.0/types/ColorCollection/ContinuousPalette
type CredentialsEmail ¶ added in v0.1.2
type CredentialsEmail struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object CreatedAt string `json:"created_at,omitempty"` // Timestamp for the creation of this credential Email string `json:"email"` // EMail address used for user login ForcedPasswordResetAtNextLogin bool `json:"forced_password_reset_at_next_login,omitempty"` // Force the user to change their password upon their next login IsDisabled bool `json:"is_disabled,omitempty"` // Has this credential been disabled? LoggedInAt string `json:"logged_in_at,omitempty"` // Timestamp for most recent login using credential PasswordResetUrl string `json:"password_reset_url,omitempty"` // Url with one-time use secret token that the user can use to reset password Type string `json:"type,omitempty"` // Short name for the type of this kind of credential Url string `json:"url,omitempty"` // Link to get this item UserUrl string `json:"user_url,omitempty"` // Link to get this user }
CredentialsEmail -
type CredentialsEmbed ¶ added in v0.1.2
type CredentialsEmbed struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object CreatedAt string `json:"created_at,omitempty"` // Timestamp for the creation of this credential ExternalGroupId string `json:"external_group_id,omitempty"` // Embedder's id for a group to which this user was added during the most recent login ExternalUserId string `json:"external_user_id,omitempty"` // Embedder's unique id for the user Id string `json:"id,omitempty"` // Unique Id IsDisabled bool `json:"is_disabled,omitempty"` // Has this credential been disabled? LoggedInAt string `json:"logged_in_at,omitempty"` // Timestamp for most recent login using credential Type string `json:"type,omitempty"` // Short name for the type of this kind of credential Url string `json:"url,omitempty"` // Link to get this item }
type CredentialsSaml ¶ added in v0.1.2
type CredentialsSaml struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object CreatedAt string `json:"created_at,omitempty"` // Timestamp for the creation of this credential Email string `json:"email,omitempty"` // EMail address IsDisabled bool `json:"is_disabled,omitempty"` // Has this credential been disabled? LoggedInAt string `json:"logged_in_at,omitempty"` // Timestamp for most recent login using credential SamlUserId string `json:"saml_user_id,omitempty"` // Saml IdP's Unique ID for this user Type string `json:"type,omitempty"` // Short name for the type of this kind of credential Url string `json:"url,omitempty"` // Link to get this item }
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"` // PdtContextOverride *DBConnectionOverride `json:"pdt_context_override,omitempty"` }
<editor-fold desc="type_structs"> DBConnection struct for DBConnection
type DBConnectionOverride ¶ added in v0.4.0
type DBConnectionOverride struct { Context *string `json:"context,omitempty"` // Context in which to override (`pdt` is the only allowed value) Host *string `json:"host,omitempty"` // Host name/address of server Port *string `json:"port,omitempty"` // Port number on server Username *string `json:"username,omitempty"` // Username for server authentication Password *string `json:"password,omitempty"` // (Write-Only) Password for server authentication HasPassword *bool `json:"has_password,omitempty"` // Whether or not the password is overridden in this context Certificate *string `json:"certificate,omitempty"` // (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). FileType *string `json:"file_type,omitempty"` // (Write-Only) Certificate keyfile type - .json or .p12 Database *string `json:"database,omitempty"` // Database name Schema *string `json:"schema,omitempty"` // Schema name JdbcAdditionalParams *string `json:"jdbc_additional_params,omitempty"` // Additional params to add to JDBC connection string AfterConnectStatements *string `json:"after_connect_statements,omitempty"` // SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature }
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 DashboardBase ¶ added in v0.1.2
type DashboardBase struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object ContentFavoriteId string `json:"content_favorite_id,omitempty"` // Content Favorite Id ContentMetadataId string `json:"content_metadata_id,omitempty"` // Id of content metadata Description string `json:"description,omitempty"` // Description Hidden bool `json:"hidden,omitempty"` // Is Hidden Id string `json:"id,omitempty"` // Unique Id Model *LookModel `json:"model,omitempty"` QueryTimezone string `json:"query_timezone,omitempty"` // Timezone in which the Dashboard will run by default. Readonly bool `json:"readonly,omitempty"` // Is Read-only RefreshInterval string `json:"refresh_interval,omitempty"` // Refresh Interval, as a time duration phrase like "2 hours 30 minutes". A number with no time units will be interpreted as whole seconds. RefreshIntervalToI int64 `json:"refresh_interval_to_i,omitempty"` // Refresh Interval in milliseconds Folder *FolderBase `json:"folder,omitempty"` Title string `json:"title,omitempty"` // Dashboard Title UserId string `json:"user_id,omitempty"` // Id of User Slug string `json:"slug,omitempty"` // Content Metadata Slug PreferredViewer string `json:"preferred_viewer,omitempty"` // The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) }
type DestinationType ¶ added in v0.2.10
type DestinationType string
const ( DestinationType_EMAIL DestinationType = "EMAIL" DestinationType_ACTION_HUB DestinationType = "ACTION_HUB" )
type DiscretePalette ¶ added in v0.2.0
type DiscretePalette struct { Id *string `json:"id,omitempty"` // Unique identity string Label *string `json:"label,omitempty"` // Label for palette Type *string `json:"type,omitempty"` // Type of palette Colors *[]string `json:"colors,omitempty"` // Array of colors in the palette }
https://developers.looker.com/api/explorer/4.0/types/ColorCollection/DiscretePalette
type EgressIpAddresses ¶ added in v0.3.2
type EgressIpAddresses struct {
EgressIpAddresses *[]string `json:"egress_ip_addresses,omitempty"` // Egress IP addresses
}
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"` // Unique Name ParentId string `json:"parent_id,omitempty"` // Id of Parent. If the parent id is null, this is a root-level entry Id string `json:"id,omitempty"` // Unique Id ContentMetadataId string `json:"content_metadata_id,omitempty"` // Id of content metadata CreatedAt *time.Time `json:"created_at,omitempty"` // Time the space was created CreatorId string `json:"creator_id,omitempty"` // User Id of Creator ChildCount int64 `json:"child_count,omitempty"` // Children Count ExternalId string `json:"external_id,omitempty"` // Embedder's Id if this folder was autogenerated as an embedding shared folder via 'external_group_id' in an SSO embed login IsEmbed bool `json:"is_embed,omitempty"` // Folder is an embed folder IsEmbedUsersRoot bool `json:"is_embed_users_root,omitempty"` // Folder is the root embed users folder IsPersonal bool `json:"is_personal,omitempty"` // Folder is a user's personal folder IsPersonalDescendant bool `json:"is_personal_descendant,omitempty"` // Folder is descendant of a user's personal folder IsUsersRoot bool `json:"is_users_root,omitempty"` // Folder is the root user folder Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object Dashboards *[]DashboardBase `json:"dashboards,omitempty"` // Dashboards Looks *[]LookWithDashboards `json:"looks,omitempty"` // Looks }
type FolderBase ¶ added in v0.1.2
type FolderBase struct { Name string `json:"name"` // Unique Name ParentId string `json:"parent_id,omitempty"` // Id of Parent. If the parent id is null, this is a root-level entry Id string `json:"id,omitempty"` // Unique Id ContentMetadataId string `json:"content_metadata_id,omitempty"` // Id of content metadata CreatedAt time.Time `json:"created_at,omitempty"` // Time the folder was created CreatorId string `json:"creator_id,omitempty"` // User Id of Creator ChildCount int64 `json:"child_count,omitempty"` // Children Count ExternalId string `json:"external_id,omitempty"` // Embedder's Id if this folder was autogenerated as an embedding shared folder via 'external_group_id' in an SSO embed login IsEmbed bool `json:"is_embed,omitempty"` // Folder is an embed folder IsEmbedUsersRoot bool `json:"is_embed_users_root,omitempty"` // Folder is the root embed users folder IsPersonal bool `json:"is_personal,omitempty"` // Folder is a user's personal folder IsPersonalDescendant bool `json:"is_personal_descendant,omitempty"` // Folder is descendant of a user's personal folder IsUsersRoot bool `json:"is_users_root,omitempty"` // Folder is the root user folder Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object }
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 InvestigativeContentType ¶ added in v0.2.10
type InvestigativeContentType string
const InvestigativeContentType_Dashboard InvestigativeContentType = "dashboard"
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 LookMLModel ¶
type LookMLModel struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object AllowedDbConnectionNames []string `json:"allowed_db_connection_names,omitempty"` // Array of names of connections this model is allowed to use Explores *[]LookmlModelNavExplore `json:"explores,omitempty"` // Array of explores (if has_content) HasContent bool `json:"has_content,omitempty"` // Does this model declaration have have lookml content? Label string `json:"label,omitempty"` // UI-friendly name for this model Name string `json:"name,omitempty"` // Name of the model. Also used as the unique identifier ProjectName string `json:"project_name,omitempty"` // Name of project containing the model UnlimitedDbConnections bool `json:"unlimited_db_connections,omitempty"` // Is this model allowed to use all current and future connections }
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 LookWithDashboards ¶ added in v0.1.2
type LookWithDashboards struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object ContentMetadataId string `json:"content_metadata_id,omitempty"` // Id of content metadata Id string `json:"id,omitempty"` // Unique Id Title string `json:"title,omitempty"` // Look Title UserId string `json:"user_id,omitempty"` // User Id ContentFavoriteId string `json:"content_favorite_id,omitempty"` // Content Favorite Id CreatedAt *time.Time `json:"created_at,omitempty"` // Time that the Look was created. Deleted bool `json:"deleted,omitempty"` // Whether or not a look is 'soft' deleted. DeletedAt *time.Time `json:"deleted_at,omitempty"` // Time that the Look was deleted. DeleterId string `json:"deleter_id,omitempty"` // Id of User that deleted the look. Description string `json:"description,omitempty"` // Description EmbedUrl string `json:"embed_url,omitempty"` // Embed Url ExcelFileUrl string `json:"excel_file_url,omitempty"` // Excel File Url FavoriteCount int64 `json:"favorite_count,omitempty"` // Number of times favorited GoogleSpreadsheetFormula string `json:"google_spreadsheet_formula,omitempty"` // Google Spreadsheet Formula ImageEmbedUrl string `json:"image_embed_url,omitempty"` // Image Embed Url IsRunOnLoad bool `json:"is_run_on_load,omitempty"` // auto-run query when Look viewed LastAccessedAt *time.Time `json:"last_accessed_at,omitempty"` // Time that the Look was last accessed by any user LastUpdaterId string `json:"last_updater_id,omitempty"` // Id of User that last updated the look. LastViewedAt *time.Time `json:"last_viewed_at,omitempty"` // Time last viewed in the Looker web UI Model *LookModel `json:"model,omitempty"` Public bool `json:"public,omitempty"` // Is Public PublicSlug string `json:"public_slug,omitempty"` // Public Slug PublicUrl string `json:"public_url,omitempty"` // Public Url QueryId string `json:"query_id,omitempty"` // Query Id ShortUrl string `json:"short_url,omitempty"` // Short Url Folder *FolderBase `json:"folder,omitempty"` FolderId string `json:"folder_id,omitempty"` // Folder Id UpdatedAt *time.Time `json:"updated_at,omitempty"` // Time that the Look was updated. ViewCount int64 `json:"view_count,omitempty"` // Number of times viewed in the Looker web UI Dashboards *[]DashboardBase `json:"dashboards,omitempty"` // Dashboards }
type LookmlModelNavExplore ¶ added in v0.1.2
type LookmlModelNavExplore struct {}
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 PermissionSet struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object AllAccess bool `json:"all_access,omitempty"` BuiltIn bool `json:"built_in,omitempty"` Id string `json:"id,omitempty"` // Unique Id Name string `json:"name,omitempty"` // Name of PermissionSet Permissions []string `json:"permissions,omitempty"` Url string `json:"url,omitempty"` // Link to get this item }
type PermissionSetResource ¶ added in v0.2.0
type PermissionSetResource interface { List(context.Context, *ListOptions) ([]PermissionSet, *Response, error) Get(ctx context.Context, PermissionSetId string) (*PermissionSet, *Response, error) GetByName(ctx context.Context, PermissionSetName string, opt *ListOptions) ([]PermissionSet, *Response, error) Create(ctx context.Context, PermissionSet *PermissionSet) (*PermissionSet, *Response, error) Update(ctx context.Context, PermissionSetId string, PermissionSet *PermissionSet) (*PermissionSet, *Response, error) Delete(ctx context.Context, PermissionSetId string) (*Response, error) }
type PermissionSetResourceOp ¶ added in v0.2.0
type PermissionSetResourceOp struct {
// contains filtered or unexported fields
}
func (*PermissionSetResourceOp) Create ¶ added in v0.2.0
func (s *PermissionSetResourceOp) Create(ctx context.Context, permissionSet *PermissionSet) (*PermissionSet, *Response, error)
func (*PermissionSetResourceOp) Get ¶ added in v0.2.0
func (s *PermissionSetResourceOp) Get(ctx context.Context, PermissionSetId string) (*PermissionSet, *Response, error)
func (*PermissionSetResourceOp) GetByName ¶ added in v0.2.0
func (s *PermissionSetResourceOp) GetByName(ctx context.Context, PermissionSetName string, opt *ListOptions) ([]PermissionSet, *Response, error)
func (*PermissionSetResourceOp) List ¶ added in v0.2.0
func (s *PermissionSetResourceOp) List(ctx context.Context, opt *ListOptions) ([]PermissionSet, *Response, error)
List -
func (*PermissionSetResourceOp) Update ¶ added in v0.2.0
func (s *PermissionSetResourceOp) Update(ctx context.Context, PermissionSetId string, permissionSet *PermissionSet) (*PermissionSet, *Response, error)
type PermissionSetSlice ¶
type PermissionSetSlice []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 PublicEgressIpsResource ¶ added in v0.3.2
type PublicEgressIpsResource interface {
Get(ctx context.Context) (*EgressIpAddresses, *Response, error)
}
type PublicEgressIpsResourceOp ¶ added in v0.3.2
type PublicEgressIpsResourceOp struct {
// contains filtered or unexported fields
}
func (PublicEgressIpsResourceOp) Get ¶ added in v0.3.2
func (s PublicEgressIpsResourceOp) Get(ctx context.Context) (*EgressIpAddresses, *Response, error)
type PullRequestMode ¶ added in v0.2.17
type PullRequestMode string
const PullRequestMode_Links PullRequestMode = "links"
const PullRequestMode_Off PullRequestMode = "off"
const PullRequestMode_Recommended PullRequestMode = "recommended"
const PullRequestMode_Required PullRequestMode = "required"
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 { List(context.Context, *ListOptions) ([]Role, *Response, error) ListByName(ctx context.Context, name string, opt *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) ListByName ¶ added in v0.2.5
func (s *RolesResourceOp) ListByName(ctx context.Context, name string, opt *ListOptions) ([]Role, *Response, error)
ListByName -
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 Theme ¶ added in v0.4.0
type Theme struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object BeginAt *time.Time `json:"begin_at,omitempty"` // Timestamp for when this theme becomes active. Null=always EndAt *time.Time `json:"end_at,omitempty"` // Timestamp for when this theme expires. Null=never Id *string `json:"id,omitempty"` // Unique Id Name *string `json:"name,omitempty"` // Name of theme. Can only be alphanumeric and underscores. Settings *ThemeSettings `json:"settings,omitempty"` }
type ThemeSettings ¶ added in v0.4.0
type ThemeSettings struct { BackgroundColor *string `json:"background_color,omitempty"` // Default background color BaseFontSize *string `json:"base_font_size,omitempty"` // Base font size for scaling fonts (only supported by legacy dashboards) ColorCollectionId *string `json:"color_collection_id,omitempty"` // Optional. ID of color collection to use with the theme. Use an empty string for none. FontColor *string `json:"font_color,omitempty"` // Default font color FontFamily *string `json:"font_family,omitempty"` // Primary font family FontSource *string `json:"font_source,omitempty"` // Source specification for font InfoButtonColor *string `json:"info_button_color,omitempty"` // (DEPRECATED) Info button color PrimaryButtonColor *string `json:"primary_button_color,omitempty"` // Primary button color ShowFiltersBar *bool `json:"show_filters_bar,omitempty"` // Toggle to show filters. Defaults to true. ShowTitle *bool `json:"show_title,omitempty"` // Toggle to show the title. Defaults to true. TextTileTextColor *string `json:"text_tile_text_color,omitempty"` // Text color for text tiles TileBackgroundColor *string `json:"tile_background_color,omitempty"` // Background color for tiles TextTileBackgroundColor *string `json:"text_tile_background_color,omitempty"` // Background color for text tiles TileTextColor *string `json:"tile_text_color,omitempty"` // Text color for tiles TitleColor *string `json:"title_color,omitempty"` // Color for titles WarnButtonColor *string `json:"warn_button_color,omitempty"` // (DEPRECATED) Warning button color TileTitleAlignment *string `json:"tile_title_alignment,omitempty"` // The text alignment of tile titles (New Dashboards) TileShadow *bool `json:"tile_shadow,omitempty"` // Toggles the tile shadow (not supported) ShowLastUpdatedIndicator *bool `json:"show_last_updated_indicator,omitempty"` // Toggle to show the dashboard last updated indicator. Defaults to true. ShowReloadDataIcon *bool `json:"show_reload_data_icon,omitempty"` // Toggle to show reload data icon/button. Defaults to true. ShowDashboardMenu *bool `json:"show_dashboard_menu,omitempty"` // Toggle to show the dashboard actions menu. Defaults to true. ShowFiltersToggle *bool `json:"show_filters_toggle,omitempty"` // Toggle to show the filters icon/toggle. Defaults to true. ShowDashboardHeader *bool `json:"show_dashboard_header,omitempty"` // Toggle to show the dashboard header. Defaults to true. CenterDashboardTitle *bool `json:"center_dashboard_title,omitempty"` // Toggle to center the dashboard title. Defaults to false. DashboardTitleFontSize *string `json:"dashboard_title_font_size,omitempty"` // Dashboard title font size. BoxShadow *string `json:"box_shadow,omitempty"` // Default box shadow. PageMarginTop *string `json:"page_margin_top,omitempty"` // Dashboard page margin top. PageMarginBottom *string `json:"page_margin_bottom,omitempty"` // Dashboard page margin bottom. PageMarginSides *string `json:"page_margin_sides,omitempty"` // Dashboard page margin left and right. ShowExploreHeader *bool `json:"show_explore_header,omitempty"` // Toggle to show the explore page header. Defaults to true. ShowExploreTitle *bool `json:"show_explore_title,omitempty"` // Toggle to show the explore page title. Defaults to true. ShowExploreLastRun *bool `json:"show_explore_last_run,omitempty"` // Toggle to show the explore page last run. Defaults to true. ShowExploreTimezone *bool `json:"show_explore_timezone,omitempty"` // Toggle to show the explore page timezone. Defaults to true. ShowExploreRunStopButton *bool `json:"show_explore_run_stop_button,omitempty"` // Toggle to show the explore page run button. Defaults to true. ShowExploreActionsButton *bool `json:"show_explore_actions_button,omitempty"` // Toggle to show the explore page actions button. Defaults to true. ShowLookHeader *bool `json:"show_look_header,omitempty"` // Toggle to show the look page header. Defaults to true. ShowLookTitle *bool `json:"show_look_title,omitempty"` // Toggle to show the look page title. Defaults to true. ShowLookLastRun *bool `json:"show_look_last_run,omitempty"` // Toggle to show the look page last run. Defaults to true. ShowLookTimezone *bool `json:"show_look_timezone,omitempty"` // Toggle to show the look page timezone Defaults to true. ShowLookRunStopButton *bool `json:"show_look_run_stop_button,omitempty"` // Toggle to show the look page run button. Defaults to true. ShowLookActionsButton *bool `json:"show_look_actions_button,omitempty"` // Toggle to show the look page actions button. Defaults to true. TileTitleFontSize *string `json:"tile_title_font_size,omitempty"` // Font size for tiles. ColumnGapSize *string `json:"column_gap_size,omitempty"` // The vertical gap/gutter size between tiles. RowGapSize *string `json:"row_gap_size,omitempty"` // The horizontal gap/gutter size between tiles. BorderRadius *string `json:"border_radius,omitempty"` // The border radius for tiles. }
type ThemesResource ¶ added in v0.4.0
type ThemesResourceOp ¶ added in v0.4.0
type ThemesResourceOp struct {
// contains filtered or unexported fields
}
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 { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object AvatarUrl string `json:"avatar_url,omitempty"` // URL for the avatar image (may be generic) AvatarUrlWithoutSizing string `json:"avatar_url_without_sizing,omitempty"` // URL for the avatar image (may be generic), does not specify size CredentialsEmail *CredentialsEmail `json:"credentials_email,omitempty"` CredentialsEmbed *[]CredentialsEmbed `json:"credentials_embed,omitempty"` // Embed credentials //CredentialsApi3 *[]CredentialsApi3 `json:"credentials_api3,omitempty"` // API 3 credentials //CredentialsGoogle *CredentialsGoogle `json:"credentials_google,omitempty"` //CredentialsLdap *CredentialsLDAP `json:"credentials_ldap,omitempty"` //CredentialsLookerOpenid *CredentialsLookerOpenid `json:"credentials_looker_openid,omitempty"` //CredentialsOidc *CredentialsOIDC `json:"credentials_oidc,omitempty"` //CredentialsTotp *CredentialsTotp `json:"credentials_totp,omitempty"` CredentialsSaml *CredentialsSaml `json:"credentials_saml,omitempty"` DisplayName string `json:"display_name,omitempty"` // Full name for display (available only if both first_name and last_name are set) Email string `json:"email,omitempty"` // EMail address EmbedGroupSpaceId string `json:"embed_group_space_id,omitempty"` // (DEPRECATED) (Embed only) ID of user's group space based on the external_group_id optionally specified during embed user login FirstName string `json:"first_name,omitempty"` // First name GroupIds []string `json:"group_ids,omitempty"` // Array of ids of the groups for this user HomeFolderId string `json:"home_folder_id,omitempty"` // ID string for user's home folder Id string `json:"id,omitempty"` // Unique Id IsDisabled bool `json:"is_disabled,omitempty"` // Account has been disabled LastName string `json:"last_name,omitempty"` // Last name Locale string `json:"locale,omitempty"` // User's preferred locale. User locale takes precedence over Looker's system-wide default locale. Locale determines language of display strings and date and numeric formatting in API responses. Locale string must be a 2 letter language code or a combination of language code and region code: 'en' or 'en-US', for example. LookerVersions []string `json:"looker_versions,omitempty"` // Array of strings representing the Looker versions that this user has used (this only goes back as far as '3.54.0') ModelsDirValidated bool `json:"models_dir_validated,omitempty"` // User's dev workspace has been checked for presence of applicable production projects PersonalFolderId string `json:"personal_folder_id,omitempty"` // ID of user's personal folder PresumedLookerEmployee bool `json:"presumed_looker_employee,omitempty"` // User is identified as an employee of Looker RoleIds SliceStringInts `json:"role_ids,omitempty"` // Array of ids of the roles for this user UiState map[string]interface{} `json:"ui_state,omitempty"` // Per user dictionary of undocumented state information owned by the Looker UI. VerifiedLookerEmployee bool `json:"verified_looker_employee,omitempty"` // User is identified as an employee of Looker who has been verified via Looker corporate authentication RolesExternallyManaged bool `json:"roles_externally_managed,omitempty"` // User's roles are managed by an external directory like SAML or LDAP and can not be changed directly. AllowDirectRoles bool `json:"allow_direct_roles,omitempty"` // User can be directly assigned a role. AllowNormalGroupMembership bool `json:"allow_normal_group_membership,omitempty"` // User can be a direct member of a normal Looker group. AllowRolesFromNormalGroups bool `json:"allow_roles_from_normal_groups,omitempty"` // User can inherit roles from a normal Looker group. EmbedGroupFolderId string `json:"embed_group_folder_id,omitempty"` // (Embed only) ID of user's group folder based on the external_group_id optionally specified during embed user login Url string `json:"url,omitempty"` // Link to get this item }
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 UserAttribute ¶ added in v0.2.8
type UserAttribute struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object Id string `json:"id,omitempty"` // Unique Id Name string `json:"name"` // Name of user attribute Label string `json:"label"` // Human-friendly label for user attribute Type string `json:"type"` // Type of user attribute ("string", "number", "datetime", "yesno", "zipcode") DefaultValue string `json:"default_value,omitempty"` // Default value for when no value is set on the user IsSystem *bool `json:"is_system,omitempty"` // Attribute is a system default IsPermanent *bool `json:"is_permanent,omitempty"` // Attribute is permanent and cannot be deleted ValueIsHidden *bool `json:"value_is_hidden,omitempty"` // If true, users will not be able to view values of this attribute UserCanView *bool `json:"user_can_view,omitempty"` // Non-admin users can see the values of their attributes and use them in filters UserCanEdit *bool `json:"user_can_edit,omitempty"` // Users can change the value of this attribute for themselves HiddenValueDomainWhitelist *string `json:"hidden_value_domain_whitelist,omitempty"` // Destinations to which a hidden attribute may be sent. Once set, cannot be edited. }
type UserAttributeGroupValue ¶ added in v0.2.9
type UserAttributeGroupValue struct { Can map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object Id string `json:"id,omitempty"` // Unique Id of this group-attribute relation GroupId string `json:"group_id,omitempty"` // Id of group UserAttributeId string `json:"user_attribute_id,omitempty"` // Id of user attribute ValueIsHidden bool `json:"value_is_hidden,omitempty"` // If true, the "value" field will be null, because the attribute settings block access to this value Rank int64 `json:"rank,omitempty"` // Precedence for resolving value for user Value string `json:"value,omitempty"` // Value of user attribute for group }
type UserAttributesResource ¶ added in v0.2.8
type UserAttributesResource interface { Get(context.Context, int) (*UserAttribute, *Response, error) Create(context.Context, *UserAttribute) (*UserAttribute, *Response, error) Update(context.Context, string, *UserAttribute) (*UserAttribute, *Response, error) Delete(context.Context, string) (*Response, error) SetUserAttributeValue(context.Context, []UserAttributeGroupValue, string) (*[]UserAttributeGroupValue, *Response, error) GetUserAttributeValue(context.Context, string) (*[]UserAttributeGroupValue, *Response, error) }
type UserAttributesResourceOp ¶ added in v0.2.8
type UserAttributesResourceOp struct {
// contains filtered or unexported fields
}
func (*UserAttributesResourceOp) Create ¶ added in v0.2.8
func (s *UserAttributesResourceOp) Create(ctx context.Context, requestUserAttribute *UserAttribute) (*UserAttribute, *Response, error)
func (*UserAttributesResourceOp) Get ¶ added in v0.2.8
func (s *UserAttributesResourceOp) Get(ctx context.Context, UserAttributeId int) (*UserAttribute, *Response, error)
func (*UserAttributesResourceOp) GetUserAttributeValue ¶ added in v0.2.9
func (s *UserAttributesResourceOp) GetUserAttributeValue(ctx context.Context, UserAttributeId string) (*[]UserAttributeGroupValue, *Response, error)
func (*UserAttributesResourceOp) SetUserAttributeValue ¶ added in v0.2.9
func (s *UserAttributesResourceOp) SetUserAttributeValue(ctx context.Context, userAtt []UserAttributeGroupValue, attributeId string) (*[]UserAttributeGroupValue, *Response, error)
func (*UserAttributesResourceOp) Update ¶ added in v0.2.8
func (s *UserAttributesResourceOp) Update(ctx context.Context, UserAttributeId string, requestUserAttribute *UserAttribute) (*UserAttribute, *Response, error)
type UsersResource ¶
type UsersResource interface { List(context.Context, *ListOptions) ([]User, *Response, error) ListById(context.Context, []string, *ListOptions) ([]User, *Response, error) ListByEmail(context.Context, string, *ListOptions) ([]User, *Response, error) Get(context.Context, string) (*User, *Response, error) Create(context.Context, *User) (*User, *Response, error) Update(context.Context, string, *User) (*User, *Response, error) Delete(context.Context, string) (*Response, error) CreateEmail(context.Context, string, *CredentialsEmail) (*CredentialsEmail, *Response, error) GetEmail(context.Context, string) (*CredentialsEmail, *Response, error) UpdateEmail(context.Context, string, *CredentialsEmail) (*CredentialsEmail, *Response, error) DeleteEmail(context.Context, string) (*Response, error) CreatePasswordReset(context.Context, string) (*CredentialsEmail, *Response, error) SendPasswordReset(context.Context, string) (*CredentialsEmail, *Response, error) GetRoles(context.Context, string) ([]Role, *Response, error) SetRoles(context.Context, string, []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 string, createReq *CredentialsEmail) (*CredentialsEmail, *Response, error)
CreateEmail -
func (*UsersResourceOp) CreatePasswordReset ¶
func (s *UsersResourceOp) CreatePasswordReset(ctx context.Context, id string) (*CredentialsEmail, *Response, error)
CreatePasswordReset -
func (*UsersResourceOp) DeleteEmail ¶
DeleteEmail -
func (*UsersResourceOp) GetEmail ¶
func (s *UsersResourceOp) GetEmail(ctx context.Context, id string) (*CredentialsEmail, *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 []string, opt *ListOptions) ([]User, *Response, error)
func (*UsersResourceOp) SendPasswordReset ¶
func (s *UsersResourceOp) SendPasswordReset(ctx context.Context, id string) (*CredentialsEmail, *Response, error)
SendPasswordReset -
func (*UsersResourceOp) SetRoles ¶
func (s *UsersResourceOp) SetRoles(ctx context.Context, id string, roleIds []string) ([]Role, *Response, error)
SetRoles -
func (*UsersResourceOp) Update ¶
func (s *UsersResourceOp) Update(ctx context.Context, id string, updateReq *User) (*User, *Response, error)
Update -
func (*UsersResourceOp) UpdateEmail ¶
func (s *UsersResourceOp) UpdateEmail(ctx context.Context, id string, updateReq *CredentialsEmail) (*CredentialsEmail, *Response, error)
UpdateEmail -
type WorkspacesResource ¶
type WorkspacesResource interface { }
type WorkspacesResourceOp ¶
type WorkspacesResourceOp struct {
// contains filtered or unexported fields
}
type WriteColorCollection ¶ added in v0.2.0
type WriteColorCollection struct { Label *string `json:"label,omitempty"` // Label of color collection CategoricalPalettes *[]DiscretePalette `json:"categoricalPalettes,omitempty"` // Array of categorical palette definitions SequentialPalettes *[]ContinuousPalette `json:"sequentialPalettes,omitempty"` // Array of discrete palette definitions DivergingPalettes *[]ContinuousPalette `json:"divergingPalettes,omitempty"` // Array of diverging palette definitions }
https://developers.looker.com/api/explorer/4.0/types/ColorCollection/WriteColorCollection