Documentation ¶
Overview ¶
Package workspace let's you manage workspaces
Index ¶
- type Composer
- type FileCopier
- func (f FileCopier) Copy(codebaseDir string, gitProjects []string, workspaceDir string) error
- func (f FileCopier) CopyDirOnly(sourceInfo os.FileInfo, destPath string) error
- func (f FileCopier) CopyDirRecursive(sourceInfo os.FileInfo, sourcePath, destPath string) error
- func (f FileCopier) CopyFile(sourceInfo os.FileInfo, sourcePath, destPath string) error
- func (f FileCopier) CopyNode(sourceInfo os.FileInfo, codebaseDir, sourcePath, workspaceDir string) error
- func (f FileCopier) CopySymlink(sourcePath string, destPath string) error
- func (f FileCopier) GetContainsGitProjectFunc(codebaseDir string, gitProjects []string) func(string) (bool, error)
- func (f FileCopier) GetDestPath(codebaseDir, sourcePath, workspaceDir string) (string, error)
- func (f FileCopier) GetIsGitProjectFunc(codebaseDir string, gitProjects []string) func(string) (bool, error)
- type Workspace
- func (w Workspace) Create(workspaceName string, codebaseName string) (string, error)
- func (w Workspace) DetachGitWorktrees(workspaceName string, unbindList []string) error
- func (w Workspace) Edit(editPath string) (string, string, error)
- func (w Workspace) GetCodebase(workspaceName string) (string, error)
- func (w Workspace) GetDir(workspaceName string) (string, error)
- func (w Workspace) List() map[string]string
- func (w Workspace) Recreate(workspaceName string) (string, error)
- func (w Workspace) Remove(remove string) (*config.Config, error)
- func (w *Workspace) SetTopDir(dir string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composer ¶
type Composer struct {
// contains filtered or unexported fields
}
func NewComposer ¶
func NewComposer(bm bind.PathBinder) Composer
func (Composer) Compose ¶
Compose a workspace from a codebase Returns a list of path binds in the order they were bound
func (Composer) Dismantle ¶
Dismantle a workspace Returns a list of path unbinds in the order they were unbound
type FileCopier ¶
type FileCopier struct { }
func NewFileCopier ¶
func NewFileCopier() *FileCopier
func (FileCopier) Copy ¶
func (f FileCopier) Copy(codebaseDir string, gitProjects []string, workspaceDir string) error
gitProjects is relative to codebaseDir
func (FileCopier) CopyDirOnly ¶
func (f FileCopier) CopyDirOnly(sourceInfo os.FileInfo, destPath string) error
CopyDirOnly copies a directory non-recursively sourcePath must be contained in codebaseDir
func (FileCopier) CopyDirRecursive ¶
func (f FileCopier) CopyDirRecursive(sourceInfo os.FileInfo, sourcePath, destPath string) error
func (FileCopier) CopyFile ¶
func (f FileCopier) CopyFile(sourceInfo os.FileInfo, sourcePath, destPath string) error
CopyFile copies a single file sourcePath must be contained in codebaseDir
func (FileCopier) CopyNode ¶
func (f FileCopier) CopyNode(sourceInfo os.FileInfo, codebaseDir, sourcePath, workspaceDir string) error
Copy any single file, symlink or dir non-recursively sourcePath must be contained in codebaseDir
func (FileCopier) CopySymlink ¶
func (f FileCopier) CopySymlink(sourcePath string, destPath string) error
func (FileCopier) GetContainsGitProjectFunc ¶
func (FileCopier) GetDestPath ¶
func (f FileCopier) GetDestPath(codebaseDir, sourcePath, workspaceDir string) (string, error)
func (FileCopier) GetIsGitProjectFunc ¶
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
func (Workspace) DetachGitWorktrees ¶
func (Workspace) GetCodebase ¶
GetCodebase retrieves the codebase that a workspace belongs to
Click to show internal directories.
Click to hide internal directories.