Documentation ¶
Index ¶
- func GetHttpClientSecureVerify() bool
- func SetClientDisconnectFunc(f func())
- func SetClientInitFunc(f func(logger *logrus.Logger, c *WOLClientConfigure))
- func SetHttpClientSecureVerify(b bool)
- func SetHttpClientTimeout(t int)
- func StoreWOLServiceConfigure(con *WOLServiceConfigure)
- func WakeOnLan(relay bool, macList []string, broadcastIps []string, port, repeat int, ...) (err error)
- type WOLClientConfigure
- type WOLDevice
- func (d *WOLDevice) BemfaClientStart()
- func (d *WOLDevice) BemfaClientStop()
- func (d *WOLDevice) DianDengClientStart()
- func (d *WOLDevice) DianDengClientStop()
- func (d *WOLDevice) GetBemfaClient() *bemfa.Device
- func (d *WOLDevice) GetBemfaClientState() string
- func (d *WOLDevice) GetDianDengClient() *blinker.Device
- func (d *WOLDevice) GetDianDengClientState() string
- func (d *WOLDevice) GetIdentKey() string
- func (d *WOLDevice) SetBemfaClient(dd *bemfa.Device)
- func (d *WOLDevice) SetBemfaClientMsg(msg string)
- func (d *WOLDevice) SetDianDengClient(dd *blinker.Device)
- func (d *WOLDevice) SetDianDengClientMsg(msg string)
- func (d *WOLDevice) SetShutDownFunc(f func(d *WOLDevice) int)
- func (d *WOLDevice) WakeUp(...) error
- type WOLServerConfigure
- type WOLServiceConfigure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHttpClientSecureVerify ¶
func GetHttpClientSecureVerify() bool
func SetClientDisconnectFunc ¶
func SetClientDisconnectFunc(f func())
func SetClientInitFunc ¶
func SetClientInitFunc(f func(logger *logrus.Logger, c *WOLClientConfigure))
func SetHttpClientSecureVerify ¶
func SetHttpClientSecureVerify(b bool)
func SetHttpClientTimeout ¶
func SetHttpClientTimeout(t int)
func StoreWOLServiceConfigure ¶
func StoreWOLServiceConfigure(con *WOLServiceConfigure)
Types ¶
type WOLClientConfigure ¶
type WOLClientConfigure struct { Enable bool //开关 ServerURL string //服务器地址 Token string //验证token Relay bool //中继唤醒包 Key string DeviceName string //设备名称 Mac string //网卡物理地址 BroadcastIP string //广播地址 Port int //端口 Repeat int //重复次数 PowerOffCMD string //关机指令 UpdateTime int64 //配置更新时间 }
func (*WOLClientConfigure) ClientDisconnect ¶
func (c *WOLClientConfigure) ClientDisconnect()
func (*WOLClientConfigure) Init ¶
func (c *WOLClientConfigure) Init(logger *logrus.Logger)
type WOLDevice ¶
type WOLDevice struct { Key string DeviceName string MacList []string BroadcastIPs []string Port int Relay bool //交给中继设备发送 Repeat int //重复发送次数 //PowerOffCMD string //关机指令 UpdateTime int64 //配置更新时间 IOT_DianDeng_Enable bool //点灯科技开关 IOT_DianDeng_AUTHKEY string IOT_Bemfa_Enable bool //巴法平台开关 IOT_Bemfa_SecretKey string IOT_Bemfa_Topic string // contains filtered or unexported fields }
func (*WOLDevice) BemfaClientStart ¶
func (d *WOLDevice) BemfaClientStart()
func (*WOLDevice) BemfaClientStop ¶
func (d *WOLDevice) BemfaClientStop()
func (*WOLDevice) DianDengClientStart ¶
func (d *WOLDevice) DianDengClientStart()
func (*WOLDevice) DianDengClientStop ¶
func (d *WOLDevice) DianDengClientStop()
func (*WOLDevice) GetBemfaClient ¶
func (*WOLDevice) GetBemfaClientState ¶
func (*WOLDevice) GetDianDengClient ¶
func (*WOLDevice) GetDianDengClientState ¶
func (*WOLDevice) GetIdentKey ¶
func (*WOLDevice) SetBemfaClient ¶
func (*WOLDevice) SetBemfaClientMsg ¶
func (*WOLDevice) SetDianDengClient ¶
func (*WOLDevice) SetDianDengClientMsg ¶
func (*WOLDevice) SetShutDownFunc ¶
type WOLServerConfigure ¶
type WOLServiceConfigure ¶
type WOLServiceConfigure struct { Server WOLServerConfigure Client WOLClientConfigure }
func GetWOLServiceConfigure ¶
func GetWOLServiceConfigure() WOLServiceConfigure
Click to show internal directories.
Click to hide internal directories.