Documentation
¶
Overview ¶
Package storage owns the layout of the storage root: where plans, findings, verdicts and every other task file live under it.
Index ¶
- Constants
- func ArchiveOf(dir string) string
- func NumberOf(path string) int
- func Numbered(dir string) []string
- func UserDir(home string) string
- func UserFilesDir() (string, error)
- type Root
- func (r Root) Archive() string
- func (r Root) Demo(id string) string
- func (r Root) Driver() string
- func (r Root) Handoffs() string
- func (r Root) Images(id string) string
- func (r Root) Instructions() string
- func (r Root) Lore() string
- func (r Root) Outside(worktree string) bool
- func (r Root) Path() string
- func (r Root) Plan(id string) string
- func (r Root) PlanArchived(id string) bool
- func (r Root) PlanLive(id string) bool
- func (r Root) Plans() string
- func (r Root) Reviews(key string) string
- func (r Root) Spikes() string
- func (r Root) TaskFileDirs() []string
- func (r Root) Verdicts(key string) string
Constants ¶
const ArchiveDir = "archive"
ArchiveDir is the subdir of plans, findings and handoffs that a finished or replaced file moves to.
const DirName = ".f10"
DirName is the directory f10 keeps its files in, in a checkout and in the user's home.
const UserDirEnv = "F10_USER_DIR"
UserDirEnv moves the user's f10 dir off ~/.f10: their own files, the ledger, every out-of-tree root, and the daemon's run dir where no other variable names one. The eval runner and tests point it elsewhere.
Variables ¶
This section is empty.
Functions ¶
func Numbered ¶
Numbered is dir's `<n>.md` files by n, so 10.md sorts after 9.md: the shape of a findings series and of a verdict series. A missing dir has none.
func UserDir ¶
UserDir is the user's own f10 dir, holding the ledger, the daemon and every out-of-tree project: UserDirEnv when set, so one setting moves all of it, else ~/.f10 under home.
func UserFilesDir ¶
UserFilesDir is UserDir for this user, which needs no home when UserDirEnv is set.
Types ¶
type Root ¶
type Root string
A Root is a storage root: main's .f10 shared by every checkout, or the out-of-tree root under ~/.f10. It is never empty outside tests, so its path methods panic on an empty one rather than resolve against the cwd.
func (Root) Instructions ¶
Instructions is the project's instructions layer at this root.
func (Root) PlanArchived ¶
PlanArchived reports an archived plan or spike report for the task with no live plan beside it, since a re-plan archives the old plan too.
func (Root) Reviews ¶
Reviews is the findings dir for key; an empty key is the dir holding every key's.
func (Root) TaskFileDirs ¶
TaskFileDirs are the dirs an agent writes task files to.