storage

package
v0.0.0-...-8e2590b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListOptions

type ListOptions struct {
	Filter core.Filter
	Limit  int
}

type Repository

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

func Open

func Open(ctx context.Context, path string) (*Repository, error)

func (*Repository) AllTasks

func (r *Repository) AllTasks(ctx context.Context) ([]core.Task, error)

func (*Repository) ApplyTombstone

func (r *Repository) ApplyTombstone(ctx context.Context, t Tombstone) error

func (*Repository) Close

func (r *Repository) Close() error

func (*Repository) CreateTask

func (r *Repository) CreateTask(ctx context.Context, t core.Task) (core.Task, error)

func (*Repository) DeleteAllTasks

func (r *Repository) DeleteAllTasks(ctx context.Context) error

func (*Repository) DeleteTask

func (r *Repository) DeleteTask(ctx context.Context, id string) error

func (*Repository) GetTask

func (r *Repository) GetTask(ctx context.Context, id string) (core.Task, error)

func (*Repository) ListTags

func (r *Repository) ListTags(ctx context.Context) ([]string, error)

func (*Repository) ListTasks

func (r *Repository) ListTasks(ctx context.Context, opt ListOptions) ([]core.Task, error)

func (*Repository) Prune

func (r *Repository) Prune(ctx context.Context) error

func (*Repository) SyncSnapshot

func (r *Repository) SyncSnapshot(ctx context.Context) ([]core.Task, []Tombstone, error)

func (*Repository) UpdateTask

func (r *Repository) UpdateTask(ctx context.Context, id string, patch core.TaskPatch) (core.Task, error)

func (*Repository) UpsertTask

func (r *Repository) UpsertTask(ctx context.Context, t core.Task) error

UpsertTask inserts or updates a task by ID. The update is applied only if incoming UpdatedAt is newer than the stored record (last-writer-wins).

func (*Repository) Vacuum

func (r *Repository) Vacuum(ctx context.Context) error

type Tombstone

type Tombstone struct {
	ID        string
	DeletedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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