tableau

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(accessToken string, siteId string, baseUrl string, userId string, httpClient *http.Client) *Client

func (*Client) AddUserToGroup added in v0.0.2

func (c *Client) AddUserToGroup(ctx context.Context, groupId, userId string) error

AddUserToGroup adds user to a group.

func (*Client) GetGroupUsers

func (c *Client) GetGroupUsers(ctx context.Context, groupId string, pageSize int, pageNumber int) ([]User, Pagination, error)

GetGroupUsers returns all users in a group.

func (*Client) GetGroups

func (c *Client) GetGroups(ctx context.Context, pageSize int, pageNumber int) ([]Group, Pagination, error)

GetGroups returns all groups on site.

func (*Client) GetPaginatedGroupUsers

func (c *Client) GetPaginatedGroupUsers(ctx context.Context, groupId string) ([]User, error)

GetPaginatedGroupUsers returns all users in a group - paginated.

func (*Client) GetPaginatedGroups

func (c *Client) GetPaginatedGroups(ctx context.Context) ([]Group, error)

GetPaginatedGroups returns all groups - paginated.

func (*Client) GetPaginatedUsers

func (c *Client) GetPaginatedUsers(ctx context.Context) ([]User, error)

GetPaginatedUsers returns all users - paginated.

func (*Client) GetSite

func (c *Client) GetSite(ctx context.Context) (Site, error)

GetSite returns site details of the site user is logged in to.

func (*Client) GetUsers

func (c *Client) GetUsers(ctx context.Context, pageSize int, pageNumber int) ([]User, Pagination, error)

GetUsers returns all users on site.

func (*Client) RemoveUserFromGroup added in v0.0.2

func (c *Client) RemoveUserFromGroup(ctx context.Context, groupId, userId string) error

RemoveUserFromGroup removes user from a group.

func (*Client) VerifyUser

func (c *Client) VerifyUser(ctx context.Context) error

VerifyUser returns current logged in user.

type Credentials

type Credentials struct {
	Site                      Site   `json:"site"`
	User                      User   `json:"user"`
	Token                     string `json:"token"`
	EstimatedTimeToExpiration string `json:"estimatedTimeToExpiration"`
}

func Login

func Login(ctx context.Context, baseUrl string, contentUrl string, token string, tokenName string) (Credentials, error)

Login returns credentials needed to use the API.

type Group

type Group struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Pagination

type Pagination struct {
	PageNumber     string `json:"pageNumber"`
	PageSize       string `json:"pageSize"`
	TotalAvailable string `json:"totalAvailable"`
}

type Site

type Site struct {
	ID         string `json:"id"`
	ContentURL string `json:"contentUrl"`
	Name       string `json:"name"`
}

type User

type User struct {
	Email    string `json:"email"`
	ID       string `json:"id"`
	FullName string `json:"fullName"`
	Name     string `json:"name"`
	SiteRole string `json:"siteRole"`
}

Jump to

Keyboard shortcuts

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