Documentation
¶
Index ¶
- type Service
- func (s *Service) CheckPermission(userID, resourceType, resourceID, action string) (bool, error)
- func (s *Service) CheckResourceOwnership(userID, resourceType, resourceID string) (bool, error)
- func (s *Service) CreateSandbox(ctx context.Context, sandbox *types.SandboxMetadata) error
- func (s *Service) CreateUser(ctx context.Context, user *types.User) error
- func (s *Service) DeleteSandbox(ctx context.Context, sandboxID string) error
- func (s *Service) DeleteUser(ctx context.Context, userID string) error
- func (s *Service) GetSandbox(ctx context.Context, sandboxID string) (*types.SandboxMetadata, error)
- func (s *Service) GetUser(ctx context.Context, userID string) (*types.User, error)
- func (s *Service) GetUserByAPIKey(ctx context.Context, apiKey string) (*types.User, error)
- func (s *Service) ListSandboxes(ctx context.Context, userID string, limit, offset int) ([]*types.SandboxMetadata, *types.PaginationMetadata, error)
- func (s *Service) Ping(ctx context.Context) error
- func (s *Service) Start() error
- func (s *Service) Stop() error
- func (s *Service) UpdateSandbox(ctx context.Context, sandboxID string, updates map[string]interface{}) error
- func (s *Service) UpdateUser(ctx context.Context, userID string, updates map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service handles database operations
func (*Service) CheckPermission ¶
CheckPermission checks if a user has permission to perform an action on a resource
func (*Service) CheckResourceOwnership ¶
CheckResourceOwnership checks if a user owns a resource
func (*Service) CreateSandbox ¶
CreateSandbox creates a new sandbox
func (*Service) CreateUser ¶
CreateUser creates a new user
func (*Service) DeleteSandbox ¶
DeleteSandbox deletes a sandbox
func (*Service) DeleteUser ¶
DeleteUser deletes a user
func (*Service) GetSandbox ¶
GetSandbox gets a sandbox by ID
func (*Service) GetUserByAPIKey ¶
GetUserByAPIKey gets the user associated with an API key
func (*Service) ListSandboxes ¶
func (s *Service) ListSandboxes(ctx context.Context, userID string, limit, offset int) ([]*types.SandboxMetadata, *types.PaginationMetadata, error)
ListSandboxes lists sandboxes for a user
Click to show internal directories.
Click to hide internal directories.