Documentation
¶
Index ¶
- func Echo(w http.ResponseWriter, r *http.Request)
- func Home(w http.ResponseWriter, r *http.Request)
- type Device
- type DeviceHandler
- func (h *DeviceHandler) GetDeivce(w http.ResponseWriter, r *http.Request)
- func (h *DeviceHandler) GetDeviceState(w http.ResponseWriter, r *http.Request)
- func (h *DeviceHandler) GetDevices(w http.ResponseWriter, r *http.Request)
- func (h *DeviceHandler) Root(w http.ResponseWriter, r *http.Request)
- func (h *DeviceHandler) SetDeviceState(w http.ResponseWriter, r *http.Request)
- func (h *DeviceHandler) SetRoutes(r *mux.Router)
- type DeviceService
- type Devices
- type WsServer
- func (ws *WsServer) Ack(msg *types.Message) ([]byte, error)
- func (ws *WsServer) Date(msg *types.Message) ([]byte, error)
- func (ws *WsServer) Query(payload []byte) ([]byte, error)
- func (ws *WsServer) Register(msg *types.Message, conn *websocket.Conn) ([]byte, error)
- func (ws *WsServer) Serve()
- func (ws *WsServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (ws *WsServer) Update(payload []byte, conn *websocket.Conn) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeviceHandler ¶
type DeviceHandler struct {
// contains filtered or unexported fields
}
func (*DeviceHandler) GetDeivce ¶
func (h *DeviceHandler) GetDeivce(w http.ResponseWriter, r *http.Request)
func (*DeviceHandler) GetDeviceState ¶
func (h *DeviceHandler) GetDeviceState(w http.ResponseWriter, r *http.Request)
func (*DeviceHandler) GetDevices ¶
func (h *DeviceHandler) GetDevices(w http.ResponseWriter, r *http.Request)
func (*DeviceHandler) Root ¶
func (h *DeviceHandler) Root(w http.ResponseWriter, r *http.Request)
func (*DeviceHandler) SetDeviceState ¶
func (h *DeviceHandler) SetDeviceState(w http.ResponseWriter, r *http.Request)
func (*DeviceHandler) SetRoutes ¶
func (h *DeviceHandler) SetRoutes(r *mux.Router)
type DeviceService ¶
type DeviceService struct {
// contains filtered or unexported fields
}
func NewDeviceService ¶
func NewDeviceService(serviceIp string, servicePort int, websocketPort int, devices *Devices) *DeviceService
func (*DeviceService) ServeHTTPS ¶
func (s *DeviceService) ServeHTTPS()
type Devices ¶
type Devices struct {
// contains filtered or unexported fields
}
func NewDeviceStore ¶
func NewDeviceStore() *Devices
func (*Devices) ListDevices ¶
Click to show internal directories.
Click to hide internal directories.