Documentation
¶
Index ¶
- func ApplyProjectTopology(registration model.WorkspaceRegistration, project model.ProjectFile) model.WorkspaceRegistration
- func DefaultEntrypointForRepo(project model.ProjectFile, repoID string) (model.WorkspaceEntrypoint, bool)
- func DefaultIgnorePatterns() []string
- func DetectWorkspace(path string) (model.WorkspaceRegistration, error)
- func DetectWorkspaceLayout(path string, explicitName string) (model.WorkspaceRegistration, model.ProjectFile, error)
- func EntrypointsForRepo(project model.ProjectFile, repoID string) []model.WorkspaceEntrypoint
- func ExplicitWorkspaceCWDWarnings(selector string, callerCWD string) []string
- func FindEntrypoint(project model.ProjectFile, selector string) (model.WorkspaceEntrypoint, bool)
- func FindRepo(project model.ProjectFile, selector string) (model.WorkspaceRepo, bool)
- func FindRepoByFile(project model.ProjectFile, workspaceRoot string, filePath string) (model.WorkspaceRepo, bool)
- func GlobalDir() (string, error)
- func ListWorkspaces() ([]model.WorkspaceRegistration, error)
- func LoadProjectFile(root string) (model.ProjectFile, error)
- func LoadProjectSummary(root string, registration model.WorkspaceRegistration) (model.ProjectFile, error)
- func LoadProjectTopology(root string, registration model.WorkspaceRegistration) (model.ProjectFile, error)
- func LoadRegistry() (model.RegistryFile, error)
- func ProjectConfigPath(root string) string
- func RegisterWorkspace(name string, registration model.WorkspaceRegistration) (model.RegistryFile, error)
- func RegistryPath() (string, error)
- func RemoveWorkspace(name string) error
- func ResolveWorkspace(nameOrPath string) (model.WorkspaceRegistration, error)
- func SaveProjectFile(root string, project model.ProjectFile) error
- func SaveRegistry(registry model.RegistryFile) error
- func ScanCandidates(startDir string) ([]model.WorkspaceRegistration, error)
- func WorkspaceStateDir(root string) string
- type BinaryCandidate
- type GitCaseCollision
- type IgnoreMatcher
- type ResolutionSource
- type WorkspaceDoctorAction
- type WorkspaceDoctorReport
- type WorkspacePruneReport
- type WorkspaceResolution
- type WorkspaceResolutionError
- type WorkspaceRootGroup
- type WorkspaceStalePath
- type WorkspaceWorktreeFamily
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyProjectTopology ¶
func ApplyProjectTopology(registration model.WorkspaceRegistration, project model.ProjectFile) model.WorkspaceRegistration
func DefaultEntrypointForRepo ¶
func DefaultEntrypointForRepo(project model.ProjectFile, repoID string) (model.WorkspaceEntrypoint, bool)
func DefaultIgnorePatterns ¶
func DefaultIgnorePatterns() []string
func DetectWorkspace ¶
func DetectWorkspace(path string) (model.WorkspaceRegistration, error)
func DetectWorkspaceLayout ¶
func DetectWorkspaceLayout(path string, explicitName string) (model.WorkspaceRegistration, model.ProjectFile, error)
func EntrypointsForRepo ¶
func EntrypointsForRepo(project model.ProjectFile, repoID string) []model.WorkspaceEntrypoint
func ExplicitWorkspaceCWDWarnings ¶ added in v0.3.0
func FindEntrypoint ¶
func FindEntrypoint(project model.ProjectFile, selector string) (model.WorkspaceEntrypoint, bool)
func FindRepo ¶
func FindRepo(project model.ProjectFile, selector string) (model.WorkspaceRepo, bool)
func FindRepoByFile ¶
func FindRepoByFile(project model.ProjectFile, workspaceRoot string, filePath string) (model.WorkspaceRepo, bool)
func ListWorkspaces ¶
func ListWorkspaces() ([]model.WorkspaceRegistration, error)
func LoadProjectFile ¶
func LoadProjectFile(root string) (model.ProjectFile, error)
func LoadProjectSummary ¶ added in v0.3.0
func LoadProjectSummary(root string, registration model.WorkspaceRegistration) (model.ProjectFile, error)
func LoadProjectTopology ¶
func LoadProjectTopology(root string, registration model.WorkspaceRegistration) (model.ProjectFile, error)
func LoadRegistry ¶
func LoadRegistry() (model.RegistryFile, error)
func ProjectConfigPath ¶
func RegisterWorkspace ¶
func RegisterWorkspace(name string, registration model.WorkspaceRegistration) (model.RegistryFile, error)
func RegistryPath ¶
func RemoveWorkspace ¶
func ResolveWorkspace ¶
func ResolveWorkspace(nameOrPath string) (model.WorkspaceRegistration, error)
func SaveProjectFile ¶
func SaveProjectFile(root string, project model.ProjectFile) error
func SaveRegistry ¶
func SaveRegistry(registry model.RegistryFile) error
func ScanCandidates ¶
func ScanCandidates(startDir string) ([]model.WorkspaceRegistration, error)
func WorkspaceStateDir ¶
Types ¶
type BinaryCandidate ¶ added in v0.3.0
type BinaryCandidate struct {
Path string `json:"path"`
Active bool `json:"active,omitempty"`
Revision string `json:"revision,omitempty"`
Modified string `json:"modified,omitempty"`
GOOS string `json:"goos,omitempty"`
GOARCH string `json:"goarch,omitempty"`
Warning string `json:"warning,omitempty"`
}
type GitCaseCollision ¶ added in v0.3.0
type IgnoreMatcher ¶
type IgnoreMatcher struct {
// contains filtered or unexported fields
}
func LoadIgnoreMatcher ¶
func LoadIgnoreMatcher(root string, extraPatterns []string) (*IgnoreMatcher, error)
func (*IgnoreMatcher) ShouldIgnore ¶
func (m *IgnoreMatcher) ShouldIgnore(root, path string) bool
type ResolutionSource ¶ added in v0.3.0
type ResolutionSource string
const ( ResolutionSourceExplicit ResolutionSource = "explicit" ResolutionSourcePath ResolutionSource = "path" ResolutionSourceCallerCWD ResolutionSource = "caller_cwd" ResolutionSourceLastWorkspace ResolutionSource = "last_workspace" )
type WorkspaceDoctorAction ¶ added in v0.3.0
type WorkspaceDoctorReport ¶ added in v0.3.0
type WorkspaceDoctorReport struct {
AliasesSharingRoot []WorkspaceRootGroup `json:"aliases_sharing_root,omitempty"`
WorktreeFamilies []WorkspaceWorktreeFamily `json:"worktree_families,omitempty"`
GitCaseCollisions []GitCaseCollision `json:"git_case_collisions,omitempty"`
StalePaths []WorkspaceStalePath `json:"stale_paths,omitempty"`
BinaryShadowing []BinaryCandidate `json:"binary_shadowing,omitempty"`
Health string `json:"health,omitempty"`
NextActions []WorkspaceDoctorAction `json:"next_actions,omitempty"`
Suggestions []string `json:"suggestions,omitempty"`
}
func DoctorWorkspaces ¶ added in v0.3.0
func DoctorWorkspaces() (WorkspaceDoctorReport, error)
type WorkspacePruneReport ¶ added in v0.3.0
type WorkspacePruneReport struct {
DryRun bool `json:"dry_run"`
Registry string `json:"registry,omitempty"`
Candidates []WorkspaceStalePath `json:"candidates,omitempty"`
Removed []WorkspaceStalePath `json:"removed,omitempty"`
Skipped []WorkspaceStalePath `json:"skipped,omitempty"`
RemovedCount int `json:"removed_count"`
}
func PruneStaleWorkspaces ¶ added in v0.3.0
func PruneStaleWorkspaces(apply bool) (WorkspacePruneReport, error)
type WorkspaceResolution ¶ added in v0.3.0
type WorkspaceResolution struct {
Registration model.WorkspaceRegistration
Source ResolutionSource
Warnings []string
}
func ResolveWorkspaceSelection ¶ added in v0.3.0
func ResolveWorkspaceSelection(nameOrPath string, callerCWD string) (WorkspaceResolution, error)
type WorkspaceResolutionError ¶ added in v0.4.2
type WorkspaceResolutionError struct {
Selector string
CallerCWD string
Fallback WorkspaceResolution
FallbackAvailable bool
Warnings []string
}
func AsWorkspaceResolutionError ¶ added in v0.4.2
func AsWorkspaceResolutionError(err error) (*WorkspaceResolutionError, bool)
func (*WorkspaceResolutionError) Error ¶ added in v0.4.2
func (e *WorkspaceResolutionError) Error() string
type WorkspaceRootGroup ¶ added in v0.3.0
type WorkspaceRootGroup struct {
Root string `json:"root"`
AliasCount int `json:"alias_count"`
Aliases []string `json:"aliases"`
CanonicalAlias string `json:"canonical_alias"`
SelectionReason string `json:"selection_reason"`
Kind string `json:"kind,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
func GroupWorkspacesByRoot ¶ added in v0.3.0
func GroupWorkspacesByRoot() ([]WorkspaceRootGroup, error)
type WorkspaceStalePath ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.