Documentation ¶
Index ¶
- Variables
- func NewBackendFromEntity(backendEntity entity.Backend) (backend.Backend, error)
- type WorkspaceManager
- func (m *WorkspaceManager) CreateWorkspace(ctx context.Context, requestPayload request.CreateWorkspaceRequest) (*entity.Workspace, error)
- func (m *WorkspaceManager) DeleteWorkspaceByID(ctx context.Context, id uint) error
- func (m *WorkspaceManager) GetWorkspaceByID(ctx context.Context, id uint) (*entity.Workspace, error)
- func (m *WorkspaceManager) ListWorkspaces(ctx context.Context, filter *entity.WorkspaceFilter) ([]*entity.Workspace, error)
- func (m *WorkspaceManager) UpdateWorkspaceByID(ctx context.Context, id uint, requestPayload request.UpdateWorkspaceRequest) (*entity.Workspace, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGettingNonExistingWorkspace = errors.New("the workspace does not exist") ErrUpdatingNonExistingWorkspace = errors.New("the workspace to update does not exist") ErrInvalidWorkspaceID = errors.New("the workspace ID should be a uuid") ErrBackendNotFound = errors.New("the specified backend does not exist") )
Functions ¶
Types ¶
type WorkspaceManager ¶
type WorkspaceManager struct {
// contains filtered or unexported fields
}
func NewWorkspaceManager ¶
func NewWorkspaceManager(workspaceRepo repository.WorkspaceRepository, backendRepo repository.BackendRepository, defaultBackend entity.Backend, ) *WorkspaceManager
func (*WorkspaceManager) CreateWorkspace ¶
func (m *WorkspaceManager) CreateWorkspace(ctx context.Context, requestPayload request.CreateWorkspaceRequest) (*entity.Workspace, error)
func (*WorkspaceManager) DeleteWorkspaceByID ¶
func (m *WorkspaceManager) DeleteWorkspaceByID(ctx context.Context, id uint) error
func (*WorkspaceManager) GetWorkspaceByID ¶
func (*WorkspaceManager) ListWorkspaces ¶
func (m *WorkspaceManager) ListWorkspaces(ctx context.Context, filter *entity.WorkspaceFilter) ([]*entity.Workspace, error)
func (*WorkspaceManager) UpdateWorkspaceByID ¶
func (m *WorkspaceManager) UpdateWorkspaceByID(ctx context.Context, id uint, requestPayload request.UpdateWorkspaceRequest) (*entity.Workspace, error)
Click to show internal directories.
Click to hide internal directories.