handlers

package
v0.0.0-...-36d67f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllRooms

func GetAllRooms(context echo.Context) error

GetAllRooms returns all rooms from the database.

func GetBuildingByID

func GetBuildingByID(context echo.Context) error

GetBuildingByID returns a specific building based on the given ID.

func GetBuildings

func GetBuildings(context echo.Context) error

GetBuildings returns a list of all the buildings in the database.

func GetRoomByID

func GetRoomByID(context echo.Context) error

GetRoomByID returns all info about a room

func GetRoomState

func GetRoomState(context echo.Context) error

GetRoomState calls out to an API to get the state of a room on campus.

func GetRoomsByBuilding

func GetRoomsByBuilding(context echo.Context) error

GetRoomsByBuilding returns all the rooms in a room

func SetMessenger

func SetMessenger(m *messenger.Messenger)

SetMessenger takes a Messenger and assigns it to this package variable.

func SetRoomState

func SetRoomState(context echo.Context) error

SetRoomState calls out to an API to set the state of a room on campus.

func SubscribeToRoom

func SubscribeToRoom(context echo.Context) error

SubscribeToRoom subscribes this messenger to a certain room's events.

func UnsubscribeFromRoom

func UnsubscribeFromRoom(context echo.Context) error

UnsubscribeFromRoom unsubscribes this messenger from receiving events for a certain room.

func WriteEventsToSocket

func WriteEventsToSocket()

WriteEventsToSocket writes events along a websocket connection.

Types

type Message

type Message struct {
	Message string `json:"message"`
}

Message is a message down a websocket

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL