feat(storage): add cos support
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"octopus/pkg/tools"
|
||||
"time"
|
||||
|
||||
@@ -63,8 +64,9 @@ type DocID struct {
|
||||
}
|
||||
|
||||
type CreateDoc struct {
|
||||
Name string `json:"name" validate:"required" oai:"description=文档名称"`
|
||||
FolderID string `json:"folder_id" validate:"required" oai:"description=归属文件夹ID"`
|
||||
Name string `json:"name" validate:"required" oai:"description=文档名称"`
|
||||
ObjectName string `json:"object_name" validate:"required" oai:"description=对象存储中对应的文档对象名称"`
|
||||
FolderID string `json:"folder_id" validate:"required" oai:"description=归属文件夹ID"`
|
||||
}
|
||||
|
||||
type UpdateDoc struct {
|
||||
@@ -104,3 +106,12 @@ func (q *ListDocQuery) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateUploadURL struct {
|
||||
FileName string `query:"file_name" validate:"required" oai:"description=上传文件名"`
|
||||
}
|
||||
|
||||
type UploadURL struct {
|
||||
URL url.URL `json:"url" oai:"description=生成的预签名上传URL"`
|
||||
ObjectName string `json:"object_name" oai:"description=上传文件名"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user