Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPWhiteList ¶
func IPWhiteList(whitelist map[string]bool) gin.HandlerFunc
Types ¶
type SocketInstance ¶
type SocketInstance struct { WebServer *WebServerInstance Context *gin.Context Dependencies *controller.Dependencies ShouldSendInfo bool // contains filtered or unexported fields }
func NewSocketInstance ¶
func NewSocketInstance(webServer *WebServerInstance, uuid uuid.UUID, c *gin.Context, dep *controller.Dependencies) SocketInstance
func (*SocketInstance) SendInfo ¶
func (inst *SocketInstance) SendInfo()
func (*SocketInstance) SendJSON ¶
func (inst *SocketInstance) SendJSON(v interface{})
func (*SocketInstance) SendTemperatures ¶ added in v1.0.6
func (inst *SocketInstance) SendTemperatures(temps thermal.Temperatures)
type SocketMessage ¶
type WebServerInstance ¶
type WebServerInstance struct { WebServer *gin.Engine SocketInstances map[uuid.UUID]*SocketInstance Dependencies *controller.Dependencies IsLooping bool }
func NewWebServer ¶
func NewWebServer(dep *controller.Dependencies) *WebServerInstance
func (*WebServerInstance) BroadcastInfo ¶
func (webInst *WebServerInstance) BroadcastInfo()
func (*WebServerInstance) BroadcastJSON ¶
func (webInst *WebServerInstance) BroadcastJSON(v interface{})
func (*WebServerInstance) StartLoop ¶ added in v1.0.6
func (webInst *WebServerInstance) StartLoop()
Click to show internal directories.
Click to hide internal directories.