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
- func (e *Event) Clone() *Event
- func (e *Event) GenerateEventId() string
- func (e *Event) GetAlarmFunction() func(*Event)
- func (e *Event) GetAlarmTime() time.Duration
- func (e *Event) GetAttendees() []*Attendee
- func (e *Event) GetCalendar() *Calendar
- func (e *Event) GetClass() string
- func (e *Event) GetCreated() time.Time
- func (e *Event) GetDescription() string
- func (e *Event) GetEnd() time.Time
- func (e *Event) GetGeo() *Geo
- func (e *Event) GetID() string
- func (e *Event) GetImportedID() string
- func (e *Event) GetLastModified() time.Time
- func (e *Event) GetLocation() string
- func (e *Event) GetOrganizer() *Attendee
- func (e *Event) GetRRule() string
- func (e *Event) GetSequence() int
- func (e *Event) GetStart() time.Time
- func (e *Event) GetStatus() string
- func (e *Event) GetSummary() string
- func (e *Event) GetUrl() string
- func (e *Event) GetWholeDayEvent() bool
- func (e *Event) IsWholeDay() bool
- func (e *Event) SetAlarm(alarmAfter time.Duration, callback func(*Event)) *Event
- func (e *Event) SetAttendee(a *Attendee) *Event
- func (e *Event) SetAttendees(attendees []*Attendee) *Event
- func (e *Event) SetCalendar(cal *Calendar) *Event
- func (e *Event) SetClass(class string) *Event
- func (e *Event) SetCreated(created time.Time) *Event
- func (e *Event) SetDescription(description string) *Event
- func (e *Event) SetEnd(end time.Time) *Event
- func (e *Event) SetGeo(geo *Geo) *Event
- func (e *Event) SetID(id string) *Event
- func (e *Event) SetImportedID(id string) *Event
- func (e *Event) SetLastModified(modified time.Time) *Event
- func (e *Event) SetLocation(location string) *Event
- func (e *Event) SetOrganizer(a *Attendee) *Event
- func (e *Event) SetRRule(rrule string) *Event
- func (e *Event) SetSequence(sq int) *Event
- func (e *Event) SetStart(start time.Time) *Event
- func (e *Event) SetStatus(status string) *Event
- func (e *Event) SetSummary(summary string) *Event
- func (e *Event) SetUrl(url string) *Event
- func (e *Event) SetWholeDayEvent(wholeDay bool) *Event
- func (e *Event) String() string
- type Events
- type Geo
- 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 {
// contains filtered or unexported fields
}
func (*Event) GenerateEventId ¶
generates an unique id for the event
func (*Event) GetAlarmFunction ¶
func (*Event) GetAlarmTime ¶
func (*Event) GetAttendees ¶
func (*Event) GetCalendar ¶
func (*Event) GetCreated ¶
func (*Event) GetDescription ¶
func (*Event) GetImportedID ¶
func (*Event) GetLastModified ¶
func (*Event) GetLocation ¶
func (*Event) GetOrganizer ¶
func (*Event) GetSequence ¶
func (*Event) GetSummary ¶
func (*Event) GetWholeDayEvent ¶
func (*Event) IsWholeDay ¶
func (*Event) SetAttendee ¶
func (*Event) SetAttendees ¶
func (*Event) SetCalendar ¶
func (*Event) SetDescription ¶
func (*Event) SetImportedID ¶
func (*Event) SetLocation ¶
func (*Event) SetOrganizer ¶
func (*Event) SetSequence ¶
func (*Event) SetSummary ¶
func (*Event) SetWholeDayEvent ¶
type Geo ¶
type Geo struct {
// contains filtered or unexported fields
}
Geo has latitude and longitude from the the GEO property of an 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