workspace

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 NewManager

func NewManager() *Manager

NewManager creates a new workspace manager

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

type ProgressCallback func(step, total int, currentTask, logMessage string)

ProgressCallback is called during workspace creation to report progress

Jump to

Keyboard shortcuts

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