Documentation ¶
Index ¶
- func ECBDecrypt(crypted, key []byte) ([]byte, error)
- func ECBEncrypt(src, key []byte) ([]byte, error)
- func Encrypt(output interface{}, key string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) ([]byte, error)
- type Air
- type Blow
- type Command
- type Device
- type DeviceFactory
- func (options *DeviceFactory) ConnectToDevice(address net.IP)
- func (options *DeviceFactory) SetAir(value bool)
- func (options *DeviceFactory) SetBFCommand(comm []string, value []int)
- func (options *DeviceFactory) SetBlow(value bool)
- func (options *DeviceFactory) SetFanSpeed(value int)
- func (options *DeviceFactory) SetHealthMode(value bool)
- func (options *DeviceFactory) SetLights(value bool)
- func (options *DeviceFactory) SetMode(value int)
- func (options *DeviceFactory) SetPower(value bool)
- func (options *DeviceFactory) SetPowerSave(value bool)
- func (options *DeviceFactory) SetQuietMode(value int)
- func (options *DeviceFactory) SetSleepMode(value bool)
- func (options *DeviceFactory) SetSwingHor(value int)
- func (options *DeviceFactory) SetSwingVert(value int)
- func (options *DeviceFactory) SetTemperature(value int, unit int)
- func (options *DeviceFactory) SetTurbo(value bool)
- type DeviceInfo
- type FanSpeed
- type Health
- type Lights
- type Mode
- type Power
- type PowerSave
- type Quiet
- type Sleep
- type SwingHor
- type SwingVert
- type Temperature
- type TemperatureUnit
- type Turbo
- type UDPInfo
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ECBDecrypt ¶
func ECBEncrypt ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
Types ¶
type Command ¶
type Command struct { Power Power `json:"power"` Mode Mode `json:"mode"` TemperatureUnit TemperatureUnit `json:"temperatureUnit"` Temperature Temperature `json:"temperature"` FanSpeed FanSpeed `json:"fanSpeed"` Air Air `json:"air"` Blow Blow `json:"blow"` Health Health `json:"health"` Sleep Sleep `json:"sleep"` Lights Lights `json:"lights"` SwingHor SwingHor `json:"swingHor"` SwingVert SwingVert `json:"swingVert"` Quiet Quiet `json:"quiet"` Turbo Turbo `json:"turbo"` PowerSave PowerSave `json:"powerSave"` }
type DeviceFactory ¶
type DeviceFactory struct { Host net.IP OnStatus func(device *Device) OnUpdate func(device *Device) OnConnected func() Conn net.Conn Device Device }
func Create ¶
func Create(option *DeviceFactory) *DeviceFactory
func (*DeviceFactory) ConnectToDevice ¶
func (options *DeviceFactory) ConnectToDevice(address net.IP)
func (*DeviceFactory) SetAir ¶
func (options *DeviceFactory) SetAir(value bool)
func (*DeviceFactory) SetBFCommand ¶
func (options *DeviceFactory) SetBFCommand(comm []string, value []int)
func (*DeviceFactory) SetBlow ¶
func (options *DeviceFactory) SetBlow(value bool)
func (*DeviceFactory) SetFanSpeed ¶
func (options *DeviceFactory) SetFanSpeed(value int)
func (*DeviceFactory) SetHealthMode ¶
func (options *DeviceFactory) SetHealthMode(value bool)
func (*DeviceFactory) SetLights ¶
func (options *DeviceFactory) SetLights(value bool)
func (*DeviceFactory) SetMode ¶
func (options *DeviceFactory) SetMode(value int)
func (*DeviceFactory) SetPower ¶
func (options *DeviceFactory) SetPower(value bool)
func (*DeviceFactory) SetPowerSave ¶
func (options *DeviceFactory) SetPowerSave(value bool)
func (*DeviceFactory) SetQuietMode ¶
func (options *DeviceFactory) SetQuietMode(value int)
func (*DeviceFactory) SetSleepMode ¶
func (options *DeviceFactory) SetSleepMode(value bool)
func (*DeviceFactory) SetSwingHor ¶
func (options *DeviceFactory) SetSwingHor(value int)
func (*DeviceFactory) SetSwingVert ¶
func (options *DeviceFactory) SetSwingVert(value int)
func (*DeviceFactory) SetTemperature ¶
func (options *DeviceFactory) SetTemperature(value int, unit int)
SetTemperature /**
func (*DeviceFactory) SetTurbo ¶
func (options *DeviceFactory) SetTurbo(value bool)
type DeviceInfo ¶
type DeviceInfo struct { T string `json:"t"` Cid string `json:"cid"` Bc string `json:"bc"` Brand string `json:"brand"` Catalog string `json:"catalog"` Mac string `json:"mac"` Mid string `json:"mid"` Model string `json:"model"` Name string `json:"name"` Lock int `json:"lock"` Series string `json:"series"` Vender string `json:"vender"` Ver string `json:"ver"` Key string `json:"key"` Dat []int `json:"dat"` Cols []string `json:"cols"` Val []int `json:"val"` P []int `json:"p"` R int `json:"r"` Opt []string `json:"opt"` }
func Decrypt ¶
func Decrypt(input UDPInfo, key string) DeviceInfo
type Temperature ¶
type Temperature struct {
Code string `json:"code"`
}
type TemperatureUnit ¶
Click to show internal directories.
Click to hide internal directories.