storage

package
v0.71.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const ArchiveDir = "archive"

ArchiveDir is the subdir of plans, findings and handoffs that a finished or replaced file moves to.

View Source
const DirName = ".f10"

DirName is the directory f10 keeps its files in, in a checkout and in the user's home.

View Source
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 ArchiveOf

func ArchiveOf(dir string) string

ArchiveOf is the archive subdir of a task-file dir.

func NumberOf

func NumberOf(path string) int

NumberOf is the n of a `<n>.md` path, -1 for any other name.

func Numbered

func Numbered(dir string) []string

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

func UserDir(home string) string

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

func UserFilesDir() (string, error)

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 InRepo

func InRepo(checkout string) Root

InRepo is the storage root inside a checkout.

func OutOfTree

func OutOfTree(home, project string) Root

OutOfTree is the per-project storage root under the user's home.

func (Root) Archive

func (r Root) Archive() string

Archive is where finished and replaced plans move.

func (Root) Demo

func (r Root) Demo(id string) string

Demo is the task's demo dir.

func (Root) Driver

func (r Root) Driver() string

Driver is the tracker driver kept at this root.

func (Root) Handoffs

func (r Root) Handoffs() string

Handoffs is the dir holding handoff files.

func (Root) Images

func (r Root) Images(id string) string

Images is where `task read` downloads the task's images.

func (Root) Instructions

func (r Root) Instructions() string

Instructions is the project's instructions layer at this root.

func (Root) Lore

func (r Root) Lore() string

Lore is the local lore store.

func (Root) Outside

func (r Root) Outside(worktree string) bool

Outside says the root lies outside worktree, symlinks resolved.

func (Root) Path

func (r Root) Path() string

Path is the root itself.

func (Root) Plan

func (r Root) Plan(id string) string

Plan is the task's live plan.

func (Root) PlanArchived

func (r Root) PlanArchived(id string) bool

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) PlanLive

func (r Root) PlanLive(id string) bool

PlanLive reports the task's live plan; an empty root, in tests, has none.

func (Root) Plans

func (r Root) Plans() string

Plans is the dir holding every live plan.

func (Root) Reviews

func (r Root) Reviews(key string) string

Reviews is the findings dir for key; an empty key is the dir holding every key's.

func (Root) Spikes

func (r Root) Spikes() string

Spikes is the dir holding spike reports.

func (Root) TaskFileDirs

func (r Root) TaskFileDirs() []string

TaskFileDirs are the dirs an agent writes task files to.

func (Root) Verdicts

func (r Root) Verdicts(key string) string

Verdicts is the verdict dir for key; an empty key is the dir holding every key's.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL