Documentation ¶
Index ¶
- type BuildingController
- func (ctrl *BuildingController) CreateBuilding(res http.ResponseWriter, req *http.Request)
- func (ctrl *BuildingController) CreateRoom(res http.ResponseWriter, req *http.Request)
- func (ctrl *BuildingController) FindBuilding(res http.ResponseWriter, req *http.Request)
- func (ctrl *BuildingController) FindBuildingId(res http.ResponseWriter, req *http.Request)
- func (ctrl *BuildingController) Register()
- func (ctrl *BuildingController) Remove(res http.ResponseWriter, req *http.Request)
- func (ctrl *BuildingController) UpdateBuilding(res http.ResponseWriter, req *http.Request)
- type ControllerError
- type DatapointController
- type HealthController
- type HubController
- type RoomController
- func (ctrl *RoomController) Create(res http.ResponseWriter, req *http.Request)
- func (ctrl *RoomController) CreateRoster(res http.ResponseWriter, req *http.Request)
- func (ctrl *RoomController) Find(res http.ResponseWriter, req *http.Request)
- func (ctrl *RoomController) FindRoomID(res http.ResponseWriter, req *http.Request)
- func (ctrl *RoomController) Register()
- func (ctrl *RoomController) Update(res http.ResponseWriter, req *http.Request)
- type RoomLog
- type SensorController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildingController ¶
type BuildingController struct {
// contains filtered or unexported fields
}
func NewBuildingController ¶
func NewBuildingController(router *mux.Router, r *render.Render, db *mgo.Database, roomCtrl *RoomController) *BuildingController
func (*BuildingController) CreateBuilding ¶
func (ctrl *BuildingController) CreateBuilding(res http.ResponseWriter, req *http.Request)
func (*BuildingController) CreateRoom ¶
func (ctrl *BuildingController) CreateRoom(res http.ResponseWriter, req *http.Request)
TODO move to RoomCtrl
func (*BuildingController) FindBuilding ¶
func (ctrl *BuildingController) FindBuilding(res http.ResponseWriter, req *http.Request)
func (*BuildingController) FindBuildingId ¶
func (ctrl *BuildingController) FindBuildingId(res http.ResponseWriter, req *http.Request)
func (*BuildingController) Register ¶
func (ctrl *BuildingController) Register()
func (*BuildingController) Remove ¶ added in v0.3.0
func (ctrl *BuildingController) Remove(res http.ResponseWriter, req *http.Request)
func (*BuildingController) UpdateBuilding ¶
func (ctrl *BuildingController) UpdateBuilding(res http.ResponseWriter, req *http.Request)
type ControllerError ¶ added in v0.3.0
type ControllerError struct { Status string `json:"status"` DeveloperMessage string `json:"developerMessage"` UserMessage string `json:"userMessage"` MoreInfo string `json:"moreInfo"` }
func NewControllerError ¶ added in v0.3.0
func NewControllerError(status string, developerMessage string, userMessage string, moreInfo string) *ControllerError
type DatapointController ¶
type DatapointController struct { Datapoint *model.Datapoint // contains filtered or unexported fields }
DatapointController represents the controller instance
func NewDatapointController ¶
func NewDatapointController(router *mux.Router, r *render.Render, db *mgo.Database) *DatapointController
NewDatapointController creates the controller
func (*DatapointController) CalculateAndUpdateRoomOccupation ¶
func (ctrl *DatapointController) CalculateAndUpdateRoomOccupation(o model.OccupationSensor, r model.Room) (info *mgo.ChangeInfo, err error)
func (*DatapointController) Register ¶
func (ctrl *DatapointController) Register()
Register registers the routes with mux.Router
type HealthController ¶
type HealthController struct {
// contains filtered or unexported fields
}
HealthController represents the controller instance
func NewHealthController ¶
func NewHealthController(router *mux.Router, r *render.Render) *HealthController
NewHealthController creates the controller
func (*HealthController) Register ¶
func (c *HealthController) Register()
Register registers the routes with mux.Router
type HubController ¶
HubController represents the controller instance
func NewHubController ¶
func NewHubController(router *mux.Router, r *render.Render, db *mgo.Database) *HubController
NewHubController creates the controller
func (*HubController) Register ¶
func (ctrl *HubController) Register()
Register registers the routes with mux.Router
type RoomController ¶ added in v0.3.0
type RoomController struct {
// contains filtered or unexported fields
}
func NewRoomController ¶ added in v0.3.0
func (*RoomController) Create ¶ added in v0.3.0
func (ctrl *RoomController) Create(res http.ResponseWriter, req *http.Request)
func (*RoomController) CreateRoster ¶ added in v0.3.0
func (ctrl *RoomController) CreateRoster(res http.ResponseWriter, req *http.Request)
func (*RoomController) Find ¶ added in v0.3.0
func (ctrl *RoomController) Find(res http.ResponseWriter, req *http.Request)
func (*RoomController) FindRoomID ¶ added in v0.3.0
func (ctrl *RoomController) FindRoomID(res http.ResponseWriter, req *http.Request)
func (*RoomController) Register ¶ added in v0.3.0
func (ctrl *RoomController) Register()
func (*RoomController) Update ¶ added in v0.3.0
func (ctrl *RoomController) Update(res http.ResponseWriter, req *http.Request)
type SensorController ¶
type SensorController struct {
// contains filtered or unexported fields
}
HubController represents the controller instance
func NewSensorController ¶
func NewSensorController(router *mux.Router, r *render.Render, db *mgo.Database) *SensorController
NewSensorController creates the controller
func (*SensorController) CreateDatapoints ¶
func (ctrl *SensorController) CreateDatapoints(res http.ResponseWriter, req *http.Request)
CreateDatapoints saves datapoints to db Todo: this should be an alias method for the Create method in DatapointController