Documentation ¶
Index ¶
- Constants
- Variables
- func FieldFromBody(field, body string) (string, bool)
- func FieldFromSubject(field, subject string) string
- func ParseWeekday(wd string) (time.Weekday, bool)
- type Biweekly
- type Daily
- type Date
- func (d Date) Add(days int) Date
- func (d Date) AddDays(amount int) Date
- func (d Date) AddMonths(addMonths int) Date
- func (d Date) After(ud Date) bool
- func (d Date) Day() int
- func (d Date) DaysBetween(d2 Date) int
- func (d Date) Equal(ud Date) bool
- func (d Date) IsZero() bool
- func (d Date) String() string
- func (d Date) Time() time.Time
- func (d Date) Weekday() time.Weekday
- type Dispatcher
- type EveryNMonths
- type EveryNWeeks
- type Recurrer
- func NewRecurrer(recurStr string) Recurrer
- func ParseBiweekly(start Date, terms []string) (Recurrer, bool)
- func ParseDaily(start Date, terms []string) (Recurrer, bool)
- func ParseEveryNMonths(start Date, terms []string) (Recurrer, bool)
- func ParseEveryNWeeks(start Date, terms []string) (Recurrer, bool)
- func ParseWeekly(start Date, terms []string) (Recurrer, bool)
- type RemoteRepository
- type Task
- func (t *Task) FormatBody() string
- func (t *Task) FormatSubject() string
- func (t *Task) GenerateFromRecurrer(date Date) (*Task, error)
- func (t *Task) IsRecurrer() bool
- func (t *Task) NextMessage() *mstore.Message
- func (t *Task) RecursOn(date Date) bool
- func (t *Task) RecursToday() bool
- func (t *Task) TargetFolder() string
- type Weekdays
- type Weekly
Constants ¶
View Source
const ( FOLDER_INBOX = "INBOX" FOLDER_NEW = "New" FOLDER_RECURRING = "Recurring" FOLDER_PLANNED = "Planned" FOLDER_UNPLANNED = "Unplanned" QUOTE_PREFIX = ">" PREVIOUS_SEPARATOR = "Previous version:" FIELD_SEPARATOR = ":" SUBJECT_SEPARATOR = " - " FIELD_ID = "id" FIELD_VERSION = "version" FIELD_ACTION = "action" FIELD_PROJECT = "project" FIELD_DUE = "due" FIELD_RECUR = "recur" )
View Source
const (
DateFormat = "2006-01-02 (Monday)"
)
Variables ¶
Functions ¶
Types ¶
type Biweekly ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(msender msend.MSender) *Dispatcher
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch(t *Task) error
type EveryNMonths ¶
func (EveryNMonths) RecursOn ¶
func (enm EveryNMonths) RecursOn(date Date) bool
func (EveryNMonths) String ¶
func (enm EveryNMonths) String() string
type EveryNWeeks ¶
func (EveryNWeeks) RecursOn ¶
func (enw EveryNWeeks) RecursOn(date Date) bool
func (EveryNWeeks) String ¶
func (enw EveryNWeeks) String() string
type Recurrer ¶
func ParseBiweekly ¶
yyyy-mm-dd, biweekly, wednesday
func ParseEveryNMonths ¶
yyyy-mm-dd, every 3 months
func ParseEveryNWeeks ¶
yyyy-mm-dd, every 3 weeks
type RemoteRepository ¶
type RemoteRepository struct {
// contains filtered or unexported fields
}
func NewRemoteRepository ¶
func NewRemoteRepository(ms mstore.MStorer) *RemoteRepository
func (*RemoteRepository) Add ¶
func (rr *RemoteRepository) Add(t *Task) error
func (*RemoteRepository) CleanUp ¶
func (rr *RemoteRepository) CleanUp() error
Cleanup removes older versions of tasks
func (*RemoteRepository) FindAll ¶
func (rr *RemoteRepository) FindAll(folder string) ([]*Task, error)
func (*RemoteRepository) Update ¶
func (rr *RemoteRepository) Update(t *Task) error
type Task ¶
type Weekdays ¶
Click to show internal directories.
Click to hide internal directories.