Documentation
¶
Index ¶
- Variables
- type Bot
- func (bot *Bot) GetUserEvents(userID string) ([]Event, error)
- func (bot *Bot) Monitor(updateFn func(event Event) error) error
- func (bot *Bot) StartMonitor(updateFn func(event Event) error)
- func (bot *Bot) Subscribe(uri string, userID string) (Event, error)
- func (bot *Bot) Unsubscribe(uri string, userID string) (Event, error)
- type Database
- func (db *Database) AddSubscriber(uri string, subscriberID string) error
- func (db *Database) Connect(uri string) error
- func (db *Database) CreateEvent(uri string, details schools.ClassDetails, userID string) (Event, error)
- func (db *Database) GetActiveEventsCount() (int64, error)
- func (db *Database) GetAllActiveEvents(c chan Event) error
- func (db *Database) GetAllEvents(c chan Event) error
- func (db *Database) GetEventWithURI(uri string) (Event, error)
- func (db *Database) GetEventsWithSubscriber(userID string) ([]Event, error)
- func (db *Database) RemoveEvent(uri string) error
- func (db *Database) RemoveSubscriber(uri string, subscriberID string) error
- func (db *Database) UpdateEventDetails(uri string, details schools.ClassDetails) error
- type Discord
- type Event
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchEvent = errors.New("class_notify: no classes exist with such uri")
Functions ¶
This section is empty.
Types ¶
type Bot ¶
func (*Bot) StartMonitor ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) AddSubscriber ¶
func (*Database) CreateEvent ¶
func (*Database) GetActiveEventsCount ¶
func (*Database) GetAllActiveEvents ¶
func (*Database) GetAllEvents ¶
func (*Database) GetEventsWithSubscriber ¶
func (*Database) RemoveEvent ¶
func (*Database) RemoveSubscriber ¶
func (*Database) UpdateEventDetails ¶
func (db *Database) UpdateEventDetails(uri string, details schools.ClassDetails) error
type Discord ¶
type Discord struct {
Bot *Bot
// contains filtered or unexported fields
}
func (*Discord) UpdateSubscriber ¶
Click to show internal directories.
Click to hide internal directories.