1 Star 0 Fork 0

leminewx / gov2x

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
req_file_type.go 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
wenxian 提交于 2024-03-26 18:06 . 0.0.4.0:优化OM协议的指令
package om
type FileType string
const (
UPLOAD_TYPE_1 FileType = "1 Firmware Upgrade Image"
UPLOAD_TYPE_2 FileType = "2 Web Content"
UPLOAD_TYPE_3 FileType = "3 Vendor Configuration File"
UPLOAD_TYPE_13 FileType = "13 Work Order File"
UPLOAD_TYPE_16 FileType = "16 Dt Firmware Upgrade Uu"
UPLOAD_TYPE_17 FileType = "17 Dt Firmware Upgrade Hc"
DOWNLOAD_TYPE_1 FileType = "1 软件包"
DOWNLOAD_TYPE_2 FileType = "2 配置文件"
DOWNLOAD_TYPE_3 FileType = "3 普通文件"
DOWNLOAD_TYPE_5 FileType = "5 Dt omcore log file"
DOWNLOAD_TYPE_6 FileType = "6 Dt omkeeper log file"
DOWNLOAD_TYPE_7 FileType = "7 Dt omproxy log file"
DOWNLOAD_TYPE_8 FileType = "8 Dt proxy log file"
DOWNLOAD_TYPE_9 FileType = "9 Dt atproxy log file"
DOWNLOAD_TYPE_10 FileType = "10 Dt xds log file"
DOWNLOAD_TYPE_11 FileType = "11 Dt all log file"
DOWNLOAD_TYPE_12 FileType = "12 Data Model File"
DOWNLOAD_TYPE_13 FileType = "14 Dt ordinary log file"
DOWNLOAD_TYPE_14 FileType = "15 All configure File"
DOWNLOAD_TYPE_15 FileType = "18 Dt Alarm Model File"
DOWNLOAD_TYPE_16 FileType = "19 Dt Exception Model File"
DOWNLOAD_TYPE_17 FileType = "20 Dt Alarm File"
DOWNLOAD_TYPE_18 FileType = "21 Dt Exception File"
)
func (own FileType) IsUploadType() bool {
switch own {
case UPLOAD_TYPE_1, UPLOAD_TYPE_2, UPLOAD_TYPE_3, UPLOAD_TYPE_13, UPLOAD_TYPE_16, UPLOAD_TYPE_17:
return true
default:
return false
}
}
func (own FileType) IsDownloadType() bool {
switch own {
case DOWNLOAD_TYPE_1, DOWNLOAD_TYPE_2, DOWNLOAD_TYPE_3, DOWNLOAD_TYPE_5, DOWNLOAD_TYPE_6, DOWNLOAD_TYPE_7, DOWNLOAD_TYPE_8,
DOWNLOAD_TYPE_9, DOWNLOAD_TYPE_10, DOWNLOAD_TYPE_11, DOWNLOAD_TYPE_12, DOWNLOAD_TYPE_13, DOWNLOAD_TYPE_14, DOWNLOAD_TYPE_15,
DOWNLOAD_TYPE_16, DOWNLOAD_TYPE_17, DOWNLOAD_TYPE_18:
return true
default:
return false
}
}
Go
1
https://gitee.com/leminewx/gov2x.git
git@gitee.com:leminewx/gov2x.git
leminewx
gov2x
gov2x
a88e0b321ff7

搜索帮助