lookergo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const FoldersBasePath = "4.0/folders"

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func CheckResponse

func CheckResponse(r *http.Response) error

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 DoRequest

func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)

DoRequest submits an HTTP request.

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

func Int(v int) *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

func StreamToString(stream io.Reader) string

StreamToString converts a reader to a string

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func Stringify

func Stringify(message interface{}) string

Stringify attempts to create a string representation of DigitalOcean types

Types

type ApiConfig

type ApiConfig struct {
	ClientId     string
	ClientSecret string
	BaseURL      string
	ClientCtx    context.Context
}

ApiConfig -

type ArgError

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

ArgError is an error that represents an error with an input to pkg. It identifies the argument and the cause (if possible).

func NewArgError

func NewArgError(arg, reason string) *ArgError

NewArgError creates an InputError.

func (*ArgError) Error

func (e *ArgError) Error() string

type AuthToken

type AuthToken struct {
	AccessToken  string  `json:"access_token"`
	TokenType    string  `json:"token_type,omitempty"`
	ExpiresIn    int     `json:"expires_in,omitempty"` // Differs from oauth2.Token{}: `json:"expiry,omitempty"
	RefreshToken *string `json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

AuthToken -

type Client

type Client struct {

	// Base URL for API requests.
	BaseURL *url.URL

	// User agent for HTTP client
	UserAgent string

	// Rate contains the current rate limit for the client as determined by the most recent
	// API call. It is not thread-safe. Please consider using GetRate() instead.
	Rate Rate

	// Resources used for communicating with the API
	Groups      GroupsResource
	Users       UsersResource
	Roles       RolesResource
	Folders     FoldersResource
	Workspaces  WorkspacesResource
	Projects    ProjectsResource
	Sessions    SessionsResource
	ModelSets   ModelSetsResource
	Connections ConnectionsResource
	LookMLModel LookMlModelsResource

	// Production or dev workspace
	Workspace string
	// contains filtered or unexported fields
}

Client manages communication with the API.

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient -

func NewFromApiv3Creds

func NewFromApiv3Creds(config ApiConfig) *Client

NewFromApiv3Creds -

func NewFromStaticToken

func NewFromStaticToken(token string) *Client

NewFromStaticToken returns a new API client using the given API token.

func (*Client) CreateDevConnection

func (c *Client) CreateDevConnection(ctx context.Context, rc RequestCompletionCallback) (*Client, *Session, error)

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

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 (c *Client) EnsureStaticToken(ctx context.Context, parentClient *Client, apiUserID string) error

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

func (c *Client) SetBaseURL(bu string) error

SetBaseURL is a client option for setting the base URL.

func (*Client) SetOauthCredentials

func (c *Client) SetOauthCredentials(ctx context.Context, clientId string, clientSecret string) error

func (*Client) SetOauthStaticToken

func (c *Client) SetOauthStaticToken(ctx context.Context, token *oauth2.Token) error

func (*Client) SetRequestHeaders

func (c *Client) SetRequestHeaders(headers map[string]string) error

SetRequestHeaders sets optional HTTP headers on the client that are sent on each HTTP request.

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(ua string) error

SetUserAgent is a client option for setting the user agent.

type ClientOpt

type ClientOpt func(*Client) error

ClientOpt are options for New.

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) Delete

func (s ConnectionsResourceOp) Delete(ctx context.Context, connectionName string) (*Response, error)

func (ConnectionsResourceOp) Get

func (s ConnectionsResourceOp) Get(ctx context.Context, connectionName string) (*DBConnection, *Response, error)

func (ConnectionsResourceOp) Update

func (s ConnectionsResourceOp) Update(ctx context.Context, connectionName string, connection *DBConnection) (*DBConnection, *Response, error)

func (ConnectionsResourceOp) ValidateConfig

func (s ConnectionsResourceOp) ValidateConfig(ctx context.Context, connection *DBConnection) (dbcv []DBConnectionValidation, resp *Response, err error)

func (ConnectionsResourceOp) ValidateConnection

func (s ConnectionsResourceOp) ValidateConnection(ctx context.Context, connectionName string, tests []string) (dbcv []DBConnectionValidation, resp *Response, err error)

ValidateConnection - Possible for most db's: first do connect test; next do kill,query test

type CredentialEmail

type CredentialEmail struct {
	Email       string `json:"email"`
	ForcedReset bool   `json:"forced_password_reset_at_next_login"`
	IsDisabled  bool   `json:"is_disabled,omitempty"`
}

CredentialEmail -

type CredentialSaml

type CredentialSaml struct {
	Email      string `json:"email"`
	SamlUserId string `json:"saml_user_id"`
	Url        string `json:"url"`
}

type DBConnection

type DBConnection struct {
	// Name of the connection. Also used as the unique identifier
	Name    string     `json:"name,omitempty"`
	Dialect *DBDialect `json:"dialect,omitempty"`
	// SQL Runner snippets for this connection
	Snippets []Snippet `json:"snippets,omitempty"`
	// True if PDTs are enabled on this connection
	PdtsEnabled *bool `json:"pdts_enabled,omitempty"`
	// Host name/address of server
	Host string `json:"host,omitempty"`
	// Port number on server
	Port string `json:"port,omitempty"`
	// Username for server authentication
	Username string `json:"username,omitempty"`
	// (Write-Only) Password for server authentication
	Password string `json:"password,omitempty"`
	// Whether the connection uses OAuth for authentication.
	UsesOauth *bool `json:"uses_oauth,omitempty"`
	// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).
	Certificate string `json:"certificate,omitempty"`
	// (Write-Only) Certificate keyfile type - .json or .p12
	FileType string `json:"file_type,omitempty"`
	// Database name
	Database string `json:"database,omitempty"`
	// Time zone of database
	DbTimezone string `json:"db_timezone,omitempty"`
	// Timezone to use in queries
	QueryTimezone string `json:"query_timezone,omitempty"`
	// Scheme name
	Schema string `json:"schema,omitempty"`
	// Maximum number of concurrent connection to use
	MaxConnections int64 `json:"max_connections,omitempty"`
	// Maximum size of query in GBs (BigQuery only, can be a user_attribute name)
	MaxBillingGigabytes string `json:"max_billing_gigabytes,omitempty"`
	// Use SSL/TLS when connecting to server
	Ssl *bool `json:"ssl,omitempty"`
	// Verify the SSL
	VerifySsl *bool `json:"verify_ssl,omitempty"`
	// Name of temporary database (if used)
	TmpDbName string `json:"tmp_db_name,omitempty"`
	// Additional params to add to JDBC connection string
	JdbcAdditionalParams string `json:"jdbc_additional_params,omitempty"`
	// Connection Pool Timeout, in seconds
	PoolTimeout int64 `json:"pool_timeout,omitempty"`
	// (Read/Write) SQL Dialect name
	DialectName string `json:"dialect_name,omitempty"`
	// Creation date for this connection
	CreatedAt string `json:"created_at,omitempty"`
	// Id of user who last modified this connection configuration
	UserId string `json:"user_id,omitempty"`
	// Is this an example connection?
	Example *bool `json:"example,omitempty"`
	// (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password
	UserDbCredentials *bool `json:"user_db_credentials,omitempty"`
	// Fields whose values map to user attribute names
	UserAttributeFields []string `json:"user_attribute_fields,omitempty"`
	// Cron string specifying when maintenance such as PDT trigger checks and drops should be performed
	MaintenanceCron string `json:"maintenance_cron,omitempty"`
	// Unix timestamp at start of last completed PDT trigger check process
	LastRegenAt string `json:"last_regen_at,omitempty"`
	// Unix timestamp at start of last completed PDT reap process
	LastReapAt string `json:"last_reap_at,omitempty"`
	// Precache tables in the SQL Runner
	SqlRunnerPrecacheTables *bool `json:"sql_runner_precache_tables,omitempty"`
	// Fetch Information Schema For SQL Writing
	SqlWritingWithInfoSchema *bool `json:"sql_writing_with_info_schema,omitempty"`
	// SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature
	AfterConnectStatements string `json:"after_connect_statements,omitempty"`
	// Not implemented
	// PdtContextOverride DBConnectionOverride `json:"pdt_context_override,omitempty"`
	// Is this connection created and managed by Looker
	Managed *bool `json:"managed,omitempty"`
	// The Id of the ssh tunnel this connection uses
	TunnelId string `json:"tunnel_id,omitempty"`
	// Maximum number of threads to use to build PDTs in parallel
	PdtConcurrency int64 `json:"pdt_concurrency,omitempty"`
	// When disable_context_comment is true comment will not be added to SQL
	DisableContextComment *bool `json:"disable_context_comment,omitempty"`
	// An External OAuth Application to use for authenticating to the database
	OauthApplicationId string `json:"oauth_application_id,omitempty"`
	// When true, error PDTs will be retried every regenerator cycle
	AlwaysRetryFailedBuilds *bool `json:"always_retry_failed_builds,omitempty"`
	// When true, query cost estimate will be displayed in explore.
	CostEstimateEnabled *bool `json:"cost_estimate_enabled,omitempty"`
	// PDT builds on this connection can be kicked off and cancelled via API.
	PdtApiControlEnabled *bool `json:"pdt_api_control_enabled,omitempty"`
}

<editor-fold desc="type_structs"> DBConnection struct for DBConnection

type DBConnectionValidation

type DBConnectionValidation struct {
	ConnectionString string `json:"connection_string"`
	Message          string `json:"message"`
	Name             string `json:"name"`
	Status           string `json:"status"`
}

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 Error

type Error struct {
	Field            string `json:"field"`
	Code             string `json:"code"`
	Message          string `json:"message"`
	DocumentationUrl string `json:"documentation_url"`
}

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response
	// Error message
	Message string `json:"message"`
	// RequestID returned from the API, useful to contact support.
	DocsURL string `json:"docs"`
	// More specific error msg
	Errors []Error `json:"errors,omitempty"`
}

An ErrorResponse reports the error caused by an API request

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type Folder

type Folder struct {
	Name                 string `json:"name,omitempty"`
	ParentId             string `json:"parent_id,omitempty"`
	Id                   string `json:"id,omitempty"`
	ContentMetadataId    string `json:"content_metadata_id,omitempty"`
	CreatedAt            string `json:"created_at,omitempty"`
	CreatorId            string `json:"creator_id,omitempty"`
	ChildCount           int64  `json:"child_count,omitempty"`
	ExternalId           string `json:"external_id,omitempty"`
	IsEmbed              bool   `json:"is_embed,omitempty"`
	IsEmbedSharedRoot    bool   `json:"is_embed_shared_root,omitempty"`
	IsEmbedUsersRoot     bool   `json:"is_embed_users_root,omitempty"`
	IsPersonal           bool   `json:"is_personal,omitempty"`
	IsPersonalDescendant bool   `json:"is_personal_descendant,omitempty"`
	IsSharedRoot         bool   `json:"is_shared_root,omitempty"`
	IsUsersRoot          bool   `json:"is_users_root,omitempty"`
}

type FoldersResource

type FoldersResource interface {
	List(context.Context, *ListOptions) ([]Folder, *Response, error)
	ListByName(context.Context, string, *ListOptions) ([]Folder, *Response, error)
	Get(context.Context, string) (*Folder, *Response, error)
	//Get(context.Context,*ListOptions, string) ([]Folder, *Response, error)
	Create(context.Context, *Folder) (*Folder, *Response, error)
	Update(context.Context, string, *Folder) (*Folder, *Response, error)
	Delete(context.Context, string) (*Response, error)
}

type FoldersResourceOp

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

func (*FoldersResourceOp) Create

func (s *FoldersResourceOp) Create(ctx context.Context, requestFolder *Folder) (*Folder, *Response, error)

func (*FoldersResourceOp) Delete

func (s *FoldersResourceOp) Delete(ctx context.Context, FolderId string) (*Response, error)

func (*FoldersResourceOp) Get

func (s *FoldersResourceOp) Get(ctx context.Context, FolderId string) (*Folder, *Response, error)

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)

func (*FoldersResourceOp) Update

func (s *FoldersResourceOp) Update(ctx context.Context, FolderId string, requestFolder *Folder) (*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

type GitBranchRef struct {
	Name string `json:"name"`
	Ref  string `json:"ref"`
}

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) Create

func (s *GroupsResourceOp) Create(ctx context.Context, createReq *Group) (*Group, *Response, error)

Create a group by ID.

func (*GroupsResourceOp) Delete

func (s *GroupsResourceOp) Delete(ctx context.Context, id int) (*Response, error)

Delete a group by ID.

func (*GroupsResourceOp) Get

func (s *GroupsResourceOp) Get(ctx context.Context, id int) (*Group, *Response, error)

Get a group by ID.

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 -

func (*GroupsResourceOp) Update

func (s *GroupsResourceOp) Update(ctx context.Context, id int, updateReq *Group) (*Group, *Response, error)

Update a group by ID.

type ListOptions

type ListOptions struct {
	// For paginated result sets, page of results to retrieve.
	Limit int `url:"limit,omitempty"`

	// For paginated result sets, the number of results to include per page.
	Offset int `url:"offset,omitempty"`
}

ListOptions specifies the optional parameters to various List methods that support ~~pagination~~ limit/offset querystring.

type Look

type Look struct {
	ContentMetadataId        string     `json:"content_metadata_id,omitempty"`
	Id                       string     `json:"id,omitempty"`
	Title                    string     `json:"title,omitempty"`
	UserId                   string     `json:"user_id,omitempty"`
	ContentFavoriteId        string     `json:"content_favorite_id,omitempty"`
	CreatedAt                string     `json:"created_at,omitempty"`
	Deleted                  bool       `json:"deleted,omitempty"`
	DeletedAt                string     `json:"deleted_at,omitempty"`
	Description              string     `json:"description,omitempty"`
	EmbededUrl               string     `json:"embeded_url,omitempty"`
	ExcelFileUrl             string     `json:"excel_file_url,omitempty"`
	FavoriteCount            int64      `json:"favorite_count,omitempty"`
	GoogleSpreadsheetFormula string     `json:"google_spreadsheet_formula,omitempty"`
	ImageEmbedUrl            string     `json:"image_embed_url,omitempty"`
	IsRunOnLoad              bool       `json:"is_run_on_load,omitempty"`
	LastAccessedAt           string     `json:"last_accessed_at,omitempty"`
	LastUpdaterId            string     `json:"last_updater_id,omitempty"`
	LastViewedAt             string     `json:"last_viewed_at,omitempty"`
	Model                    *LookModel `json:"model,omitempty"`
	Public                   bool       `json:"public,omitempty"`
	PublicSlug               string     `json:"public_slug,omitempty"`
	PublicUrl                string     `json:"public_url,omitempty"`
	QueryId                  string     `json:"query_id,omitempty"`
	ShortUrl                 string     `json:"short_url,omitempty"`
	Folder                   *Folder    `json:"folder,omitempty"`
	FolderId                 string     `json:"folder_id,omitempty"`
	UpdatedAt                string     `json:"updated_at,omitempty"`
	ViewCount                int64      `json:"view_count,omitempty"`
	Dashboards               *Dashboard `json:"dashboards,omitempty"`
}

type LookMLModel

type LookMLModel struct {
	Name                        string   `json:"name,omitempty"`
	Project_name                string   `json:"project_name,omitempty"`
	Label                       string   `json:"label,omitempty"`
	Allowed_db_connection_names []string `json:"allowed_db_connection_names,omitempty"`
	Unlimited_db_connections    bool     `json:"unlimited_db_connections,omitempty" `
}

type LookMlModelsResource

type LookMlModelsResource interface {
	List(ctx context.Context) ([]LookMLModel, *Response, error)
	Get(ctx context.Context, LookMLModelName string) (*LookMLModel, *Response, error)
	Create(ctx context.Context, LookMLModel *LookMLModel) (*LookMLModel, *Response, error)
	Update(ctx context.Context, LookMLModelName string, LookMLModel *LookMLModel) (*LookMLModel, *Response, error)
	Delete(ctx context.Context, LookMLModelName string) (*Response, error)
}

type LookMlModelsResourceOp

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

func (LookMlModelsResourceOp) Create

func (s LookMlModelsResourceOp) Create(ctx context.Context, requestLookMLModel *LookMLModel) (*LookMLModel, *Response, error)

func (LookMlModelsResourceOp) Delete

func (s LookMlModelsResourceOp) Delete(ctx context.Context, LookMLModelName string) (*Response, error)

func (LookMlModelsResourceOp) Get

func (s LookMlModelsResourceOp) Get(ctx context.Context, LookMLModelName string) (*LookMLModel, *Response, error)

func (LookMlModelsResourceOp) List

func (LookMlModelsResourceOp) Update

func (s LookMlModelsResourceOp) Update(ctx context.Context, LookMLModelName string, requestLookMLModel *LookMLModel) (*LookMLModel, *Response, error)

type LookModel

type LookModel struct {
	Id    string `json:"id,omitempty"`
	Label string `json:"label,omitempty"`
}

type ModelSet

type ModelSet struct {
	BuiltIn   bool     `json:"built_in,omitempty"`
	Id        string   `json:"id,omitempty"`
	AllAccess bool     `json:"all_access,omitempty"`
	Models    []string `json:"models,omitempty"`
	Name      string   `json:"name,omitempty"`
}

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
}

func (ModelSetsResourceOp) Create

func (s ModelSetsResourceOp) Create(ctx context.Context, modelSet *ModelSet) (*ModelSet, *Response, error)

func (ModelSetsResourceOp) Delete

func (s ModelSetsResourceOp) Delete(ctx context.Context, modelSetId string) (*Response, error)

func (ModelSetsResourceOp) Get

func (s ModelSetsResourceOp) Get(ctx context.Context, modelSetId string) (*ModelSet, *Response, error)

func (ModelSetsResourceOp) List

func (ModelSetsResourceOp) Update

func (s ModelSetsResourceOp) Update(ctx context.Context, modelSetId string, modelSet *ModelSet) (*ModelSet, *Response, error)

type NewGroupMemberGroup

type NewGroupMemberGroup struct {
	GroupID int `json:"group_id"`
}

type NewGroupMemberUser

type NewGroupMemberUser struct {
	UserID int `json:"user_id"`
}

type Permission

type Permission struct {
	Permission  string      `json:"permission"`
	Parent      interface{} `json:"parent"`
	Description string      `json:"description"`
}

type PermissionSet

type PermissionSet struct {
	BuiltIn     bool     `json:"built_in"`
	Id          int      `json:"id,string"`
	AllAccess   bool     `json:"all_access"`
	Name        string   `json:"name"`
	Permissions []string `json:"permissions"`
}

type PermissionSetSlice

type PermissionSetSlice []PermissionSet

func (PermissionSetSlice) HasById

func (items PermissionSetSlice) HasById(qId int) (has bool, set *PermissionSet)

func (PermissionSetSlice) HasByName

func (items PermissionSetSlice) HasByName(qName string) (has bool, set *PermissionSet)

type Project

type Project struct {
	// Project Id
	Id string `json:"id,omitempty"`
	// Project display name
	Name string `json:"name,omitempty"`
	// If true the project is configured with a git repository
	UsesGit *bool `json:"uses_git,omitempty"`
	// Git remote repository url
	GitRemoteUrl string `json:"git_remote_url,omitempty"`
	// Git username for HTTPS authentication. (For production only, if using user attributes.)
	GitUsername string `json:"git_username,omitempty"`
	// (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.)
	GitPassword string `json:"git_password,omitempty"`
	// Git production branch name. Defaults to master. Supported only in Looker 21.0 and higher.
	GitProductionBranchName string `json:"git_production_branch_name,omitempty"`
	// If true, the project uses a git cookie for authentication.
	UseGitCookieAuth *bool `json:"use_git_cookie_auth,omitempty"`
	// User attribute name for username in per-user HTTPS authentication.
	GitUsernameUserAttribute string `json:"git_username_user_attribute,omitempty"`
	// User attribute name for password in per-user HTTPS authentication.
	GitPasswordUserAttribute string `json:"git_password_user_attribute,omitempty"`
	// Name of the git service provider
	GitServiceName string `json:"git_service_name,omitempty"`
	// Port that HTTP(S) application server is running on (for PRs, file browsing, etc.)
	GitApplicationServerHttpPort int64 `json:"git_application_server_http_port,omitempty"`
	// Scheme that is running on application server (for PRs, file browsing, etc.)
	GitApplicationServerHttpScheme string `json:"git_application_server_http_scheme,omitempty"`
	// (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated.
	DeploySecret string `json:"deploy_secret,omitempty"`
	// (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint.
	UnsetDeploySecret *bool `json:"unset_deploy_secret,omitempty"`
	// The git pull request policy for this project. Valid values are: \"off\", \"links\", \"recommended\", \"required\".
	PullRequestMode string `json:"pull_request_mode,omitempty"`
	// Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository
	ValidationRequired *bool `json:"validation_required,omitempty"`
	// If true, advanced git release management is enabled for this project
	GitReleaseMgmtEnabled *bool `json:"git_release_mgmt_enabled,omitempty"`
	// Validation policy: If true, the project can be committed with warnings when `validation_required` is true. (`allow_warnings` does nothing if `validation_required` is false).
	AllowWarnings *bool `json:"allow_warnings,omitempty"`
	// If true the project is an example project and cannot be modified
	IsExample *bool `json:"is_example,omitempty"`
	// Status of dependencies in your manifest & lockfile
	DependencyStatus string `json:"dependency_status,omitempty"`
}

Project struct for Project

type ProjectsResource

type ProjectsResource interface {
	Get(ctx context.Context, projectName string) (*Project, *Response, error)
	// !!! NOT rest compliant !!!
	// name is required. git_remote_url is not allowed.
	// To configure Git for the newly created project, follow the instructions in update_project.
	Create(ctx context.Context, proj *Project) (*Project, *Response, error)
	Update(ctx context.Context, projectName string, proj *Project) (*Project, *Response, error)
	Delete(ctx context.Context, projectName string) (*Response, error)
	AllowWarnings(ctx context.Context, projectName string, value bool) (*Response, error)
	DeleteGitRepo(ctx context.Context, projectName string) (*Response, error)
	GitBranchesList(ctx context.Context, projectName string, opt *ListOptions) ([]GitBranch, *Response, error)
	GitBranchActiveGet(ctx context.Context, projectName string) (*GitBranch, *Response, error)
	GitBranchCheckout(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)
	GitBranchUpdate(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)
	GitBranchListByName(ctx context.Context, projectName string, branchName string) (*GitBranch, *Response, error)
	GitBranchDelete(ctx context.Context, projectName string, branchName string) (*Response, error)
	GitBranchDeployToProduction(ctx context.Context, projectName string, branch string) (*string, *Response, error)
	GitRefDeployToProduction(ctx context.Context, projectName string, ref string) (*string, *Response, error)
	DeployToProduction(ctx context.Context, projectName string) (*string, *Response, error)
	GitDeployKeyGet(ctx context.Context, projectName string) (*string, *Response, error)
	GitDeployKeyCreate(ctx context.Context, projectName string) (*string, *Response, error)
}

type ProjectsResourceOp

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

func (*ProjectsResourceOp) AllowWarnings

func (s *ProjectsResourceOp) AllowWarnings(ctx context.Context, projectName string, value bool) (*Response, error)

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) Delete

func (s *ProjectsResourceOp) Delete(ctx context.Context, projectName string) (*Response, error)

func (*ProjectsResourceOp) DeleteGitRepo

func (s *ProjectsResourceOp) DeleteGitRepo(ctx context.Context, projectName string) (*Response, error)

func (*ProjectsResourceOp) DeployToProduction

func (s *ProjectsResourceOp) DeployToProduction(ctx context.Context, projectName string) (*string, *Response, error)

func (*ProjectsResourceOp) Get

func (s *ProjectsResourceOp) Get(ctx context.Context, projectName string) (*Project, *Response, error)

func (*ProjectsResourceOp) GitBranchActiveGet

func (s *ProjectsResourceOp) GitBranchActiveGet(ctx context.Context, projectName string) (*GitBranch, *Response, error)

func (*ProjectsResourceOp) GitBranchCheckout

func (s *ProjectsResourceOp) GitBranchCheckout(ctx context.Context, projectName string, gbr *GitBranchRef) (*GitBranch, *Response, error)

func (*ProjectsResourceOp) GitBranchDelete

func (s *ProjectsResourceOp) GitBranchDelete(ctx context.Context, projectName string, branchName string) (*Response, error)

func (*ProjectsResourceOp) GitBranchDeployToProduction

func (s *ProjectsResourceOp) GitBranchDeployToProduction(ctx context.Context, projectName string, branch string) (*string, *Response, error)

func (*ProjectsResourceOp) GitBranchListByName

func (s *ProjectsResourceOp) GitBranchListByName(ctx context.Context, projectName string, branchName string) (*GitBranch, *Response, error)

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 (s *ProjectsResourceOp) GitDeployKeyCreate(ctx context.Context, projectName string) (*string, *Response, error)

func (*ProjectsResourceOp) GitDeployKeyGet

func (s *ProjectsResourceOp) GitDeployKeyGet(ctx context.Context, projectName string) (*string, *Response, error)

func (*ProjectsResourceOp) GitRefDeployToProduction

func (s *ProjectsResourceOp) GitRefDeployToProduction(ctx context.Context, projectName string, ref string) (*string, *Response, error)

func (*ProjectsResourceOp) Update

func (s *ProjectsResourceOp) Update(ctx context.Context, projectName string, proj *Project) (*Project, *Response, error)

Update Project

Update Project Configuration

Apply changes to a project's configuration.

Configuring Git for a Project

To set up a Looker project with a remote git repository, follow these steps:

Call update_session to select the 'dev' workspace. Call create_git_deploy_key to create a new deploy key for the project Copy the deploy key text into the remote git repository's ssh key configuration Call update_project to set project's git_remote_url ()and git_service_name, if necessary). When you modify a project's git_remote_url, Looker connects to the remote repository to fetch metadata. The remote git repository MUST be configured with the Looker-generated deploy key for this project prior to setting the project's git_remote_url.

To set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo):

Call update_session to select the 'dev' workspace. Call update_project setting git_remote_url to null and git_service_name to "bare".

type Rate

type Rate struct {
	// The number of request per hour the client is currently limited to.
	Limit int `json:"limit"`

	// The number of remaining requests the client can make this hour.
	Remaining int `json:"remaining"`

	// The time at which the current rate limit will reset.
	Reset Timestamp `json:"reset"`
}

Rate contains the rate limit for the current client.

func (Rate) String

func (r Rate) String() string

type RequestCompletionCallback

type RequestCompletionCallback func(*http.Request, *http.Response)

RequestCompletionCallback defines the type of the request callback function

type Response

type Response struct {
	*http.Response

	Rate
}

Response is an API response. This wraps the standard http.Response returned from the API.

type Role

type Role struct {
	Id              int           `json:"id,string,omitempty"`
	Name            string        `json:"name,omitempty"`
	PermissionSet   PermissionSet `json:"permission_set,omitempty"`
	PermissionSetID string        `json:"permission_set_id,omitempty"`
	ModelSet        ModelSet      `json:"model_set,omitempty"`
	ModelSetID      string        `json:"model_set_id,omitempty"`
}

type RolesResource

type RolesResource interface {
	PermissionSetsList(context.Context, *ListOptions) (PermissionSetSlice, *Response, error)
	PermissionSetListById(context.Context, []int, *ListOptions) ([]PermissionSet, *Response, error)
	PermissionSetListByName(context.Context, string, *ListOptions) ([]PermissionSet, *Response, error)
	PermissionSetGet(context.Context, int) (*PermissionSet, *Response, error)
	List(context.Context, *ListOptions) ([]Role, *Response, error)
	Get(context.Context, int) (*Role, *Response, error)
	Create(context.Context, *Role) (*Role, *Response, error)
	Update(context.Context, int, *Role) (*Role, *Response, error)
	Delete(context.Context, int) (*Response, error)
	RoleGroupsList(context.Context, int, *ListOptions) ([]Group, *Response, error)
	RoleGroupsSet(context.Context, int, []string) ([]Group, *Response, error)
	RoleUsersList(context.Context, int, *ListOptions) ([]User, *Response, error)
	RoleUsersSet(context.Context, int, []string) ([]User, *Response, error)
}

RolesResource is an interface for interfacing with the Role resource endpoints of the API. Ref: https://developers.looker.com/api/explorer/4.0/methods/Role

type RolesResourceOp

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

RolesResourceOp handles operations between Role related methods of the API.

func (*RolesResourceOp) Create

func (s *RolesResourceOp) Create(ctx context.Context, createReq *Role) (*Role, *Response, error)

Create -

func (*RolesResourceOp) Delete

func (s *RolesResourceOp) Delete(ctx context.Context, id int) (*Response, error)

Delete -

func (*RolesResourceOp) Get

func (s *RolesResourceOp) Get(ctx context.Context, id int) (*Role, *Response, error)

Get -

func (*RolesResourceOp) List

func (s *RolesResourceOp) List(ctx context.Context, opt *ListOptions) ([]Role, *Response, error)

List -

func (*RolesResourceOp) PermissionSetGet

func (s *RolesResourceOp) PermissionSetGet(ctx context.Context, id int) (*PermissionSet, *Response, error)

func (*RolesResourceOp) PermissionSetListById

func (s *RolesResourceOp) PermissionSetListById(ctx context.Context, ids []int, opt *ListOptions) ([]PermissionSet, *Response, error)

func (*RolesResourceOp) PermissionSetListByName

func (s *RolesResourceOp) PermissionSetListByName(ctx context.Context, name string, opt *ListOptions) ([]PermissionSet, *Response, error)

func (*RolesResourceOp) PermissionSetsList

func (s *RolesResourceOp) PermissionSetsList(ctx context.Context, opt *ListOptions) (PermissionSetSlice, *Response, error)

PermissionSetsList -

func (*RolesResourceOp) RoleGroupsList

func (s *RolesResourceOp) RoleGroupsList(ctx context.Context, id int, opt *ListOptions) ([]Group, *Response, error)

RoleGroupsList -

func (*RolesResourceOp) RoleGroupsSet

func (s *RolesResourceOp) RoleGroupsSet(ctx context.Context, id int, groupIds []string) ([]Group, *Response, error)

RoleGroupsSet -

func (*RolesResourceOp) RoleUsersList

func (s *RolesResourceOp) RoleUsersList(ctx context.Context, id int, opt *ListOptions) ([]User, *Response, error)

RoleUsersList -

func (*RolesResourceOp) RoleUsersSet

func (s *RolesResourceOp) RoleUsersSet(ctx context.Context, id int, userIds []string) ([]User, *Response, error)

RoleUsersSet -

func (*RolesResourceOp) Update

func (s *RolesResourceOp) Update(ctx context.Context, id int, updateReq *Role) (*Role, *Response, error)

Update -

type Session

type Session struct {
	WorkspaceId string `json:"workspace_id"`
	SudoUserId  *int   `json:"sudo_user_id,string,omitempty"`
}

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) Get

Get -

func (*SessionsResourceOp) GetCurrentUser

func (s *SessionsResourceOp) GetCurrentUser(ctx context.Context) (*User, *Response, error)

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 Snippet

type Snippet struct {
	// Name of the snippet
	Name string `json:"name,omitempty"`
	// Label of the snippet
	Label string `json:"label,omitempty"`
	// SQL text of the snippet
	Sql string `json:"sql,omitempty"`
}

type Timestamp

type Timestamp struct {
	time.Time
}

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) Equal

func (t Timestamp) Equal(u Timestamp) bool

Equal reports whether t and u are equal based on time.Equal

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.

type User

type User struct {
	Id              int              `json:"id,string,omitempty"`
	FirstName       string           `json:"first_name,omitempty"`
	LastName        string           `json:"last_name,omitempty"`
	CredentialEmail *CredentialEmail `json:"credentials_email,omitempty" `
	CredentialSaml  *CredentialSaml  `json:"credentials_saml,omitempty"`
	DisplayName     string           `json:"display_name,omitempty"`
	RoleIds         SliceStringInts  `json:"role_ids,omitempty"`
	Email           string           `json:"email,omitempty"`
}

User defines a user in the database Ref: https://github.com/looker-open-source/sdk-codegen/blob/main/go/sdk/v4/models.go#L3508

type UsersResource

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) Create

func (s *UsersResourceOp) Create(ctx context.Context, createReq *User) (*User, *Response, error)

Create -

func (*UsersResourceOp) CreateEmail

func (s *UsersResourceOp) CreateEmail(ctx context.Context, id int, createReq *CredentialEmail) (*CredentialEmail, *Response, error)

CreateEmail -

func (*UsersResourceOp) CreatePasswordReset

func (s *UsersResourceOp) CreatePasswordReset(ctx context.Context, id int) (*CredentialEmail, *Response, error)

CreatePasswordReset -

func (*UsersResourceOp) Delete

func (s *UsersResourceOp) Delete(ctx context.Context, id int) (*Response, error)

Delete -

func (*UsersResourceOp) DeleteEmail

func (s *UsersResourceOp) DeleteEmail(ctx context.Context, id int) (*Response, error)

DeleteEmail -

func (*UsersResourceOp) Get

func (s *UsersResourceOp) Get(ctx context.Context, id int) (*User, *Response, error)

Get -

func (*UsersResourceOp) GetEmail

func (s *UsersResourceOp) GetEmail(ctx context.Context, id int) (*CredentialEmail, *Response, error)

GetEmail -

func (*UsersResourceOp) GetRoles

func (s *UsersResourceOp) GetRoles(ctx context.Context, id int) ([]Role, *Response, error)

GetRoles -

func (*UsersResourceOp) List

func (s *UsersResourceOp) List(ctx context.Context, opt *ListOptions) ([]User, *Response, error)

List all users

func (*UsersResourceOp) ListByEmail

func (s *UsersResourceOp) ListByEmail(ctx context.Context, email string, opt *ListOptions) ([]User, *Response, error)

func (*UsersResourceOp) ListById

func (s *UsersResourceOp) ListById(ctx context.Context, ids []int, opt *ListOptions) ([]User, *Response, error)

func (*UsersResourceOp) SendPasswordReset

func (s *UsersResourceOp) SendPasswordReset(ctx context.Context, id int) (*CredentialEmail, *Response, error)

SendPasswordReset -

func (*UsersResourceOp) SetRoles

func (s *UsersResourceOp) SetRoles(ctx context.Context, id int, roleIds []string) ([]Role, *Response, error)

SetRoles -

func (*UsersResourceOp) Update

func (s *UsersResourceOp) Update(ctx context.Context, id int, updateReq *User) (*User, *Response, error)

Update -

func (*UsersResourceOp) UpdateEmail

func (s *UsersResourceOp) UpdateEmail(ctx context.Context, id int, updateReq *CredentialEmail) (*CredentialEmail, *Response, error)

UpdateEmail -

type WorkspacesResource

type WorkspacesResource interface {
}

type WorkspacesResourceOp

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

Jump to

Keyboard shortcuts

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