Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AddGroupMembers(ctx context.Context, groupId, userEmail string) error
- func (c *Client) GetGroup(ctx context.Context, groupID string) (*Group, error)
- func (c *Client) GetUser(ctx context.Context, userID string) (*User, error)
- func (c *Client) GetWorkspace(ctx context.Context) (*Workspace, error)
- func (c *Client) ListFunctions(ctx context.Context, cursor string, fnType string) ([]Function, string, error)
- func (c *Client) ListGroupMembers(ctx context.Context, groupId, cursor string) ([]User, string, error)
- func (c *Client) ListGroups(ctx context.Context, cursor string) ([]Group, string, error)
- func (c *Client) ListRoles(ctx context.Context, cursor string) ([]Role, string, error)
- func (c *Client) ListSources(ctx context.Context, cursor string) ([]Source, string, error)
- func (c *Client) ListSpaces(ctx context.Context, cursor string) ([]Space, string, error)
- func (c *Client) ListUsers(ctx context.Context, cursor string) ([]User, string, error)
- func (c *Client) ListWarehouses(ctx context.Context, cursor string) ([]Warehouse, string, error)
- func (c *Client) RemoveGroupMember(ctx context.Context, groupId, userEmail string) error
- func (c *Client) UpdatePermissions(ctx context.Context, principalId, principalType string, ...) error
- type Error
- type Function
- type Group
- type Logos
- type Metadata
- type Option
- type Pagination
- type Payload
- type Permission
- type PermissionRes
- type PermissionsPayload
- type Resource
- type Role
- type Setting
- type Source
- type Space
- type User
- type Warehouse
- type Workspace
Constants ¶
View Source
const (
BaseUrl = "https://api.segmentapis.com/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddGroupMembers ¶
AddGroupMembers adds user to a group.
func (*Client) GetWorkspace ¶
GetWorkspace returns workspace of a current token.
func (*Client) ListFunctions ¶ added in v0.0.2
func (c *Client) ListFunctions(ctx context.Context, cursor string, fnType string) ([]Function, string, error)
ListFunctions returns a list of all functions.
func (*Client) ListGroupMembers ¶
func (c *Client) ListGroupMembers(ctx context.Context, groupId, cursor string) ([]User, string, error)
ListGroupMembers returns a list of all user group members.
func (*Client) ListGroups ¶
ListGroups returns a list of all user groups.
func (*Client) ListSources ¶ added in v0.0.2
ListSources returns a list of all sources.
func (*Client) ListSpaces ¶ added in v0.0.2
ListSpaces returns a list of all spaces.
func (*Client) ListWarehouses ¶ added in v0.0.2
ListWarehouses returns a list of all warehouses.
func (*Client) RemoveGroupMember ¶
RemoveGroupMember removes member from the group.
func (*Client) UpdatePermissions ¶ added in v0.0.2
func (c *Client) UpdatePermissions(ctx context.Context, principalId, principalType string, newPermissions []Permission) error
UpdatePermissions updates permissions for a user or a group.
type Function ¶ added in v0.0.2
type Function struct { ID string `json:"id"` WorkspaceID string `json:"workspaceId"` DisplayName string `json:"displayName"` Description string `json:"description"` LogoURL string `json:"logoUrl"` Code string `json:"code"` CreatedAt string `json:"createdAt"` CreatedBy string `json:"createdBy"` PreviewWebhookURL string `json:"previewWebhookUrl"` Settings []Setting `json:"settings"` Buildpack string `json:"buildpack"` CatalogID string `json:"catalogId"` BatchMaxCount int64 `json:"batchMaxCount"` ResourceType string `json:"resourceType"` }
type Group ¶
type Group struct { ID string `json:"id"` Name string `json:"name"` MemberCount int64 `json:"memberCount"` Permissions []Permission `json:"permissions,omitempty"` }
type Pagination ¶
type Permission ¶
type PermissionRes ¶ added in v0.0.2
type PermissionsPayload ¶ added in v0.0.2
type PermissionsPayload struct {
Permissions []Permission `json:"permissions"`
}
type User ¶
type User struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` Permissions []Permission `json:"permissions,omitempty"` }
Click to show internal directories.
Click to hide internal directories.