模块化上传驱动,使用泛型优化工具库降低冗余

This commit is contained in:
孟帅
2023-06-02 20:29:08 +08:00
parent fdc48b9335
commit 62ecbb7f26
96 changed files with 1276 additions and 1483 deletions

View File

@@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package consts
// 碎片
@@ -12,4 +11,5 @@ const (
DemoTips = "演示系统已隐藏"
NilJsonToString = "{}" // 空json初始化值
RegionSpilt = " / " // 地区分隔符
Unknown = "Unknown"
)

View File

@@ -1,7 +1,5 @@
package consts
import "time"
const (
TCPMsgCodeSuccess = 2000 // 成功的状态码
)
@@ -21,5 +19,6 @@ const (
)
const (
TCPRpcTimeout = time.Second * 10 // rpc通讯超时时间 默认10s
TCPHeartbeatTimeout = 300 // tcp心跳超时默认300s
TCPRpcTimeout = 10 // rpc通讯超时时间 默认10s
)

View File

@@ -5,6 +5,16 @@
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package consts
// 上传类型
const (
UploadTypeFile = 1 // 文件
UploadTypeImage = 2 // 图片
UploadTypeDoc = 3 // 文档
UploadTypeAudio = 4 // 音频
UploadTypeVideo = 5 // 视频
)
// 上传存储驱动
const (
UploadDriveLocal = "local" // 本地驱动
UploadDriveUCloud = "ucloud" // ucloud对象存储