Documentation ¶
Index ¶
- Constants
- func CheckWorkspaceExist(ctx context.Context, readModel WorkspaceReadModel, workspaceID string) *errors.AppError
- type GetWorkspaceByIDQuery
- type GetWorkspaceByIDQueryHandler
- type ListWorkspacesFilter
- type ListWorkspacesHandler
- type ListWorkspacesQuery
- type NFSWorkspaceStorage
- type Queries
- type WorkspaceItem
- type WorkspaceReadModel
- type WorkspaceStorage
Constants ¶
View Source
const ( OrderByName = "Name" OrderByCreateTime = "CreatedAt" )
Field for order.
Variables ¶
This section is empty.
Functions ¶
func CheckWorkspaceExist ¶
Types ¶
type GetWorkspaceByIDQuery ¶
type GetWorkspaceByIDQuery struct {
ID string `validate:"required"`
}
type GetWorkspaceByIDQueryHandler ¶
type GetWorkspaceByIDQueryHandler interface {
Handle(ctx context.Context, command *GetWorkspaceByIDQuery) (*WorkspaceItem, error)
}
func NewGetWorkspaceByIDHandler ¶
func NewGetWorkspaceByIDHandler(workspaceReadModel WorkspaceReadModel) GetWorkspaceByIDQueryHandler
type ListWorkspacesFilter ¶
type ListWorkspacesHandler ¶
type ListWorkspacesHandler interface {
Handle(ctx context.Context, query *ListWorkspacesQuery) ([]*WorkspaceItem, int, error)
}
func NewListWorkspacesHandler ¶
func NewListWorkspacesHandler(workspaceReadModel WorkspaceReadModel) ListWorkspacesHandler
type ListWorkspacesQuery ¶
type ListWorkspacesQuery struct { Pg utils.Pagination Filter *ListWorkspacesFilter }
type NFSWorkspaceStorage ¶
type NFSWorkspaceStorage struct {
MountPath string
}
type Queries ¶
type Queries struct { GetWorkspaceByID GetWorkspaceByIDQueryHandler ListWorkspaces ListWorkspacesHandler }
func NewQueries ¶
func NewQueries(workspaceReadModel WorkspaceReadModel) *Queries
type WorkspaceItem ¶
type WorkspaceReadModel ¶
type WorkspaceReadModel interface { ListWorkspaces(ctx context.Context, pg utils.Pagination, filter *ListWorkspacesFilter) ([]*WorkspaceItem, error) CountWorkspaces(ctx context.Context, filter *ListWorkspacesFilter) (int, error) GetWorkspaceById(ctx context.Context, id string) (*WorkspaceItem, error) }
type WorkspaceStorage ¶
type WorkspaceStorage struct {
NFS *NFSWorkspaceStorage
}
Click to show internal directories.
Click to hide internal directories.