Documentation
¶
Index ¶
- type GitOperations
- func (g *GitOperations) CleanupWorktree(worktreePath string) error
- func (g *GitOperations) CreateWorktreeFromLocal(localPath, targetPath, branch string) error
- func (g *GitOperations) CreateWorktreeFromRemote(url, targetPath, branch string) error
- func (g *GitOperations) GetBranches(repoPath string) ([]string, error)
- func (g *GitOperations) ValidateBranch(repoPath, branch string) error
- type GoWorkspaceOperations
- type Manager
- type ProgressCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitOperations ¶
type GitOperations struct{}
GitOperations handles Git-related operations for workspace setup
func NewGitOperations ¶
func NewGitOperations() *GitOperations
NewGitOperations creates a new GitOperations instance
func (*GitOperations) CleanupWorktree ¶
func (g *GitOperations) CleanupWorktree(worktreePath string) error
CleanupWorktree removes a worktree and cleans up the repository
func (*GitOperations) CreateWorktreeFromLocal ¶
func (g *GitOperations) CreateWorktreeFromLocal(localPath, targetPath, branch string) error
CreateWorktreeFromLocal creates a worktree from an existing local repository
func (*GitOperations) CreateWorktreeFromRemote ¶
func (g *GitOperations) CreateWorktreeFromRemote(url, targetPath, branch string) error
CreateWorktreeFromRemote clones a repository and creates a worktree
func (*GitOperations) GetBranches ¶
func (g *GitOperations) GetBranches(repoPath string) ([]string, error)
GetBranches returns a list of available branches for a repository
func (*GitOperations) ValidateBranch ¶
func (g *GitOperations) ValidateBranch(repoPath, branch string) error
ValidateBranch checks if a branch exists in the repository
type GoWorkspaceOperations ¶
type GoWorkspaceOperations struct{}
GoWorkspaceOperations handles Go workspace-related operations
func NewGoWorkspaceOperations ¶
func NewGoWorkspaceOperations() *GoWorkspaceOperations
NewGoWorkspaceOperations creates a new GoWorkspaceOperations instance
func (*GoWorkspaceOperations) GetGoVersion ¶
func (g *GoWorkspaceOperations) GetGoVersion(modulePath string) string
GetGoVersion returns the Go version from go.mod or a default
func (*GoWorkspaceOperations) InitializeGoWork ¶
func (g *GoWorkspaceOperations) InitializeGoWork(workspacePath string, repositories []config.Repository) error
InitializeGoWork creates a go.work file in the workspace directory
func (*GoWorkspaceOperations) ValidateGoWorkspace ¶
func (g *GoWorkspaceOperations) ValidateGoWorkspace(workspacePath string) error
ValidateGoWorkspace validates that the Go workspace is properly set up
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles workspace creation operations
func (*Manager) CreateWorkspace ¶
func (m *Manager) CreateWorkspace(ctx context.Context, req *config.WorkspaceRequest, progress ProgressCallback) error
CreateWorkspace creates a new workspace with the specified repositories
type ProgressCallback ¶
ProgressCallback is called during workspace creation to report progress