Documentation
¶
Index ¶
- func ExportCSV(w io.Writer, reminders []*reminder.Reminder) error
- func ExportJSON(w io.Writer, reminders []*reminder.Reminder) error
- func ImportCSV(r io.Reader) ([]*reminder.Reminder, error)
- func ImportJSON(r io.Reader) ([]*reminder.Reminder, error)
- type JSONAlarm
- type JSONRecurrenceRule
- type JSONReminder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportJSON ¶
ExportJSON writes reminders as JSON to the writer.
Types ¶
type JSONAlarm ¶ added in v0.9.0
type JSONAlarm struct {
AbsoluteDate *string `json:"absolute_date,omitempty"`
RelativeOffset string `json:"relative_offset,omitempty"` // e.g., "-15m0s"
Description string `json:"description"` // human-readable
}
JSONAlarm is the JSON-serializable representation of an alarm.
type JSONRecurrenceRule ¶ added in v0.9.0
type JSONRecurrenceRule struct {
Description string `json:"description"` // human-readable
Frequency string `json:"frequency"` // daily, weekly, monthly, yearly
Interval int `json:"interval"`
DaysOfWeek []string `json:"days_of_week,omitempty"`
}
JSONRecurrenceRule is the JSON-serializable representation of a recurrence rule.
type JSONReminder ¶
type JSONReminder struct {
ID string `json:"id"`
Name string `json:"name"`
Body string `json:"body,omitempty"`
ListName string `json:"list_name"`
DueDate *string `json:"due_date,omitempty"`
RemindMeDate *string `json:"remind_me_date,omitempty"`
CompletionDate *string `json:"completion_date,omitempty"`
CreationDate *string `json:"creation_date,omitempty"`
ModificationDate *string `json:"modification_date,omitempty"`
Priority int `json:"priority"`
PriorityLabel string `json:"priority_label"`
Flagged bool `json:"flagged"`
Completed bool `json:"completed"`
URL string `json:"url,omitempty"`
Recurring bool `json:"recurring,omitempty"`
RecurrenceRules []JSONRecurrenceRule `json:"recurrence_rules,omitempty"`
Alarms []JSONAlarm `json:"alarms,omitempty"`
}
JSONReminder is the JSON-serializable representation of a reminder.
func ToJSON ¶
func ToJSON(r *reminder.Reminder) JSONReminder
ToJSON converts a reminder to its JSON representation.
Click to show internal directories.
Click to hide internal directories.