paths

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package paths provides a single source of truth for all data directory paths. All persistent file locations are derived from a single root directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextAvailable

func NextAvailable(dir, name string) string

NextAvailable returns dir/name if it doesn't exist, otherwise tries name with incrementing numeric suffixes: slug1.md, slug2.md, etc.

Types

type Layout

type Layout struct {
	Root          string // e.g. "data"
	PricingCache  string // e.g. "data/pricing_cache.json"
	PromptHistory string // e.g. "data/prompt_history.jsonl"
	ConfigStore   string // e.g. "data/configs.json"
	Outputs       string // e.g. "data/outputs"
	Sessions      string // e.g. "data/sessions"
	Checkpoint    string // e.g. "data/checkpoint.json"
	Recipes       string // e.g. "data/recipes"
}

Layout holds all data file paths derived from a single root directory.

func Default

func Default() Layout

Default returns a Layout rooted at "data".

func New

func New(root string) Layout

New creates a Layout with all paths derived from the given root directory.

Jump to

Keyboard shortcuts

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