workspaces

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workspace

type Workspace interface {
	// Debug returns whether the workspace is in debug mode.
	Debug() bool
	// Yolo returns whether the workspace is in yolo mode.
	Yolo() bool
	// Cwd returns the current working directory of the workspace.
	Cwd() string
	// Data returns the data dir of the workspace.
	DataDir() string
	// LogFile returns the log file of the workspace.
	LogFile() string
	// Cleanup cleans up the workspace.
	Cleanup() error
	// Initialized returns whether the workspace is initialized.
	Initialized() bool
	// Session returns the session controller of the workspace.
	Session() (*models.Session, bool)
	// ListSessions returns the list of sessions of the workspace.
	ListSessions(ctx context.Context) ([]*models.Session, error)
}

Workspace represents a workspace in the workspaces view.

func Setup

func Setup(ctx context.Context, services services.Service, flags config.Flags, funcs ...func() error) (Workspace, error)

Setup is setting up a workspace.

func SetupWithProgressBar

func SetupWithProgressBar(ctx context.Context, flags config.Flags) (Workspace, error)

SetupWithProgressBar sets up the progress bar for the workspaces view.

type WorkspaceImpl

type WorkspaceImpl struct {
	// contains filtered or unexported fields
}

WorkspaceImpl is the implementation of the Workspace interface.

func New

func New(services services.Service, debug, yolo bool, cwd, dir string, funcs ...func() error) *WorkspaceImpl

New returns a new WorkspaceImpl.

func (*WorkspaceImpl) Cleanup

func (w *WorkspaceImpl) Cleanup() error

Cleanup cleans up the workspace.

func (*WorkspaceImpl) Cwd

func (w *WorkspaceImpl) Cwd() string

Cwd returns the current working directory of the workspace.

func (*WorkspaceImpl) DataDir

func (w *WorkspaceImpl) DataDir() string

DataDir returns the data dir of the workspace.

func (*WorkspaceImpl) Debug

func (w *WorkspaceImpl) Debug() bool

Debug returns whether the workspace is in debug mode.

func (*WorkspaceImpl) Initialized

func (w *WorkspaceImpl) Initialized() bool

Initialized returns whether the workspace is initialized.

func (*WorkspaceImpl) ListSessions

func (w *WorkspaceImpl) ListSessions(ctx context.Context) ([]*models.Session, error)

ListSessions returns the list of sessions of the workspace.

func (*WorkspaceImpl) LogFile

func (w *WorkspaceImpl) LogFile() string

LogFile returns the log file of the workspace.

func (*WorkspaceImpl) Session

func (w *WorkspaceImpl) Session() (*models.Session, bool)

Session returns the session controller of the workspace.

func (*WorkspaceImpl) Yolo

func (w *WorkspaceImpl) Yolo() bool

Yolo returns whether the workspace is in yolo mode.

Jump to

Keyboard shortcuts

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