Documentation ¶
Index ¶
- func Static(w web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc)
- type AddLightRequest
- type ByName
- type Light
- type LightsResponse
- type WebApp
- type WebContext
- func (w *WebContext) AddLight(rw web.ResponseWriter, req *web.Request)
- func (w *WebContext) ChangeState(rw web.ResponseWriter, req *web.Request)
- func (w *WebContext) DeleteLight(rw web.ResponseWriter, req *web.Request)
- func (w *WebContext) Lights(rw web.ResponseWriter, req *web.Request)
- func (w *WebContext) Messages(rw web.ResponseWriter, req *web.Request)
- func (w *WebContext) OnConnected(ws *websocket.Conn)
- type WsMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Static ¶
func Static(w web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc)
Types ¶
type AddLightRequest ¶
type AddLightRequest struct {
Name string
}
type LightsResponse ¶
type WebApp ¶
type WebApp struct { DB *devicedb.DeviceDB Nats *natsserver.NatsServer // contains filtered or unexported fields }
func New ¶
func New(db *devicedb.DeviceDB, nats *natsserver.NatsServer, logger *log.Logger, tlsHostName string) *WebApp
type WebContext ¶
type WebContext struct {
App *WebApp
}
func (*WebContext) AddLight ¶
func (w *WebContext) AddLight(rw web.ResponseWriter, req *web.Request)
func (*WebContext) ChangeState ¶
func (w *WebContext) ChangeState(rw web.ResponseWriter, req *web.Request)
func (*WebContext) DeleteLight ¶
func (w *WebContext) DeleteLight(rw web.ResponseWriter, req *web.Request)
func (*WebContext) Lights ¶
func (w *WebContext) Lights(rw web.ResponseWriter, req *web.Request)
func (*WebContext) Messages ¶
func (w *WebContext) Messages(rw web.ResponseWriter, req *web.Request)
func (*WebContext) OnConnected ¶
func (w *WebContext) OnConnected(ws *websocket.Conn)
Click to show internal directories.
Click to hide internal directories.