Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func PeriodBounds ¶
PeriodBounds returns the inclusive [start, end] window for a time-period token ("today", "week", "month"), computed in now's location with the week starting Monday. Any other value (including "all" or "") returns nil bounds, meaning no time restriction. This axis is independent of the pending/ completed/all status axis, so callers can combine them (e.g. completed this week).
Types ¶
type APIToken ¶
type RecurrenceFreq ¶
type RecurrenceFreq string
const ( FreqDaily RecurrenceFreq = "daily" FreqWeekly RecurrenceFreq = "weekly" FreqMonthly RecurrenceFreq = "monthly" FreqYearly RecurrenceFreq = "yearly" )
func ParseRecurrenceFreq ¶
func ParseRecurrenceFreq(s string) (RecurrenceFreq, error)
func (RecurrenceFreq) Valid ¶
func (f RecurrenceFreq) Valid() bool
type Session ¶
type Task ¶
type Task struct {
ID string
UserID string
Title string
Description string
Priority Priority
Kind TaskKind
DueAt time.Time
DurationMinutes int
CompletedAt *time.Time
RecurrenceFreq *RecurrenceFreq
RecurrenceInterval int
RecurrenceByDay string
RecurrenceByMonthDay *int
RecurrenceEndAt *time.Time
LastNotifiedAt *time.Time
SnoozedUntil *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type TaskCompletion ¶
type TaskFilter ¶
type TaskFilter struct {
View string
Filter string
From *time.Time
To *time.Time
// CompletedFrom/CompletedTo bound completed_at (used for "completed" +
// a time period, e.g. "what did I finish this week").
CompletedFrom *time.Time
CompletedTo *time.Time
Priority *Priority
Month *time.Time
Limit int
Cursor string
}
func (*TaskFilter) ApplyPeriod ¶
func (f *TaskFilter) ApplyPeriod(period string, now time.Time)
ApplyPeriod restricts the filter to a time period, independently of its status. For "completed" the window bounds completed_at ("finished during the period"); otherwise it upper-bounds due_at so pending views still include overdue tasks up to the end of the period. An empty/"all" period is a no-op.
type User ¶
type User struct {
ID string
Email string
PasswordHash string
DisplayName string
Timezone string
Locale Locale
Theme Theme
TelegramBotToken string
TelegramAllowedIDs string
TelegramChatID string
TelegramChatUserID string
TelegramConfiguredAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
}