command

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: 10 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 {
	Create CreateHandler
	Update UpdateHandler
	Switch SwitchHandler
	Delete DeleteHandler
}

func NewCommands

func NewCommands(repo domain.Repository, factory *domain.Factory, runtime domain.Runtime, workspaceService proto.WorkspaceServiceServer, storageOpts *storage.Options, bus eventbus.EventBus) *Commands

type CreateCommand

type CreateCommand struct {
	WorkspaceID  string
	Image        string
	ResourceSize notebook.ResourceSize
}

type CreateHandler

type CreateHandler interface {
	Handle(context.Context, *CreateCommand) (string, error)
}

func NewCreateHandler

func NewCreateHandler(svc domain.Service, factory *domain.Factory, workspaceService proto.WorkspaceServiceServer, storageOpts *storage.Options) CreateHandler

type DeleteCommand

type DeleteCommand struct {
	ID          string
	WorkspaceID string
}

type DeleteHandler

type DeleteHandler interface {
	Handle(context.Context, *DeleteCommand) error
}

func NewDeleteHandler

func NewDeleteHandler(svc domain.Service) DeleteHandler

type SwitchCommand

type SwitchCommand struct {
	ID          string
	WorkspaceID string
	OnOff       bool // true is trun on, false is turn off
}

type SwitchHandler

type SwitchHandler interface {
	Handle(context.Context, *SwitchCommand) error
}

func NewSwitchHandler

func NewSwitchHandler(svc domain.Service) SwitchHandler

type UpdateCommand

type UpdateCommand struct {
	ID           string
	WorkspaceID  string
	Image        *string
	ResourceSize *notebook.ResourceSize
}

type UpdateHandler

type UpdateHandler interface {
	Handle(context.Context, *UpdateCommand) error
}

func NewUpdateHandler

func NewUpdateHandler(svc domain.Service) UpdateHandler

Jump to

Keyboard shortcuts

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