gotabgo

package module
v0.0.0-...-9833956 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

goTabGo is an idiomatic Go Tableau API library

Documentation

Index

Constants

View Source
const (
	TABLEAU_AUTH_HEADER = "X-Tableau-Auth"
)

Variables

View Source
var (
	DefaultApiVer = "2.4"
)

Functions

func GetOutboundIP

func GetOutboundIP(dialAddress string) net.IP

Types

type ApiError

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

func (*ApiError) Error

func (e *ApiError) Error() string

type ContentType

type ContentType int
const (
	Json ContentType = iota
	Xml
	Form
)

func ContentTypeString

func ContentTypeString(s string) (c ContentType, e error)

func (ContentType) String

func (r ContentType) String() string

type TabApi

type TabApi struct {
	UseTLS      bool
	Server      string
	ApiVersion  string
	SiteID      string
	ContentType ContentType
	// contains filtered or unexported fields
}

func NewTabApi

func NewTabApi(server, version string, useTLS bool, cType ContentType) (*TabApi, error)

func (*TabApi) CreateSite

func (t *TabApi) CreateSite(site model.SiteType) (st *model.SiteType, err error)

func (*TabApi) GetViewById

func (t *TabApi) GetViewById(id string) (view *model.View, err error)

func (*TabApi) ListReportsForUser

func (t *TabApi) ListReportsForUser(u *model.User) (w []model.Workbook, err error)

func (*TabApi) NewTrustedTicket

func (t *TabApi) NewTrustedTicket(ttr model.TrustedTicketRequest) (tt model.TrustedTicket, err error)

func (*TabApi) QuerySites

func (t *TabApi) QuerySites() (w []model.SiteType, err error)

func (*TabApi) QueryUserOnSite

func (t *TabApi) QueryUserOnSite(user string) (u *model.User, err error)

func (*TabApi) ServerInfo

func (t *TabApi) ServerInfo() (si *model.ServerInfo, err error)

func (*TabApi) Signin

func (t *TabApi) Signin(username, password, contentUrl, impersonateUser string) (err error)

Signin authenticates a user and retrieves an auth token

func (*TabApi) Signout

func (t *TabApi) Signout() (err error)

type TsResponse

type TsResponse struct {
	XMLName xml.Name `json:"-" xml:"tsResponse"`

	ServerInfo  model.ServerInfo  `json:"serverInfo" xml:"serverInfo"`
	Credentials model.Credentials `json:"credentials" xml:"credentials"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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