Documentation
¶
Overview ¶
Package workspaces handles the orchestration of workspace-related operations.
Index ¶
- type AllowlistDomain
- type AllowlistLogEntry
- type Service
- func (s *Service) AddAllowlist(workspaceID string, domains ...string) error
- func (s *Service) Create(name string) error
- func (s *Service) Invite(workspaceID, email, role string) error
- func (s *Service) ListAllowlist(workspaceID string) ([]AllowlistDomain, error)
- func (s *Service) LogAllowlist(workspaceID string) ([]AllowlistLogEntry, error)
- func (s *Service) Members(workspaceID string) ([]WorkspaceMember, error)
- func (s *Service) RemoveAllowlist(workspaceID, domain string) error
- func (s *Service) RemoveMember(workspaceID, userID string) error
- func (s *Service) UpdateRole(workspaceID, userID, action string) error
- type WorkspaceMember
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 ¶
Service provides workspace management operations.
func NewService ¶
NewService creates a new workspaces service.
func (*Service) AddAllowlist ¶ added in v1.1.0
AddAllowlist adds one or more domains to the workspace allowlist.
func (*Service) Invite ¶
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
RemoveAllowlist removes a domain from the workspace allowlist.
func (*Service) RemoveMember ¶
RemoveMember removes a member from a workspace by their user ID.
func (*Service) UpdateRole ¶ added in v1.1.0
UpdateRole updates the role of a member in a workspace.