localstore

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package localstore persists the local-first jiratui working set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTaskJournal added in v0.4.0

func DeleteTaskJournal(cfg config.Config, id string) error

DeleteTaskJournal removes one completed, abandoned, or expired local save.

func LoadTaskJournals added in v0.4.0

func LoadTaskJournals(cfg config.Config) ([]tasksave.Journal, error)

LoadTaskJournals reads all resumable task saves and restores pending image data.

func Save

func Save(cfg config.Config, state State) error

Save writes the cached working set atomically enough for small local state.

func SaveTaskJournal added in v0.4.0

func SaveTaskJournal(cfg config.Config, journal tasksave.Journal) error

SaveTaskJournal atomically checkpoints a partial save and its pending image data.

Types

type State

type State struct {
	ProjectName string             `json:"project_name"`
	Sprint      jira.Sprint        `json:"sprint"`
	Issues      []jira.Issue       `json:"issues"`
	Draft       service.DailyDraft `json:"draft"`
	SavedAt     time.Time          `json:"saved_at"`
	Revision    uint64             `json:"revision"`
}

State is the cached local working set used before Jira responds.

func Load

func Load(cfg config.Config) (State, bool, error)

Load reads the cached working set. Missing cache is not an error.

Jump to

Keyboard shortcuts

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