Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
TasksDir string
GoalsDir string
ThemesDir string
ObjectivesDir string
VisionDir string
DailyDir string
}
Config holds the configuration for storage paths.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default storage configuration.
func NewConfigFromVault ¶
NewConfigFromVault creates a Config from a Vault.
type DailyNoteStorage ¶ added in v0.25.3
type DailyNoteStorage interface {
ReadDailyNote(ctx context.Context, vaultPath string, date string) (string, error)
WriteDailyNote(ctx context.Context, vaultPath string, date string, content string) error
}
func NewDailyNoteStorage ¶ added in v0.25.3
func NewDailyNoteStorage(storageConfig *Config) DailyNoteStorage
NewDailyNoteStorage creates a storage for daily note operations only.
type DecisionStorage ¶ added in v0.25.3
type DecisionStorage interface {
ListDecisions(ctx context.Context, vaultPath string) ([]*domain.Decision, error)
FindDecisionByName(ctx context.Context, vaultPath string, name string) (*domain.Decision, error)
WriteDecision(ctx context.Context, decision *domain.Decision) error
}
func NewDecisionStorage ¶ added in v0.25.3
func NewDecisionStorage(storageConfig *Config) DecisionStorage
NewDecisionStorage creates a storage for decision operations only.
type GoalStorage ¶ added in v0.25.3
type GoalStorage interface {
WriteGoal(ctx context.Context, goal *domain.Goal) error
FindGoalByName(ctx context.Context, vaultPath string, name string) (*domain.Goal, error)
}
func NewGoalStorage ¶ added in v0.25.3
func NewGoalStorage(storageConfig *Config) GoalStorage
NewGoalStorage creates a storage for goal operations only.
type PageStorage ¶ added in v0.25.3
type PageStorage interface {
ListPages(ctx context.Context, vaultPath string, pagesDir string) ([]*domain.Task, error)
}
func NewPageStorage ¶ added in v0.25.3
func NewPageStorage(storageConfig *Config) PageStorage
NewPageStorage creates a storage for page operations only.
type Storage ¶
type Storage interface {
TaskStorage
GoalStorage
DailyNoteStorage
PageStorage
DecisionStorage
// Legacy methods — used by storage tests, not by ops.
// Keep on composed interface for backward compat; not on narrow interfaces.
ReadTask(ctx context.Context, vaultPath string, taskID domain.TaskID) (*domain.Task, error)
ListTasks(ctx context.Context, vaultPath string) ([]*domain.Task, error)
ReadGoal(ctx context.Context, vaultPath string, goalID domain.GoalID) (*domain.Goal, error)
ReadTheme(ctx context.Context, vaultPath string, themeID domain.ThemeID) (*domain.Theme, error)
WriteTheme(ctx context.Context, theme *domain.Theme) error
}
func NewStorage ¶
NewStorage creates a new markdown storage instance with custom configuration.
type TaskStorage ¶ added in v0.25.3
type TaskStorage interface {
WriteTask(ctx context.Context, task *domain.Task) error
FindTaskByName(ctx context.Context, vaultPath string, name string) (*domain.Task, error)
}
func NewTaskStorage ¶ added in v0.25.3
func NewTaskStorage(storageConfig *Config) TaskStorage
NewTaskStorage creates a storage for task operations only.
Click to show internal directories.
Click to hide internal directories.