Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppointmentItemType = "appointment" NoteItemType = "note" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Appointment ¶
type Appointment struct { Item Timezone string `json:"timezone"` Alarms []AppointmentAlarm `json:"alarms"` SkipDefaultAlarms bool `json:"skip_default_alarms"` // DeletedDates cannot be inherited since we need to use gorm's preloading // which does not support preloading on anonymous structs. DeletedDates []AppointmentDeletedDate `json:"deleted"` }
func (*Appointment) AfterCreate ¶
func (a *Appointment) AfterCreate(tx *gorm.DB) error
func (*Appointment) BeforeCreate ¶
func (a *Appointment) BeforeCreate(tx *gorm.DB) error
func (*Appointment) Name ¶
func (a *Appointment) Name() string
type AppointmentAlarm ¶
type AppointmentDeletedDate ¶
type AppointmentDeletedDate struct { DeletedDate AppointmentID uint `json:"-"` }
type Calendar ¶
type Calendar struct { Model Name string DeletedFor uint // which calendar is this the deleted calendar for? Version float64 Appointments []Appointment Notes []Note Options CalendarOptions Hidden bool }
type CalendarOptions ¶
type CalendarOptions struct { Model CalendarID uint DefaultEarlyWarning uint // how many days in advance should an appointment be alerted by? DefaultAlarms []DefaultAlarm // what alarms are defaults? DayviewTimeStart uint // when should the calendar view start from by default? DayviewTimeFinish uint // when should the calendar view finish by default? ItemWidth uint // how wide is an item (deprecated) NoticeHeight uint // how tall is a notice (deprecated) AmPm bool // display times in AM/PM? MondayFirst bool // show monday first? AllowOverflow bool // allow overflow? not sure. deprecated Visible bool // is the calendar visible IgnoreAlarms bool // ignore alarm notifications Color string // default color Timezone string // timezone of calendar (by default) SoftDelete bool // actually delete appointments or just move them to a different calendar? }
func DefaultCalendarOptions ¶
func DefaultCalendarOptions() CalendarOptions
DefaultCalendarOptions returns the default options with the current timezone (system time) patched in This is naive if this were to become a website but for now this is fine.
func (*CalendarOptions) Set ¶
func (c *CalendarOptions) Set(name, val string) error
type DefaultAlarm ¶
type DeletedDate ¶
type Item ¶
type Item struct { Model Text string `json:"text" validate:"required" gorm:"type:text"` Owner string `json:"owner"` UID string `json:"uid"` UIDPersistent bool `json:"uid_persistent" gorm:"column:uid_persistent"` RemindStart int64 `json:"remind_start"` Hilite string `json:"hilite"` Todo bool `json:"todo"` Done bool `json:"done"` Start time.Time `json:"start"` Finish time.Time `json:"finish"` RecurrenceRule string `json:"recurrence_rule"` CalendarID uint `json:"calendar_id"` DataType string `json:"data_type"` }
func (*Item) BeforeCreate ¶
type Note ¶
type Note struct { Item // DeletedDates cannot be inherited since we need to use gorm's preloading // which does not support preloading on anonymous structs. DeletedDates []NoteDeletedDate `json:"deleted"` }
func (*Note) BeforeCreate ¶
type NoteDeletedDate ¶
type NoteDeletedDate struct { DeletedDate NoteID uint `json:"-"` }
Click to show internal directories.
Click to hide internal directories.