fix:upload设置

This commit is contained in:
momo 2023-10-26 15:00:11 +08:00
parent 7cc39dfd3b
commit 094423042e
2 changed files with 66 additions and 66 deletions

View File

@ -14,16 +14,16 @@ type UploadLogoStandardReq struct {
}
type UploadFileBaseReq struct {
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
FileKey string `form:"file_key"` // 上传唯一标识信息
FileData string `form:"file_data"` // 上传文件额外信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
UserId int64 `form:"user_id,optional"` // 上传文件额外信息
GuestId int64 `form:"guest_id,optional"` // 上传文件额外信息
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
FileKey string `form:"file_key"` // 上传唯一标识信息
FileData string `form:"file_data"` // 上传文件额外信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
UserId int64 `form:"user_id,optional"` // 上传文件额外信息
GuestId int64 `form:"guest_id,optional"` // 上传文件额外信息
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
}
type UploadLogoReq struct {
@ -34,33 +34,33 @@ type UploadLogoReq struct {
}
type UploadFileBackendReq struct {
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
FileKey string `form:"file_key"` // 上传唯一标识信息
FileSize int64 `form:"file_size,optional"` // 上传唯一标识信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
FileKey string `form:"file_key"` // 上传唯一标识信息
FileSize int64 `form:"file_size,optional"` // 上传唯一标识信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
}
type UploadFilesReq struct {
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
UploadInfo string `form:"upload_info"` // 上传信息 json
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
UploadInfo string `form:"upload_info"` // 上传信息 json
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
}
type UploadCallbackReq struct {
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
ResourceId string `form:"resource_id"` // 资源ID
ResourceType string `form:"resource_type"` // 资源类型
ResourceUrl string `form:"resource_url"` // 资源URL
Metadata string `form:"metadata,optional"` // 元数据,json格式,存储图像分率
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
Source string `form:"source"` // 上传来源
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
ResourceId string `form:"resource_id"` // 资源ID
ResourceType string `form:"resource_type"` // 资源类型
ResourceUrl string `form:"resource_url"` // 资源URL
Metadata string `form:"metadata,optional"` // 元数据,json格式,存储图像分率
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
Source string `form:"source"` // 上传来源
}
type RequestUpFile struct {
@ -114,10 +114,10 @@ type File struct {
}
type Meta struct {
TotalCount int64 `json:"totalCount"`
PageCount int64 `json:"pageCount"`
CurrentPage int `json:"currentPage"`
PerPage int `json:"perPage"`
TotalCount int64 `json:"total_count"`
PageCount int64 `json:"page_count"`
CurrentPage int `json:"current_page"`
PerPage int `json:"per_page"`
}
// Set 设置Response的Code和Message值

View File

@ -59,16 +59,16 @@ type (
type (
UploadFileBaseReq {
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
FileKey string `form:"file_key"` // 上传唯一标识信息
FileData string `form:"file_data"` // 上传文件额外信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
UserId int64 `form:"user_id,optional"` // 上传文件额外信息
GuestId int64 `form:"guest_id,optional"` // 上传文件额外信息
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
FileKey string `form:"file_key"` // 上传唯一标识信息
FileData string `form:"file_data"` // 上传文件额外信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
UserId int64 `form:"user_id,optional"` // 上传文件额外信息
GuestId int64 `form:"guest_id,optional"` // 上传文件额外信息
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
}
)
@ -83,32 +83,32 @@ type (
type (
UploadFileBackendReq {
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
FileKey string `form:"file_key"` // 上传唯一标识信息
FileSize int64 `form:"file_size,optional"` // 上传唯一标识信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
FileKey string `form:"file_key"` // 上传唯一标识信息
FileSize int64 `form:"file_size,optional"` // 上传唯一标识信息
Metadata string `form:"meta_data,optional"` // 上传文件额外信息
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
}
UploadFilesReq {
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
UploadInfo string `form:"upload_info"` // 上传信息 json
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
UploadInfo string `form:"upload_info"` // 上传信息 json
Source string `form:"source"` // 上传来源
Refresh int64 `form:"refresh,optional"` // 强制更新 10
ResourceId string `form:"resource_id,optional"` // 资源ID
}
UploadCallbackReq {
UploadBucket int64 `form:"upload_bucket,options=[1,2],default=1"` // 上传桶名:1=缓存,2=持久
ResourceId string `form:"resource_id"` // 资源ID
ResourceType string `form:"resource_type"` // 资源类型
ResourceUrl string `form:"resource_url"` // 资源URL
Metadata string `form:"metadata,optional"` // 元数据,json格式,存储图像分率
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
Source string `form:"source"` // 上传来源
UploadBucket int64 `form:"upload_bucket,options=[1,2,3],default=1"` // 上传桶名:1=缓存,2=持久
ResourceId string `form:"resource_id"` // 资源ID
ResourceType string `form:"resource_type"` // 资源类型
ResourceUrl string `form:"resource_url"` // 资源URL
Metadata string `form:"metadata,optional"` // 元数据,json格式,存储图像分率
ApiType int64 `form:"api_type,options=[1,2],default=1"` // 调用类型1=对外2=对内
Source string `form:"source"` // 上传来源
}
)