Documentation
¶
Index ¶
- type Index
- func (idx *Index) Count() int
- func (idx *Index) Delete(absPath string)
- func (idx *Index) Get(absPath string) (*Repo, bool)
- func (idx *Index) GetByName(name string) []*Repo
- func (idx *Index) List() []*Repo
- func (idx *Index) RemoveStale() int
- func (idx *Index) Save() error
- func (idx *Index) Upsert(repo *Repo)
- type Repo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
Repos map[string]*Repo `json:"repos"` // Key: absolute path
UpdatedAt time.Time `json:"updated_at"`
// contains filtered or unexported fields
}
Index represents the repository index
func (*Index) RemoveStale ¶
RemoveStale removes repositories that no longer exist on disk
type Repo ¶
type Repo struct {
// Identity
ID string `json:"id"` // Hash of absolute path
Name string `json:"name"` // Directory name
Root string `json:"root"` // Root identifier
RelPath string `json:"rel_path"` // Relative to root
AbsPath string `json:"abs_path"` // Full resolved path
IsWSL bool `json:"is_wsl"` // True if repo is in WSL
WSLDistro string `json:"wsl_distro"` // WSL distro name if IsWSL is true
// Git Info
RemoteURL string `json:"remote_url,omitempty"`
Host string `json:"host,omitempty"`
CurrentBranch string `json:"current_branch,omitempty"`
LastCommitTime time.Time `json:"last_commit_time,omitempty"`
LastCommitAuthor string `json:"last_commit_author,omitempty"`
LastCommitHash string `json:"last_commit_hash,omitempty"`
IsDirty bool `json:"is_dirty"`
HasUntracked bool `json:"has_untracked"`
Ahead int `json:"ahead"`
Behind int `json:"behind"`
LastGitCheckAt time.Time `json:"last_git_check_at,omitempty"`
// Metadata
PrimaryLanguage string `json:"primary_language,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
// Tracking
FirstSeenAt time.Time `json:"first_seen_at"`
LastScanAt time.Time `json:"last_scan_at"`
// Metadata source tracking
DescriptionSource string `json:"description_source,omitempty"` // "manual", "global", "llm", "auto"
TagsSource string `json:"tags_source,omitempty"`
}
Repo represents a single repository entry
Click to show internal directories.
Click to hide internal directories.