Documentation
¶
Overview ¶
Package workspace provides workspace management functionality for CM.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Workspace file errors. ErrFailedToCheckWorkspaceFiles = errors.New("failed to check for workspace files") ErrWorkspaceFileNotFound = errors.New("workspace file not found") ErrInvalidWorkspaceFile = errors.New("invalid workspace file") ErrNoRepositoriesFound = errors.New("no repositories found in workspace") // Repository errors. ErrRepositoryNotFound = errors.New("repository not found in workspace") ErrRepositoryNotClean = errors.New("repository is not clean") // Worktree errors. ErrWorktreeExists = errors.New("worktree already exists") ErrWorktreeNotInStatus = errors.New("worktree not found in status file") // Directory and file system errors. ErrDirectoryExists = errors.New("directory already exists") // User interaction errors. ErrDeletionCancelled = errors.New("deletion cancelled by user") )
Error definitions for workspace package.
Functions ¶
This section is empty.
Types ¶
type NewWorkspaceParams ¶
type NewWorkspaceParams struct {
FS fs.FS
Git git.Git
Config config.Config
StatusManager status.Manager
Logger logger.Logger
Prompt prompt.Prompter
WorktreeProvider WorktreeProvider
HookManager hooks.HookManagerInterface
}
NewWorkspaceParams contains parameters for creating a new Workspace instance.
type Workspace ¶
type Workspace interface {
mode.Interface
// Workspace-specific methods
Load(force bool) error
DetectWorkspaceFiles() ([]string, error)
ParseFile(filename string) (Config, error)
GetName(config Config, filename string) string
HandleMultipleFiles(workspaceFiles []string, force bool) (string, error)
ValidateWorkspaceReferences() error
}
Workspace interface provides workspace management capabilities. It implements the common Interface and adds workspace-specific methods.
func NewWorkspace ¶
func NewWorkspace(params NewWorkspaceParams) Workspace
NewWorkspace creates a new Workspace instance.
type WorktreeProvider ¶
type WorktreeProvider func(params worktree.NewWorktreeParams) worktree.Worktree
WorktreeProvider is a function type that creates worktree instances.
type WorktreeWithRepo ¶
type WorktreeWithRepo struct {
status.WorktreeInfo
RepoURL string
RepoPath string
}
WorktreeWithRepo represents a worktree with its associated repository information.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.