workspaces

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package workspaces handles the orchestration of workspace-related operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowlistDomain added in v1.1.0

type AllowlistDomain struct {
	Domain    string `json:"domain"`
	AddedBy   string `json:"added_by_email"`
	CreatedAt string `json:"created_at"`
}

AllowlistDomain represents a domain in the workspace allowlist.

type AllowlistLogEntry added in v1.1.0

type AllowlistLogEntry struct {
	CreatedAt string `json:"performed_at"`
	UserEmail string `json:"performed_by_email"`
	Action    string `json:"action"` // ADDED or REMOVED
	Domain    string `json:"domain"`
}

AllowlistLogEntry represents an entry in the allowlist audit log.

type Service

type Service struct {
	API *api.Client
}

Service provides workspace management operations.

func NewService

func NewService(apiClient *api.Client) *Service

NewService creates a new workspaces service.

func (*Service) AddAllowlist added in v1.1.0

func (s *Service) AddAllowlist(workspaceID string, domains ...string) error

AddAllowlist adds one or more domains to the workspace allowlist.

func (*Service) Create

func (s *Service) Create(name string) error

Create creates a new team workspace.

func (*Service) Invite

func (s *Service) Invite(workspaceID, email, role string) error

Invite adds a member to a workspace by encrypting the workspace key for them.

func (*Service) ListAllowlist added in v1.1.0

func (s *Service) ListAllowlist(workspaceID string) ([]AllowlistDomain, error)

ListAllowlist retrieves the allowlist for a workspace.

func (*Service) LogAllowlist added in v1.1.0

func (s *Service) LogAllowlist(workspaceID string) ([]AllowlistLogEntry, error)

LogAllowlist retrieves the audit log for the workspace allowlist.

func (*Service) Members

func (s *Service) Members(workspaceID string) ([]WorkspaceMember, error)

Members lists all members of a workspace.

func (*Service) RemoveAllowlist added in v1.1.0

func (s *Service) RemoveAllowlist(workspaceID, domain string) error

RemoveAllowlist removes a domain from the workspace allowlist.

func (*Service) RemoveMember

func (s *Service) RemoveMember(workspaceID, userID string) error

RemoveMember removes a member from a workspace by their user ID.

func (*Service) UpdateRole added in v1.1.0

func (s *Service) UpdateRole(workspaceID, userID, action string) error

UpdateRole updates the role of a member in a workspace.

type WorkspaceMember

type WorkspaceMember struct {
	ID     string `json:"id"`
	UserID string `json:"user_id"`
	Email  string `json:"email"`
	Role   string `json:"role"`
	Status string `json:"status"`
}

WorkspaceMember represents a member of a workspace.

Jump to

Keyboard shortcuts

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