wolconf

package
v1.10.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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)

func WakeOnLan

func WakeOnLan(relay bool, macList []string, broadcastIps []string, port, repeat int,
	finishedCallback func(relay bool, macList []string, broadcastIps []string, port, repeat int),
) (err error)

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 (d *WOLDevice) GetBemfaClient() *bemfa.Device

func (*WOLDevice) GetBemfaClientState

func (d *WOLDevice) GetBemfaClientState() string

func (*WOLDevice) GetDianDengClient

func (d *WOLDevice) GetDianDengClient() *blinker.Device

func (*WOLDevice) GetDianDengClientState

func (d *WOLDevice) GetDianDengClientState() string

func (*WOLDevice) GetIdentKey

func (d *WOLDevice) GetIdentKey() string

func (*WOLDevice) SetBemfaClient

func (d *WOLDevice) SetBemfaClient(dd *bemfa.Device)

func (*WOLDevice) SetBemfaClientMsg

func (d *WOLDevice) SetBemfaClientMsg(msg string)

func (*WOLDevice) SetDianDengClient

func (d *WOLDevice) SetDianDengClient(dd *blinker.Device)

func (*WOLDevice) SetDianDengClientMsg

func (d *WOLDevice) SetDianDengClientMsg(msg string)

func (*WOLDevice) SetShutDownFunc

func (d *WOLDevice) SetShutDownFunc(f func(d *WOLDevice) int)

func (*WOLDevice) WakeUp

func (d *WOLDevice) WakeUp(finishedCallback func(relay bool, macList []string, broadcastIps []string, port, repeat int)) error

type WOLServerConfigure

type WOLServerConfigure struct {
	Enable bool
	Token  string
}

type WOLServiceConfigure

type WOLServiceConfigure struct {
	Server WOLServerConfigure
	Client WOLClientConfigure
}

func GetWOLServiceConfigure

func GetWOLServiceConfigure() WOLServiceConfigure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL