Documentation
¶
Index ¶
- type Workspace
- type WorkspaceImpl
- func (w *WorkspaceImpl) Cleanup() error
- func (w *WorkspaceImpl) Cwd() string
- func (w *WorkspaceImpl) DataDir() string
- func (w *WorkspaceImpl) Debug() bool
- func (w *WorkspaceImpl) Initialized() bool
- func (w *WorkspaceImpl) ListSessions(ctx context.Context) ([]*models.Session, error)
- func (w *WorkspaceImpl) LogFile() string
- func (w *WorkspaceImpl) Session() (*models.Session, bool)
- func (w *WorkspaceImpl) Yolo() bool
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.
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.