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 Storage ¶
type Storage interface {
// Task operations
ReadTask(ctx context.Context, vaultPath string, taskID domain.TaskID) (*domain.Task, error)
WriteTask(ctx context.Context, task *domain.Task) error
FindTaskByName(ctx context.Context, vaultPath string, name string) (*domain.Task, error)
ListTasks(ctx context.Context, vaultPath string) ([]*domain.Task, error)
// Goal operations
ReadGoal(ctx context.Context, vaultPath string, goalID domain.GoalID) (*domain.Goal, error)
WriteGoal(ctx context.Context, goal *domain.Goal) error
FindGoalByName(ctx context.Context, vaultPath string, name string) (*domain.Goal, error)
// Theme operations
ReadTheme(ctx context.Context, vaultPath string, themeID domain.ThemeID) (*domain.Theme, error)
WriteTheme(ctx context.Context, theme *domain.Theme) error
// Daily note operations
ReadDailyNote(ctx context.Context, vaultPath string, date string) (string, error)
WriteDailyNote(ctx context.Context, vaultPath string, date string, content string) error
// Generic page operations
ListPages(ctx context.Context, vaultPath string, pagesDir string) ([]*domain.Task, error)
}
func NewStorage ¶
NewStorage creates a new markdown storage instance with custom configuration.
Click to show internal directories.
Click to hide internal directories.