Documentation
¶
Index ¶
- Constants
- func ConvertSiteNameToContentUrl(siteName string) string
- func DefaultTimeoutClient() *http.Client
- func NewTimeoutClient(cTimeout time.Duration, rwTimeout time.Duration, useClientCerts bool) *http.Client
- type API
- func (api *API) CreateProject(siteId string, project Project) (*Project, error)
- func (api *API) DeleteDatasource(siteId string, datasourceId string) error
- func (api *API) DeleteProject(siteId string, projectId string) error
- func (api *API) DeleteSite(siteId string) error
- func (api *API) DeleteSiteByContentUrl(contentUrl string) error
- func (api *API) DeleteSiteByName(name string) error
- func (api *API) GetDatasourceContentXML(siteId, tableauProjectId, datasourceName string) (string, error)
- func (api *API) GetProjectByID(siteId, id string) (Project, error)
- func (api *API) GetProjectByName(siteId, name string) (Project, error)
- func (api *API) GetSite(siteName string) (Site, error)
- func (api *API) GetSiteID(siteName string) (string, error)
- func (api *API) PublishTDS(siteId string, tdsMetadata Datasource, fullTds string, overwrite bool) (*Datasource, error)
- func (api *API) QueryDatasources(siteId string, datasourceName string) ([]Datasource, error)
- func (api *API) QueryProjects(siteId string) ([]Project, error)
- func (api *API) QueryProjectsByPage(siteId string, pageNum int) (QueryProjectsResponse, error)
- func (api *API) QuerySite(siteID string, includeStorage bool) (Site, error)
- func (api *API) QuerySiteByContentUrl(contentUrl string, includeStorage bool) (Site, error)
- func (api *API) QuerySiteByName(name string, includeStorage bool) (Site, error)
- func (api *API) QuerySites() ([]Site, error)
- func (api *API) QueryUserOnSite(siteId, userId string) (User, error)
- func (api *API) ServerInfo() (ServerInfo, error)
- func (api *API) Signin(username, password string, contentUrl string, userIdToImpersonate string) error
- func (api *API) Signout() error
- type AuthResponse
- type ConnectionCredentials
- type CreateProjectRequest
- type CreateProjectResponse
- type Credentials
- type Datasource
- type DatasourceCreateRequest
- type Datasources
- type ErrorResponse
- type Pagination
- type Project
- type ProjectByName
- type Projects
- type QueryDatasourceResponseRawXML
- type QueryDatasourcesResponse
- type QueryProjectsResponse
- type QuerySiteResponse
- type QuerySitesResponse
- type QueryUserOnSiteResponse
- type ServerInfo
- type ServerInfoResponse
- type SigninRequest
- type Site
- type SiteUsage
- type Sites
- type StatusError
- type TError
- type User
Constants ¶
View Source
const ApiVersion = "2.0"
View Source
const BoundaryString = "813e3160-3c95-11e5-a151-feff819cdc9f"
View Source
const DELETE = "DELETE"
View Source
const GET = "GET"
View Source
const PAGESIZE = 100
View Source
const POST = "POST"
Variables ¶
This section is empty.
Functions ¶
func ConvertSiteNameToContentUrl ¶
helper method to convert to contentUrl as most api methods use this
func DefaultTimeoutClient ¶
Types ¶
type API ¶
type API struct { Server string Version string Boundary string AuthToken string OmitDefaultSiteName bool DefaultSiteName string ConnectTimeout time.Duration ReadTimeout time.Duration Debug bool }
func (*API) CreateProject ¶
http://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_ref.htm#Create_Project%3FTocPath%3DAPI%2520Reference%7C_____14 POST /api/api-version/sites/site-id/projects
func (*API) DeleteDatasource ¶
func (*API) DeleteProject ¶
func (*API) DeleteSite ¶
func (*API) DeleteSiteByContentUrl ¶
func (*API) DeleteSiteByName ¶
func (*API) GetDatasourceContentXML ¶
func (api *API) GetDatasourceContentXML(siteId, tableauProjectId, datasourceName string) (string, error)
assumption is that the intersection of site, project, and datasource name is unique
func (*API) GetProjectByName ¶
func (*API) PublishTDS ¶
func (api *API) PublishTDS(siteId string, tdsMetadata Datasource, fullTds string, overwrite bool) (*Datasource, error)
func (*API) QueryDatasources ¶
func (api *API) QueryDatasources(siteId string, datasourceName string) ([]Datasource, error)
func (*API) QueryProjectsByPage ¶
func (api *API) QueryProjectsByPage(siteId string, pageNum int) (QueryProjectsResponse, error)
func (*API) QuerySiteByContentUrl ¶
func (*API) QuerySiteByName ¶
func (*API) QuerySites ¶
func (*API) QueryUserOnSite ¶
func (*API) ServerInfo ¶
func (api *API) ServerInfo() (ServerInfo, error)
func (*API) Signin ¶
type AuthResponse ¶
type AuthResponse struct {
Credentials *Credentials `json:"credentials,omitempty" xml:"credentials,omitempty"`
}
type ConnectionCredentials ¶
type ConnectionCredentials struct { Name string `json:"name,omitempty" xml:"name,attr,omitempty"` Password string `json:"password,omitempty" xml:"password,attr,omitempty"` Embed bool `json:"embed" xml:"embed,attr"` }
func NewConnectionCredentials ¶
func NewConnectionCredentials(name, password string, embed bool) ConnectionCredentials
type CreateProjectRequest ¶
type CreateProjectRequest struct {
Request Project `json:"project,omitempty" xml:"project,omitempty"`
}
func (CreateProjectRequest) XML ¶
func (req CreateProjectRequest) XML() ([]byte, error)
type CreateProjectResponse ¶
type CreateProjectResponse struct {
Project Project `json:"project,omitempty" xml:"project,omitempty"`
}
type Credentials ¶
type Credentials struct { Name string `json:"name,omitempty" xml:"name,attr,omitempty"` Password string `json:"password,omitempty" xml:"password,attr,omitempty"` Token string `json:"token,omitempty" xml:"token,attr,omitempty"` Site *Site `json:"site,omitempty" xml:"site,omitempty"` Impersonate *User `json:"user,omitempty" xml:"user,omitempty"` }
type Datasource ¶
type Datasource struct { ID string `json:"id,omitempty" xml:"id,attr,omitempty"` Name string `json:"name,omitempty" xml:"name,attr,omitempty"` Type string `json:"type,omitempty" xml:"type,attr,omitempty"` ConnectionCredentials *ConnectionCredentials `json:"connectionCredentials,omitempty" xml:"connectionCredentials,omitempty"` Project *Project `json:"project,omitempty" xml:"project,omitempty"` Owner *User `json:"owner,omitempty" xml:"owner,omitempty"` }
func (*Datasource) XML ¶
func (ds *Datasource) XML() ([]byte, error)
type DatasourceCreateRequest ¶
type DatasourceCreateRequest struct {
Request Datasource `json:"datasource,omitempty" xml:"datasource,omitempty"`
}
func (DatasourceCreateRequest) XML ¶
func (req DatasourceCreateRequest) XML() ([]byte, error)
type Datasources ¶
type Datasources struct {
Datasources []Datasource `json:"datasource,omitempty" xml:"datasource,omitempty"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error TError `json:"error,omitempty" xml:"error,omitempty"`
}
type Pagination ¶
type Project ¶
type ProjectByName ¶
type ProjectByName []Project
for sorting by tableau project name
func (ProjectByName) Len ¶
func (a ProjectByName) Len() int
func (ProjectByName) Less ¶
func (a ProjectByName) Less(i, j int) bool
func (ProjectByName) Swap ¶
func (a ProjectByName) Swap(i, j int)
type Projects ¶
type Projects struct {
Projects []Project `json:"project,omitempty" xml:"project,omitempty"`
}
type QueryDatasourceResponseRawXML ¶
type QueryDatasourceResponseRawXML struct {
Datasource string `xml:",innerxml"`
}
type QueryDatasourcesResponse ¶
type QueryDatasourcesResponse struct {
Datasources Datasources `json:"datasources,omitempty" xml:"datasources,omitempty"`
}
type QueryProjectsResponse ¶
type QueryProjectsResponse struct { Pagination Pagination `json:"pagination,omitempty" xml:"pagination,omitempty"` Projects Projects `json:"projects,omitempty" xml:"projects,omitempty"` }
type QuerySiteResponse ¶
type QuerySiteResponse struct {
Site Site `json:"site,omitempty" xml:"site,omitempty"`
}
func (QuerySiteResponse) XML ¶
func (req QuerySiteResponse) XML() ([]byte, error)
type QuerySitesResponse ¶
type QuerySitesResponse struct {
Sites Sites `json:"sites,omitempty" xml:"sites,omitempty"`
}
func (QuerySitesResponse) XML ¶
func (req QuerySitesResponse) XML() ([]byte, error)
type QueryUserOnSiteResponse ¶
type QueryUserOnSiteResponse struct {
User User `json:"user,omitempty" xml:"user,omitempty"`
}
func (QueryUserOnSiteResponse) XML ¶
func (req QueryUserOnSiteResponse) XML() ([]byte, error)
type ServerInfo ¶
type ServerInfoResponse ¶
type ServerInfoResponse struct {
ServerInfo ServerInfo `json:"serverInfo,omitempty" xml:"serverInfo,omitempty"`
}
type SigninRequest ¶
type SigninRequest struct {
Request Credentials `json:"credentials,omitempty" xml:"credentials,omitempty"`
}
func (SigninRequest) XML ¶
func (req SigninRequest) XML() ([]byte, error)
type Site ¶
type Site struct { ID string `json:"id,omitempty" xml:"id,attr,omitempty"` Name string `json:"name,omitempty" xml:"name,attr,omitempty"` ContentUrl string `json:"contentUrl,omitempty" xml:"contentUrl,attr,omitempty"` AdminMode string `json:"adminMode,omitempty" xml:"adminMode,attr,omitempty"` UserQuota string `json:"userQuota,omitempty" xml:"userQuota,attr,omitempty"` StorageQuota int `json:"storageQuota,omitempty" xml:"storageQuota,attr,omitempty"` State string `json:"state,omitempty" xml:"state,attr,omitempty"` StatusReason string `json:"statusReason,omitempty" xml:"statusReason,attr,omitempty"` Usage *SiteUsage `json:"usage,omitempty" xml:"usage,omitempty"` }
type StatusError ¶
func (*StatusError) Error ¶
func (e *StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.