tabular

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabasePrivileges = []string{
	"MODIFY_DATABASE",
	"LIST_TABLES",
	"CREATE_TABLE",
	"FUTURE_SELECT",
	"FUTURE_UPDATE",
	"FUTURE_DROP_TABLE",
}

Functions

This section is empty.

Types

type AddRoleMemberRequest added in v0.0.11

type AddRoleMemberRequest struct {
	MemberId string `json:"memberId"`
	IsAdmin  bool   `json:"withAdmin"`
}

type Client

type Client struct {
	Endpoint   string
	HTTPClient *http.Client
}

func NewClient

func NewClient(endpoint, tokenEndpoint, credential string) (*Client, error)

func (*Client) AddRoleDatabaseGrants added in v0.0.4

func (c *Client) AddRoleDatabaseGrants(warehouseId, database, roleName string, privileges []string, withGrant bool) (err error)

func (*Client) AddRoleMembers added in v0.0.11

func (c *Client) AddRoleMembers(roleName string, adminMemberIds, memberIds []string) (err error)

func (*Client) AddRoleRelation added in v0.0.3

func (c *Client) AddRoleRelation(parentRoleName, childRoleName string) (err error)

func (*Client) CreateDatabase added in v0.0.11

func (c *Client) CreateDatabase(warehouseId, namespace string) (*Database, error)

func (*Client) CreateRole

func (c *Client) CreateRole(name string) (*Role, error)

func (*Client) DeleteDatabase added in v0.0.11

func (c *Client) DeleteDatabase(warehouseId, namespace string) (err error)

func (*Client) DeleteRole

func (c *Client) DeleteRole(roleName string, force bool) (err error)

func (*Client) DeleteRoleMembers added in v0.0.11

func (c *Client) DeleteRoleMembers(roleName string, memberIds []string) (err error)

func (*Client) DeleteRoleRelation added in v0.0.3

func (c *Client) DeleteRoleRelation(parentRoleName, childRoleName string) (err error)

func (*Client) GetDatabase added in v0.0.11

func (c *Client) GetDatabase(warehouseId, namespace string) (*Database, error)

func (*Client) GetOrgMemberIdsMap added in v0.0.11

func (c *Client) GetOrgMemberIdsMap() (map[string]string, error)

func (*Client) GetRole

func (c *Client) GetRole(roleName string) (*Role, error)

func (*Client) GetRoleDatabaseGrants added in v0.0.4

func (c *Client) GetRoleDatabaseGrants(warehouseId, database, roleName string) (*RoleDatabaseGrants, error)

func (*Client) GetWarehouses added in v0.0.7

func (c *Client) GetWarehouses() ([]Warehouse, error)

func (*Client) RenameRole added in v0.0.3

func (c *Client) RenameRole(roleName string, newRoleName string) (*Role, error)

func (*Client) RevokeRoleDatabaseGrants added in v0.0.4

func (c *Client) RevokeRoleDatabaseGrants(warehouseId, database, roleName string, privileges []string, withGrant bool) (err error)

type ClientError

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

func (*ClientError) Error

func (err *ClientError) Error() string

type CreateRole

type CreateRole struct {
	Name string
}

type CreateRoleRequest

type CreateRoleRequest struct {
	RoleName string `json:"roleName"`
}

type Database added in v0.0.11

type Database struct {
	WarehouseId string
	Namespace   []string
	Properties  map[string]string
}

type Member added in v0.0.11

type Member struct {
	Id        string
	Email     string
	WithAdmin bool
}

type Role

type Role struct {
	Id       string
	Name     string
	Children []Role
	Members  []Member
}

type RoleDatabaseGrants added in v0.0.4

type RoleDatabaseGrants struct {
	RoleName            string
	WarehouseId         string
	Database            string
	Privileges          []string
	PrivilegesWithGrant []string
}

type RoleRelation

type RoleRelation struct {
	ParentRoleId string
	ChildRoleId  string
}

type UpdateRoleRequest added in v0.0.3

type UpdateRoleRequest struct {
	RoleName string `json:"roleName"`
}

type Warehouse added in v0.0.7

type Warehouse struct {
	Id     string
	Name   string
	Region string
}

Jump to

Keyboard shortcuts

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