export

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportCSV

func ExportCSV(w io.Writer, reminders []*reminder.Reminder) error

ExportCSV writes reminders as CSV to the writer.

func ExportJSON

func ExportJSON(w io.Writer, reminders []*reminder.Reminder) error

ExportJSON writes reminders as JSON to the writer.

func ImportCSV

func ImportCSV(r io.Reader) ([]*reminder.Reminder, error)

ImportCSV reads reminders from a CSV reader.

func ImportJSON

func ImportJSON(r io.Reader) ([]*reminder.Reminder, error)

ImportJSON reads reminders from a JSON reader.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL