Documentation ¶
Index ¶
- func GetAllRooms(context echo.Context) error
- func GetBuildingByID(context echo.Context) error
- func GetBuildings(context echo.Context) error
- func GetRoomByID(context echo.Context) error
- func GetRoomState(context echo.Context) error
- func GetRoomsByBuilding(context echo.Context) error
- func SetMessenger(m *messenger.Messenger)
- func SetRoomState(context echo.Context) error
- func SubscribeToRoom(context echo.Context) error
- func UnsubscribeFromRoom(context echo.Context) error
- func WriteEventsToSocket()
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllRooms ¶
GetAllRooms returns all rooms from the database.
func GetBuildingByID ¶
GetBuildingByID returns a specific building based on the given ID.
func GetBuildings ¶
GetBuildings returns a list of all the buildings in the database.
func GetRoomByID ¶
GetRoomByID returns all info about a room
func GetRoomState ¶
GetRoomState calls out to an API to get the state of a room on campus.
func GetRoomsByBuilding ¶
GetRoomsByBuilding returns all the rooms in a room
func SetMessenger ¶
SetMessenger takes a Messenger and assigns it to this package variable.
func SetRoomState ¶
SetRoomState calls out to an API to set the state of a room on campus.
func SubscribeToRoom ¶
SubscribeToRoom subscribes this messenger to a certain room's events.
func UnsubscribeFromRoom ¶
UnsubscribeFromRoom unsubscribes this messenger from receiving events for a certain room.
func WriteEventsToSocket ¶
func WriteEventsToSocket()
WriteEventsToSocket writes events along a websocket connection.