workspace

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commands

type Commands struct {
	CreateWorkspace CreateWorkspaceHandler
	ImportWorkspace ImportWorkspaceHandler
	DeleteWorkspace DeleteWorkspaceHandler
	UpdateWorkspace UpdateWorkspaceHandler
}

func NewCommands

func NewCommands(workspaceRepo workspace.Repository, eventRepo eventbus.EventRepository, workspaceFactory *workspace.Factory, eventBus eventbus.EventBus) *Commands

type CreateWorkspaceCommand

type CreateWorkspaceCommand struct {
	Name        string `validate:"required,resName"`
	Description string `validate:"required,workspaceDesc"`
	Storage     WorkspaceStorage
}

type CreateWorkspaceHandler

type CreateWorkspaceHandler interface {
	Handle(ctx context.Context, cmd *CreateWorkspaceCommand) (string, error)
}

func NewCreateWorkspaceHandler

func NewCreateWorkspaceHandler(workspaceRepo workspace.Repository, workspaceFactory *workspace.Factory, eventBus eventbus.EventBus) CreateWorkspaceHandler

type DeleteWorkspaceCommand

type DeleteWorkspaceCommand struct {
	ID string `validate:"required"`
}

type DeleteWorkspaceHandler

type DeleteWorkspaceHandler interface {
	Handle(ctx context.Context, cmd *DeleteWorkspaceCommand) error
}

func NewDeleteWorkspaceHandler

func NewDeleteWorkspaceHandler(workspaceRepo workspace.Repository, eventBus eventbus.EventBus) DeleteWorkspaceHandler

type ImportWorkspaceCommand

type ImportWorkspaceCommand struct {
	ID       string `validate:"required"`
	FileName string `validate:"required"`
	Storage  WorkspaceStorage
}

type ImportWorkspaceHandler

type ImportWorkspaceHandler interface {
	Handle(ctx context.Context, cmd *ImportWorkspaceCommand) error
}

func NewImportWorkspaceHandler

func NewImportWorkspaceHandler(service workspace.Service, workspaceFactory *workspace.Factory) ImportWorkspaceHandler

type NFSWorkspaceStorage

type NFSWorkspaceStorage struct {
	MountPath string `validate:"required,nfsMountPath"`
}

type UpdateWorkspaceCommand

type UpdateWorkspaceCommand struct {
	ID          string  `validate:"required"`
	Name        *string `validate:"omitempty,resName"`
	Description *string `validate:"omitempty,workspaceDesc"`
}

type UpdateWorkspaceHandler

type UpdateWorkspaceHandler interface {
	Handle(ctx context.Context, cmd *UpdateWorkspaceCommand) error
}

func NewUpdateWorkspaceHandler

func NewUpdateWorkspaceHandler(workspaceRepo workspace.Repository, eventBus eventbus.EventBus) UpdateWorkspaceHandler

type WorkspaceStorage

type WorkspaceStorage struct {
	NFS *NFSWorkspaceStorage
}

Jump to

Keyboard shortcuts

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