代码拉取完成,页面将自动刷新
package om
type Command string
const (
CMD_GET Command = "get"
CMD_SET Command = "set"
CMD_ADD Command = "add"
CMD_DELETE Command = "delete"
CMD_REBOOT Command = "reboot"
CMD_FACTORY Command = "factory_reboot"
CMD_DOWNLOAD Command = "download"
CMD_UPLOAD Command = "upload"
CMD_RESET Command = "reset"
CMD_INFORM Command = "inform"
CMD_RELOAD_SN Command = "snReload"
)
func (own Command) IsLegal() bool {
switch own {
case CMD_GET, CMD_SET, CMD_ADD, CMD_DELETE, CMD_REBOOT, CMD_UPLOAD, CMD_DOWNLOAD, CMD_FACTORY, CMD_RESET, CMD_INFORM, CMD_RELOAD_SN:
return true
default:
return false
}
}
func (own Command) IsMatchClass(cls Class) bool {
switch own {
case CMD_GET:
if cls == CLS_VALUE || cls == CLS_OBJECT || cls == CLS_NOTIFICATION {
return true
}
case CMD_SET:
if cls == CLS_VALUE || cls == CLS_CERTIFICATE {
return true
}
case CMD_ADD:
if cls == CLS_OBJECT {
return true
}
case CMD_DELETE:
if cls == CLS_OBJECT {
return true
}
case CMD_RESET:
if cls == CLS_MODULE {
return true
}
case CMD_INFORM, CMD_REBOOT, CMD_FACTORY, CMD_DOWNLOAD, CMD_UPLOAD, CMD_RELOAD_SN:
if cls == CLS_NONE {
return true
}
}
return false
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。