18 lines
488 B
Go
18 lines
488 B
Go
package ticket
|
|
|
|
import "time"
|
|
|
|
// TimeStore persists time entries and the optional active timer.
|
|
type TimeStore interface {
|
|
List() ([]TimeEntry, error)
|
|
ListByTicket(ticketID string) ([]TimeEntry, error)
|
|
Create(e TimeEntry) (TimeEntry, error)
|
|
Update(e TimeEntry) error
|
|
Delete(id string) error
|
|
DeleteByProject(projectID string) error
|
|
SumByTicket(ticketID string) (time.Duration, error)
|
|
|
|
LoadActiveTimer() (*ActiveTimer, error)
|
|
SaveActiveTimer(t *ActiveTimer) error // nil clears
|
|
}
|