Documentation ¶
Index ¶
- type Event
- type Maybe
- type Model
- func (m *Model) Billed(ids []int, billed bool) Event
- func (m Model) Delete(id int) Event
- func (m *Model) Edit(id int, start Maybe[sticky.JSONTime], duration Maybe[sticky.JSONDuration], ...) Event
- func (m *Model) Insert(start time.Time, duration time.Duration, comment Maybe[string]) (int, Event)
- func (m *Model) List() []Periode
- func (m *Model) Running() (start time.Time, comment Maybe[string], ok bool)
- func (m Model) Start(comment Maybe[string]) Event
- func (m Model) Stop(comment Maybe[string]) (int, Event)
- type Periode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Maybe ¶
type Maybe[T any] struct { // contains filtered or unexported fields }
Maybe is the value or null.
The zero value is null.
func (Maybe[T]) MarshalJSON ¶
MarshalJSON encodes the value from json.
func (*Maybe[T]) UnmarshalJSON ¶
UnmarshalJSON decodes the value from json.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model holds the data in memory.
func (*Model) Edit ¶
func (m *Model) Edit(id int, start Maybe[sticky.JSONTime], duration Maybe[sticky.JSONDuration], comment Maybe[string], billed Maybe[bool]) Event
Edit changes an existing periode.
Click to show internal directories.
Click to hide internal directories.