package store import "time" // Entry is one tock activity for a day. type Entry struct { Key string // "YYYY-MM-DD-NN" — tock's date-index Start time.Time // wall clock End time.Time // zero => running Project string Description string Tags []string Notes string Duration time.Duration } // Running reports whether the entry has no end time yet. func (e Entry) Running() bool { return e.End.IsZero() } // Store is the tock adapter. tock stays the source of truth. type Store interface { Day(date string) ([]Entry, error) Add(e Entry) error Remove(key string) error SafeReplace(key string, updated, original Entry) error }