Documentation
¶
Overview ¶
Package notes is the per-session text file (Objective, Progress, Now) and the pin that keeps the summarizer from rewriting it.
Index ¶
- Variables
- type Notes
- func (n Notes) Get(id state.ID, key string) string
- func (n Notes) Pin(id state.ID, text textsafe.Text) error
- func (n Notes) Snooze(id state.ID, changed int64) error
- func (n Notes) Unpin(id state.ID) error
- func (n Notes) Unsnooze(id state.ID) error
- func (n Notes) Write(id state.ID, objective, progress, now textsafe.Text) error
Constants ¶
This section is empty.
Variables ¶
var ErrBlank = errors.New("nothing to pin")
ErrBlank says there is no text to pin.
Functions ¶
This section is empty.
Types ¶
type Notes ¶
Notes is the set of session files in a state folder.
func (Notes) Get ¶
Get is the value of the first "<key>:" line of the session's notes, without the spaces after the colon; empty when there is none. The text is raw: it came from a file, so it goes through textsafe before it is shown or stored again.
func (Notes) Pin ¶
Pin sets the Objective and stops the summarizer from changing it. The other lines of the file stay as they are.
func (Notes) Snooze ¶
Snooze mutes the needs-you state of a session until its state next changes: it stores when the state last changed, and the snapshot treats the mute as over once that time is no longer the one stored.