Documentation
¶
Overview ¶
Package interfaces defines the repository interface for dependency injection. This package is separate to avoid circular imports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateWorktreeOpts ¶
type CreateWorktreeOpts struct {
IDEName string
IssueInfo *issue.Info
WorkspaceName string
Remote string // Remote name to use (defaults to DefaultRemote if empty)
}
CreateWorktreeOpts contains optional parameters for worktree creation in repository mode.
type LoadWorktreeOpts ¶
LoadWorktreeOpts contains optional parameters for LoadWorktree.
type NewRepositoryParams ¶
type NewRepositoryParams struct {
Dependencies interface{} // *dependencies.Dependencies
RepositoryName string // Name/Path of the repository (optional, defaults to current directory)
}
NewRepositoryParams contains parameters for creating a new Repository instance.
type Repository ¶
type Repository interface {
Validate() error
CreateWorktree(branch string, opts ...CreateWorktreeOpts) (string, error)
DeleteWorktree(branch string, force bool) error
DeleteAllWorktrees(force bool) error
ListWorktrees() ([]status.WorktreeInfo, error)
LoadWorktree(remoteSource, branchName string) (string, error)
IsGitRepository() (bool, error)
ValidateGitConfiguration(workDir string) error
ValidateGitStatus() error
ValidateRepository(params ValidationParams) (*ValidationResult, error)
ValidateWorktreeExists(repoURL, branch string) error
ValidateOriginRemote() error
HandleRemoteManagement(repoURL string) error
ExtractHostFromURL(url string) string
DetermineProtocol(url string) string
ExtractRepoNameFromFullPath(fullPath string) string
ConstructRemoteURL(originURL, remoteSource, repoName string) (string, error)
AddWorktreeToStatus(params StatusParams) error
AutoAddRepositoryToStatus(repoURL, repoPath string) error
}
Repository defines the interface for repository operations. This interface is implemented by the concrete repository types.
type RepositoryProvider ¶
type RepositoryProvider func(params NewRepositoryParams) Repository
RepositoryProvider defines the function signature for creating repository instances.
type StatusParams ¶
type StatusParams struct {
RepoURL string
Branch string
WorktreePath string
WorkspacePath string
Remote string
IssueInfo *issue.Info
Detached bool
}
StatusParams contains parameters for status operations.
type ValidationParams ¶
ValidationParams contains parameters for repository validation.
type ValidationResult ¶
ValidationResult contains the result of repository validation.