Documentation ¶
Index ¶
- Constants
- type AnItem
- func (a *AnItem) AddListener(l ItemListener)
- func (a *AnItem) EnableHistory()
- func (a *AnItem) GetID() string
- func (a *AnItem) GetImg() string
- func (a *AnItem) GetLabel() string
- func (a *AnItem) GetLastValueChange() time.Time
- func (a *AnItem) GetLastValueUpdate() time.Time
- func (a *AnItem) GetType() string
- func (a *AnItem) GetUnit() string
- func (a *AnItem) GetValue() string
- func (a *AnItem) IsHistoryEnabled() bool
- func (a *AnItem) MarshalJSON() ([]byte, error)
- func (a *AnItem) SetImg(img string)
- func (a *AnItem) SetLabel(label string)
- func (a *AnItem) SetUnit(unit string)
- func (a *AnItem) SetValue(value string) (string, bool)
- type CallbackListener
- type Item
- type ItemListener
Constants ¶
View Source
const ( ON = "ON" OFF = "OFF" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnItem ¶
type AnItem struct { ID string Label string Type string Img string Unit string // contains filtered or unexported fields }
func (*AnItem) AddListener ¶
func (a *AnItem) AddListener(l ItemListener)
func (*AnItem) EnableHistory ¶
func (a *AnItem) EnableHistory()
func (*AnItem) GetLastValueChange ¶
func (*AnItem) GetLastValueUpdate ¶
func (*AnItem) IsHistoryEnabled ¶
func (*AnItem) MarshalJSON ¶
type CallbackListener ¶
func (*CallbackListener) OnValueChange ¶
func (c *CallbackListener) OnValueChange(item Item, old string, new string)
type Item ¶
type Item interface { GetID() string GetType() string GetValue() string SetValue(string) (string, bool) GetImg() string SetImg(img string) GetLabel() string SetLabel(label string) GetUnit() string SetUnit(unit string) GetLastValueUpdate() time.Time GetLastValueChange() time.Time EnableHistory() IsHistoryEnabled() bool AddListener(l ItemListener) MarshalJSON() ([]byte, error) }
type ItemListener ¶
Click to show internal directories.
Click to hide internal directories.