markdown

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AreaRepo

type AreaRepo struct {
	// contains filtered or unexported fields
}

AreaRepo implements storage.AreaRepository

func (*AreaRepo) Create

func (r *AreaRepo) Create(ctx context.Context, area *domain.Area) error

Create stores a new area

func (*AreaRepo) Delete

func (r *AreaRepo) Delete(ctx context.Context, id string) error

Delete removes an area by ID

func (*AreaRepo) Get

func (r *AreaRepo) Get(ctx context.Context, id string) (*domain.Area, error)

Get retrieves an area by ID

func (*AreaRepo) GetBySlug

func (r *AreaRepo) GetBySlug(ctx context.Context, slug string) (*domain.Area, error)

GetBySlug retrieves an area by its slug

func (*AreaRepo) List

func (r *AreaRepo) List(ctx context.Context) ([]*domain.Area, error)

List returns all areas

func (*AreaRepo) Update

func (r *AreaRepo) Update(ctx context.Context, area *domain.Area) error

Update saves changes to an existing area

type Parser

type Parser struct{}

Parser handles reading and writing markdown files with YAML frontmatter

func NewParser

func NewParser() *Parser

NewParser creates a new Parser instance

func (*Parser) ParseArea

func (p *Parser) ParseArea(r io.Reader) (*domain.Area, error)

ParseArea reads a markdown file and parses it into an Area

func (*Parser) ParseAreaFromFile

func (p *Parser) ParseAreaFromFile(path string) (*domain.Area, error)

ParseAreaFromFile reads a file and parses it into an Area

func (*Parser) ParseProject

func (p *Parser) ParseProject(r io.Reader) (*domain.Project, error)

ParseProject reads a markdown file and parses it into a Project

func (*Parser) ParseProjectFromFile

func (p *Parser) ParseProjectFromFile(path string) (*domain.Project, error)

ParseProjectFromFile reads a file and parses it into a Project

func (*Parser) ParseTask

func (p *Parser) ParseTask(r io.Reader) (*domain.Task, error)

ParseTask reads a markdown file and parses it into a Task

func (*Parser) ParseTaskFromFile

func (p *Parser) ParseTaskFromFile(path string) (*domain.Task, error)

ParseTaskFromFile reads a file and parses it into a Task

type ProjectRepo

type ProjectRepo struct {
	// contains filtered or unexported fields
}

ProjectRepo implements storage.ProjectRepository

func (*ProjectRepo) Create

func (r *ProjectRepo) Create(ctx context.Context, project *domain.Project) error

Create stores a new project

func (*ProjectRepo) Delete

func (r *ProjectRepo) Delete(ctx context.Context, id string) error

Delete removes a project by ID

func (*ProjectRepo) Get

func (r *ProjectRepo) Get(ctx context.Context, id string) (*domain.Project, error)

Get retrieves a project by ID

func (*ProjectRepo) GetBySlug

func (r *ProjectRepo) GetBySlug(ctx context.Context, areaSlug, projectSlug string) (*domain.Project, error)

GetBySlug retrieves a project by its slug within an area

func (*ProjectRepo) List

func (r *ProjectRepo) List(ctx context.Context, areaID string) ([]*domain.Project, error)

List returns all projects for an area

func (*ProjectRepo) ListAll

func (r *ProjectRepo) ListAll(ctx context.Context) ([]*domain.Project, error)

ListAll returns all projects across all areas

func (*ProjectRepo) Update

func (r *ProjectRepo) Update(ctx context.Context, project *domain.Project) error

Update saves changes to an existing project

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store provides file-based storage for all domain objects

func NewStore

func NewStore(rootDir string) *Store

NewStore creates a new file-based store

func (*Store) Areas

func (s *Store) Areas() *AreaRepo

NewAreaRepo creates a new AreaRepo

func (*Store) Git

func (s *Store) Git() *git.Client

Git returns the git client

func (*Store) Initialize

func (s *Store) Initialize() error

Initialize creates the directory structure

func (*Store) Projects

func (s *Store) Projects() *ProjectRepo

NewProjectRepo creates a new ProjectRepo

func (*Store) RootDir

func (s *Store) RootDir() string

RootDir returns the root directory of the store

func (*Store) SetAutoCommit

func (s *Store) SetAutoCommit(enabled bool)

SetAutoCommit enables or disables automatic git commits

func (*Store) Tasks

func (s *Store) Tasks() *TaskRepo

NewTaskRepo creates a new TaskRepo

type TaskRepo

type TaskRepo struct {
	// contains filtered or unexported fields
}

TaskRepo implements storage.TaskRepository

func (*TaskRepo) Create

func (r *TaskRepo) Create(ctx context.Context, task *domain.Task) error

Create stores a new task

func (*TaskRepo) Delete

func (r *TaskRepo) Delete(ctx context.Context, id string) error

Delete removes a task by ID

func (*TaskRepo) Get

func (r *TaskRepo) Get(ctx context.Context, id string) (*domain.Task, error)

Get retrieves a task by ID

func (*TaskRepo) GetBySlug

func (r *TaskRepo) GetBySlug(ctx context.Context, areaSlug, projectSlug, taskSlug string) (*domain.Task, error)

GetBySlug retrieves a task by its slug within a project

func (*TaskRepo) List

func (r *TaskRepo) List(ctx context.Context, projectID string) ([]*domain.Task, error)

List returns all tasks for a project

func (*TaskRepo) ListAll

func (r *TaskRepo) ListAll(ctx context.Context) ([]*domain.Task, error)

ListAll returns all tasks

func (*TaskRepo) ListByArea

func (r *TaskRepo) ListByArea(ctx context.Context, areaID string) ([]*domain.Task, error)

ListByArea returns all tasks for an area

func (*TaskRepo) Update

func (r *TaskRepo) Update(ctx context.Context, task *domain.Task) error

Update saves changes to an existing task

type Writer

type Writer struct{}

Writer handles writing domain objects to markdown files

func NewWriter

func NewWriter() *Writer

NewWriter creates a new Writer instance

func (*Writer) MarshalArea

func (w *Writer) MarshalArea(area *domain.Area) ([]byte, error)

MarshalArea returns the markdown representation of an Area

func (*Writer) MarshalProject

func (w *Writer) MarshalProject(project *domain.Project) ([]byte, error)

MarshalProject returns the markdown representation of a Project

func (*Writer) MarshalTask

func (w *Writer) MarshalTask(task *domain.Task) ([]byte, error)

MarshalTask returns the markdown representation of a Task

func (*Writer) WriteArea

func (w *Writer) WriteArea(out io.Writer, area *domain.Area) error

WriteArea writes an Area to a writer as markdown with YAML frontmatter

func (*Writer) WriteAreaToFile

func (w *Writer) WriteAreaToFile(path string, area *domain.Area) error

WriteAreaToFile writes an Area to a file

func (*Writer) WriteProject

func (w *Writer) WriteProject(out io.Writer, project *domain.Project) error

WriteProject writes a Project to a writer as markdown with YAML frontmatter

func (*Writer) WriteProjectToFile

func (w *Writer) WriteProjectToFile(path string, project *domain.Project) error

WriteProjectToFile writes a Project to a file

func (*Writer) WriteTask

func (w *Writer) WriteTask(out io.Writer, task *domain.Task) error

WriteTask writes a Task to a writer as markdown with YAML frontmatter

func (*Writer) WriteTaskToFile

func (w *Writer) WriteTaskToFile(path string, task *domain.Task) error

WriteTaskToFile writes a Task to a file

Jump to

Keyboard shortcuts

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