Documentation ¶
Index ¶
- type Event
- type Logger
- type Schedule
- func (s *Schedule) AddEvent(event Event)
- func (s *Schedule) GetCurrentEventsByType(kind string, now time.Time) []Event
- func (s *Schedule) GetDayEventsByType(kind string) []Event
- func (s *Schedule) GetEventsByType(kind string) []Event
- func (s *Schedule) GetNextEventsByType(kind string, now time.Time, interval time.Duration) []Event
- func (s *Schedule) GetNightEventsByType(kind string) []Event
- func (s *Schedule) SetNightCutoff(cutoff time.Time)
- type ScheduleStorage
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type string Speaker string Venue string Short string Long string Start *time.Time Finish *time.Time }
Event is a single event in conference
type Logger ¶
type Logger interface {
Log(...interface{}) error
}
Logger is a simple logging wrapper interface
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
Schedule is an implementation of ScheduleStorage
func (*Schedule) GetCurrentEventsByType ¶
GetCurrentEventsByType returns list of events by type, and only events that have started and not have finished yet
func (*Schedule) GetDayEventsByType ¶
GetDayEventsByType returns list of events by type, and only events that will start before the night time
func (*Schedule) GetEventsByType ¶
GetEventsByType returns unfiltered list of events by type
func (*Schedule) GetNextEventsByType ¶
GetNextEventsByType returns list of events by type, and only events that will start in the next interval
func (*Schedule) GetNightEventsByType ¶
GetNightEventsByType returns list of events by type, and only events that will end after the night time
func (*Schedule) SetNightCutoff ¶
SetNightCutoff sets time that separates night events from day events
type ScheduleStorage ¶
type ScheduleStorage interface { SetNightCutoff(time.Time) AddEvent(Event) GetEventsByType(string) []Event GetCurrentEventsByType(string, time.Time) []Event GetNextEventsByType(string, time.Time, time.Duration) []Event GetDayEventsByType(string) []Event GetNightEventsByType(string) []Event }
ScheduleStorage provides searching and filtering capabilities over schedule