Documentation
¶
Overview ¶
Package roster manages the global registry of tracked repositories. The roster is stored at ~/.knowing/roster.json and maps repo paths to database paths and repo URLs. It is the canonical source of cross-repo identity: the indexer reads it to compute correct target hashes for cross-repo edges.
Index ¶
- func Add(absPath, repoURL string) (string, error)
- func DBForCurrentDir() string
- func DBForPath(absPath string) string
- func DBPath(repoURL string) string
- func Dir() string
- func ModuleMap() map[string]string
- func Path() string
- func Remove(absPath string) error
- func Save(r *Roster) error
- type Entry
- type Roster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBForCurrentDir ¶
func DBForCurrentDir() string
DBForCurrentDir finds the DB for the current directory by walking up to find a registered repo root.
func ModuleMap ¶
ModuleMap returns a map from Go module paths to repo URLs for all registered repos. This is the cross-repo identity map: it tells the indexer which repo URL to use when computing target hashes for cross-repo edges.
The module path is read from go.mod in each repo's path. Repos without a go.mod (non-Go repos) are included with their URL as the key.