configfile

package
v0.65.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "metadata.json"
View Source
const DefaultDeletionsRetentionDays = 3

DefaultDeletionsRetentionDays is the default retention period for deletion records.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath(beadsDir string) string

Types

type Config

type Config struct {
	Database    string `json:"database"`
	JSONLExport string `json:"jsonl_export,omitempty"`

	// Deletions configuration
	DeletionsRetentionDays int `json:"deletions_retention_days,omitempty"` // 0 means use default (3 days)

	// Deprecated: LastBdVersion is no longer used for version tracking.
	// Version is now stored in .local_version (gitignored) to prevent
	// upgrade notifications firing after git operations reset metadata.json.
	// bd-tok: This field is kept for backwards compatibility when reading old configs.
	LastBdVersion string `json:"last_bd_version,omitempty"`
}

func DefaultConfig

func DefaultConfig() *Config

func Load

func Load(beadsDir string) (*Config, error)

func (*Config) DatabasePath

func (c *Config) DatabasePath(beadsDir string) string

func (*Config) GetDeletionsRetentionDays

func (c *Config) GetDeletionsRetentionDays() int

GetDeletionsRetentionDays returns the configured retention days, or the default if not set.

func (*Config) JSONLPath

func (c *Config) JSONLPath(beadsDir string) string

func (*Config) Save

func (c *Config) Save(beadsDir string) error

Jump to

Keyboard shortcuts

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