Documentation
¶
Index ¶
- Constants
- Variables
- func ActionAppliancesPower(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionGetAppliances(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionGetDevices(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionOpenUpdateApplianceView(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionSendSignal(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionSendTVButton(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionUpdateAirConSettings(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionUpdateLight(state *State, cli *natureremo.Client, ctx interface{}) error
- func ActionUpdateSelectIdx(state *State, cli *natureremo.Client, ctx interface{}) error
- func Start()
- type Action
- type AppliancePowerOnOff
- type Appliances
- func (a *Appliances) GetSelect() int
- func (a *Appliances) OpenUpdateAirConView(app *natureremo.Appliance)
- func (a *Appliances) OpenUpdateIRView(app *natureremo.Appliance)
- func (a *Appliances) OpenUpdateLightView(app *natureremo.Appliance)
- func (a *Appliances) OpenUpdateTVView(app *natureremo.Appliance)
- func (a *Appliances) UpdateView(apps []*natureremo.Appliance)
- type Context
- type Devices
- type Event
- type Events
- type Header
- type LightSetting
- type State
- type TVSetting
- type UpdateAirConFormData
- type UpdateAirConFormItem
Constants ¶
View Source
const INTERVAL = 1
Variables ¶
View Source
var ( UI *ui Client *natureremo.Client )
View Source
var Dispatcher = &dispatcher{ state: &State{}, }
View Source
var (
IndexOutOfAppliances = errors.New("index out of appliances")
)
Functions ¶
func ActionAppliancesPower ¶
func ActionAppliancesPower(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionGetAppliances ¶
func ActionGetAppliances(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionGetDevices ¶
func ActionGetDevices(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionOpenUpdateApplianceView ¶
func ActionOpenUpdateApplianceView(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionSendSignal ¶
func ActionSendSignal(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionSendTVButton ¶
func ActionSendTVButton(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionUpdateAirConSettings ¶
func ActionUpdateAirConSettings(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionUpdateLight ¶
func ActionUpdateLight(state *State, cli *natureremo.Client, ctx interface{}) error
func ActionUpdateSelectIdx ¶ added in v0.0.2
func ActionUpdateSelectIdx(state *State, cli *natureremo.Client, ctx interface{}) error
Types ¶
type AppliancePowerOnOff ¶
type AppliancePowerOnOff struct { Power natureremo.Button Row int }
type Appliances ¶
func NewAppliances ¶
func NewAppliances() *Appliances
func (*Appliances) GetSelect ¶
func (a *Appliances) GetSelect() int
func (*Appliances) OpenUpdateAirConView ¶
func (a *Appliances) OpenUpdateAirConView(app *natureremo.Appliance)
func (*Appliances) OpenUpdateIRView ¶
func (a *Appliances) OpenUpdateIRView(app *natureremo.Appliance)
func (*Appliances) OpenUpdateLightView ¶
func (a *Appliances) OpenUpdateLightView(app *natureremo.Appliance)
func (*Appliances) OpenUpdateTVView ¶
func (a *Appliances) OpenUpdateTVView(app *natureremo.Appliance)
func (*Appliances) UpdateView ¶
func (a *Appliances) UpdateView(apps []*natureremo.Appliance)
type Devices ¶
func NewDevices ¶
func NewDevices() *Devices
func (*Devices) UpdateView ¶
func (d *Devices) UpdateView(devices []*natureremo.Device)
type Events ¶
func (*Events) UpdateView ¶
type LightSetting ¶
type State ¶
type State struct { SelectApplianceIdx int Devices []*natureremo.Device Appliances []*natureremo.Appliance Events []Event }
func (*State) SelectAppliance ¶ added in v0.0.2
func (s *State) SelectAppliance() (*natureremo.Appliance, error)
func (*State) UpdateAppliances ¶
func (s *State) UpdateAppliances()
func (*State) UpdateDevices ¶
func (s *State) UpdateDevices()
func (*State) UpdateEvents ¶
func (s *State) UpdateEvents()
type UpdateAirConFormData ¶
type UpdateAirConFormData struct { Power UpdateAirConFormItem Mode UpdateAirConFormItem Temp UpdateAirConFormItem Volume UpdateAirConFormItem Direction UpdateAirConFormItem }
func ToUpdateAirConViewData ¶
func ToUpdateAirConViewData(app *natureremo.Appliance) UpdateAirConFormData
func (UpdateAirConFormData) String ¶
func (u UpdateAirConFormData) String() string
type UpdateAirConFormItem ¶
func (UpdateAirConFormItem) Value ¶
func (u UpdateAirConFormItem) Value() string
Click to show internal directories.
Click to hide internal directories.