Documentation ¶
Index ¶
- Constants
- Variables
- type Attendee
- func (a *Attendee) GetEmail() string
- func (a *Attendee) GetName() string
- func (a *Attendee) GetRole() string
- func (a *Attendee) GetStatus() string
- func (a *Attendee) GetType() string
- func (a *Attendee) SetEmail(e string) *Attendee
- func (a *Attendee) SetName(n string) *Attendee
- func (a *Attendee) SetRole(r string) *Attendee
- func (a *Attendee) SetStatus(s string) *Attendee
- func (a *Attendee) SetType(ct string) *Attendee
- func (a *Attendee) String() string
- type Calendar
- func (c *Calendar) GetDesc() string
- func (c *Calendar) GetEventByID(eventID string) (*Event, error)
- func (c *Calendar) GetEventByImportedID(eventID string) (*Event, error)
- func (c *Calendar) GetEvents() []Event
- func (c *Calendar) GetEventsByDate(dateTime time.Time) ([]*Event, error)
- func (c *Calendar) GetEventsByDates() map[string][]*Event
- func (c *Calendar) GetName() string
- func (c *Calendar) GetTimezone() time.Location
- func (c *Calendar) GetUpcomingEvents(n int) []Event
- func (c *Calendar) GetUrl() string
- func (c *Calendar) GetVersion() float64
- func (c *Calendar) SetDesc(desc string) *Calendar
- func (c *Calendar) SetEvent(event Event) (*Calendar, error)
- func (c *Calendar) SetName(n string) *Calendar
- func (c *Calendar) SetTimezone(tz time.Location) *Calendar
- func (c *Calendar) SetUrl(u string) *Calendar
- func (c *Calendar) SetVersion(ver float64) *Calendar
- func (c *Calendar) String() string
- type Event
- type Events
- type Parser
Constants ¶
const IcsFormat = "20060102T150405Z"
ics date time format
const IcsFormatWholeDay = "20060102"
ics date format ( describes a whole day)
const YmdHis = "2006-01-02 15:04:05"
Y-m-d H:i:S time format
Variables ¶
var DeleteTempFiles bool
if DeleteTempFiles is true , after we download ics and parse it , the local temp file will be deleted
var FilePath string
Describes the file path to the folder with the temp ics files
var MaxRepeats int
max of the rrule repeat for single event
var RepeatRuleApply bool
if RepeatRuleApply is true , the rrule will create new objects for the repeated events
Functions ¶
This section is empty.
Types ¶
type Attendee ¶
type Attendee struct {
// contains filtered or unexported fields
}
func NewAttendee ¶
func NewAttendee() *Attendee
type Calendar ¶
type Calendar struct {
// contains filtered or unexported fields
}
func NewCalendar ¶
func NewCalendar() *Calendar
func (*Calendar) GetEventByID ¶
get event by id
func (*Calendar) GetEventByImportedID ¶
get event by imported id
func (*Calendar) GetEventsByDate ¶
get all events for specified date
func (*Calendar) GetEventsByDates ¶
get all events in the calendar ordered by date
func (*Calendar) GetTimezone ¶
func (*Calendar) GetUpcomingEvents ¶
GetUpcomingEvents returns the next n-Events.
func (*Calendar) GetVersion ¶
func (*Calendar) SetVersion ¶
type Event ¶
type Event struct { Start time.Time `json:"start"` End time.Time `json:"end"` Created time.Time `json:"created"` Modified time.Time `json:"modified"` AlarmTime time.Duration `json:"alarmTime"` ImportedID string `json:"importedID"` Status string `json:"status"` Description string `json:"description"` Location string `json:"location"` Summary string `json:"summary"` RRule string `json:"rrule"` Class string `json:"class"` ID string `json:"id"` Sequence int `json:"sequence"` WholeDayEvent bool `json:"wholeDayEvent"` Attendees []*Attendee `json:"-"` Organizer *Attendee `json:"-"` InCalendar *Calendar `json:"-"` AlarmCallback func(*Event) `json:"-"` }
func (*Event) GenerateEventId ¶
generates an unique id for the event
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) GetCalendars ¶
returns the chan where will be received events
func (*Parser) GetInputChan ¶
returns the chan for calendar urls
func (*Parser) GetOutputChan ¶
returns the chan where will be received events