Documentation
¶
Index ¶
- Constants
- func Append(file io.Writer, entry Entry) error
- func AppendFile(path string, entry Entry) error
- func Compare(a, b Entry) int
- func DurationMap(entries []Entry, cutoff time.Time) map[string]time.Duration
- func Total(totals map[string]time.Duration) time.Duration
- type Entry
- type FileHandler
- type Option
- type ScheduleEntry
- type Summary
Constants ¶
View Source
const NUM_RECORDS = 3
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶ added in v0.6.0
func DurationMap ¶ added in v0.4.0
TODO: This function is never used...
Types ¶
type Entry ¶
type Entry struct {
Time time.Time `json:"time"`
Category string `json:"category"` // TODO: Make its own type with sub categories ex: "foo/bar"
Note string `json:"note"`
}
func ReadAllFromFile ¶ added in v0.6.0
func (*Entry) UnmarshalJSON ¶ added in v0.9.0
type FileHandler ¶ added in v0.9.0
type FileHandler struct {
// contains filtered or unexported fields
}
func NewFileHandler ¶ added in v0.9.0
func NewFileHandler(filename string) (*FileHandler, error)
func (*FileHandler) CreateEntry ¶ added in v0.9.0
func (handler *FileHandler) CreateEntry(newEntry Entry) error
func (*FileHandler) GetAllEntries ¶ added in v0.9.0
func (handler *FileHandler) GetAllEntries(options ...Option) ([]Entry, error)
type ScheduleEntry ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.