Documentation
¶
Index ¶
Constants ¶
const (
ErrCodeInternal = "-1" // Internal error.
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { UserAgent string SiteID string DataSources *dataSourcesService Projects *projectsService // contains filtered or unexported fields }
Client encapsulates a client that talks to the Tableau API
type CreateProjectRequest ¶
type CreateProjectRequest struct { ParentProjectId string `json:"parentProjectId,omitempty"` Name string `json:"name"` Description string `json:"description,omitempty"` ContentPermissions ProjectContentPermission `json:"contentPermissions,omitempty"` }
CreateProjectRequest encapsulates the request for creating a new project.
type DataSource ¶
type DataSource struct { ID string `json:"id"` Name string `json:"name"` CertificationNote string `json:"CertificationNote"` ContentUrl string `json:"contentUrl"` EncryptExtracts string `json:"encryptExtracts"` Description string `json:"description"` WebpageUrl string `json:"webpageUrl"` IsCertified bool `json:"isCertified"` UseRemoteQueryAgent bool `json:"useRemoteQueryAgent"` Type string `json:"type"` Tags map[string]string `json:"tags"` Owner struct { ID string `json:"id"` } Project struct { ID string `json:"id"` Name string `json:"name"` } CreatedAt time.Time `json:"CreatedAt"` UpdatedAt time.Time `json:"UpdatedAt"` }
DataSource represents a Tableau data source
type DeleteDataSourceRequest ¶
type DeleteDataSourceRequest struct {
ID string
}
DeleteDataSourceRequest encapsulates the request for deleting a single DataSource.
type DeleteProjectRequest ¶
type DeleteProjectRequest struct {
ID string `json:"id"`
}
DeleteProjectRequest encapsulates the request for deleting a new project.
type Error ¶
type Error struct { // code specifies the error code. i.e; NotFound, RateLimited, etc... Code string // Meta contains additional information depending on the error code. As an // example, if the Code is "ErrResponseMalformed", the map will be: ["body"] // = "body of the response" Meta map[string]string // contains filtered or unexported fields }
Error represents common errors originating from the Client.
type GetDataSourceRequest ¶
type GetDataSourceRequest struct {
ID string
}
GetDataSourceRequest encapsulates the request for getting a single DataSource.
type Project ¶
type Project struct { ID string `json:"id"` ParentProjectId string `json:"parentProjectId"` Name string `json:"name"` Description string `json:"description"` ContentPermissions string `json:"contentPermissions"` ControllingPermissionsProjectId string `json:"controllingPermissionsProjectId"` Writeable bool `json:"writeable"` TopLevelProject bool `json:"topLevelProject"` Owner struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` FullName string `json:"fullName"` SiteRole string `json:"siteRole"` LastLogin time.Time `json:"lastLogin"` } ContentCounts struct { ProjectCount int `json:"projectCount"` WorkbookCount int `json:"workbookCount"` ViewCount int `json:"viewCount"` DatasourceCount int `json:"datasourceCount"` } CreatedAt time.Time `json:"CreatedAt"` UpdatedAt time.Time `json:"UpdatedAt"` }
Project represents a Tableau project
type ProjectContentPermission ¶
type ProjectContentPermission string
ProjectContentPermission represents a projects' content permissions
const ( ProjectContentPermissionLockedToProject ProjectContentPermission = "LockedToProject" ProjectContentPermissionManagedByOwner ProjectContentPermission = "ManagedByOwner" ProjectContentPermissionLockedToProjectWithoutNested ProjectContentPermission = "LockedToProjectWithoutNested" )
type QueryOption ¶
type QueryOption func(*QueryOptions) error
func WithFilterExpression ¶
func WithFilterExpression(filterExp string) QueryOption
WithFilterExpression returns a QueryOption that sets the "filter" URL parameter.
func WithPageNumber ¶
func WithPageNumber(pageNumber int) QueryOption
WithPageNumber returns a QueryOption that sets the "pageNumber" URL parameter.
func WithPageSize ¶
func WithPageSize(pageSize int) QueryOption
WithPageSize returns a QueryOption that sets the "pageSize" URL parameter.
func WithSortExpression ¶
func WithSortExpression(sortExp string) QueryOption
WithSortExpression returns a QueryOption that sets the "sort" URL parameter.
type QueryOptions ¶
QueryOptions are options for querying projects.
type UpdateProjectRequest ¶
type UpdateProjectRequest struct { ID string `json:"id,"` ParentProjectId string `json:"parentProjectId,omitempty"` Name string `json:"name"` Description string `json:"description,omitempty"` ContentPermissions ProjectContentPermission `json:"contentPermissions,omitempty"` }
UpdateProjectRequest encapsulates the request for updating project.