Documentation
¶
Index ¶
- type DB
- func (d *DB) AppendSection(planID, name, content string) error
- func (d *DB) Close() error
- func (d *DB) CreateComment(c *plan.PlanComment) error
- func (d *DB) CreatePlan(p *plan.Plan) error
- func (d *DB) CreateSnapshot(planID string, changedBy string, summary string) error
- func (d *DB) CreateTask(t *plan.PlanTask) error
- func (d *DB) CreateVersion(v *plan.PlanVersion) error
- func (d *DB) DeleteSection(planID, name string) error
- func (d *DB) GetNextTaskOrder(planID string) (int, error)
- func (d *DB) GetPlan(id string) (*plan.Plan, error)
- func (d *DB) GetPlanFull(id string) (*plan.PlanFull, error)
- func (d *DB) GetSection(planID, name string) (*plan.PlanSection, error)
- func (d *DB) GetSections(planID string) ([]plan.PlanSection, error)
- func (d *DB) GetTask(id string) (*plan.PlanTask, error)
- func (d *DB) GetVersion(planID string, version int) (*plan.PlanVersion, error)
- func (d *DB) GetVersions(planID string) ([]plan.PlanVersion, error)
- func (d *DB) ListComments(planID string) ([]plan.PlanComment, error)
- func (d *DB) ListPlans(filter storage.PlanFilter) ([]plan.Plan, error)
- func (d *DB) ListTasks(planID string, filter storage.TaskFilter) ([]plan.PlanTask, error)
- func (d *DB) SearchPlans(query string) ([]plan.Plan, error)
- func (d *DB) UpdatePlan(p *plan.Plan) error
- func (d *DB) UpdateTask(t *plan.PlanTask) error
- func (d *DB) UpsertSection(s *plan.PlanSection) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements storage.Store using SQLite.
func (*DB) AppendSection ¶
AppendSection appends content to an existing section.
func (*DB) CreateComment ¶
func (d *DB) CreateComment(c *plan.PlanComment) error
CreateComment inserts a new comment.
func (*DB) CreateSnapshot ¶
CreateSnapshot creates a JSON snapshot of the current plan state and saves it as a version.
func (*DB) CreateTask ¶
CreateTask inserts a new task.
func (*DB) CreateVersion ¶
func (d *DB) CreateVersion(v *plan.PlanVersion) error
CreateVersion inserts a new version snapshot.
func (*DB) DeleteSection ¶
DeleteSection deletes a section by plan ID and name.
func (*DB) GetNextTaskOrder ¶
GetNextTaskOrder returns the next task order number for a plan.
func (*DB) GetPlanFull ¶
GetPlanFull retrieves a complete plan with sections, tasks, and comments.
func (*DB) GetSection ¶
func (d *DB) GetSection(planID, name string) (*plan.PlanSection, error)
GetSection retrieves a specific section.
func (*DB) GetSections ¶
func (d *DB) GetSections(planID string) ([]plan.PlanSection, error)
GetSections retrieves all sections for a plan.
func (*DB) GetVersion ¶
GetVersion retrieves a specific version.
func (*DB) GetVersions ¶
func (d *DB) GetVersions(planID string) ([]plan.PlanVersion, error)
GetVersions lists all versions for a plan.
func (*DB) ListComments ¶
func (d *DB) ListComments(planID string) ([]plan.PlanComment, error)
ListComments lists all comments for a plan.
func (*DB) SearchPlans ¶
SearchPlans searches plans by title and section content.
func (*DB) UpdatePlan ¶
UpdatePlan updates an existing plan's metadata.
func (*DB) UpdateTask ¶
UpdateTask updates an existing task.
func (*DB) UpsertSection ¶
func (d *DB) UpsertSection(s *plan.PlanSection) error
UpsertSection creates or updates a section.