1 Star 0 Fork 0

zhaoziliang/cloud-disk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
core.api 6.23 KB
一键复制 编辑 原始数据 按行查看 历史
zhao 提交于 2023-12-13 17:16 . cloud-disk
service core-api {
//用户登录
@handler UserLogin
post /user/login(LoginRequest) returns (LoginReply)
//用户详情
@handler UserDetail
get /user/detail(UserDetailRequest) returns (UserDetailReply)
//邮件发送
@handler MailCodeSendRegister
post /mail/code/send/register(MailCodeSendRequest) returns(MailCodeSendReply)
//用户注册
@handler UserRegister
post /user/register(UserRegisterRequest) returns(UserRegisterReply)
//获取资源详情
@handler ShareBasicDetail
get /share/basic/detail(ShareBasicDetailRequest)returns(ShareBasicDetailReply)
}
@server (
middleware :Auth
)
service core-api{
//文件上传
@handler FileUpload
post /file/upload(FileUploadRequest) returns(FileUploadReply)
//用户文件的关联存储
@handler UserRepositorySave
post /user/repository/save(UserRepositorySaveRequest) returns (UserRepositorySaveReply)
//用户文件列表
@handler UserRepositoryList
get /user/file/list(UserFileListRequest)returns(UserFileListReply)
//用户文件名称修改
@handler UserFileNameUpdate
post /user/file/name/update(UserFileNameUpdateRequest)returns(UserFileNameUpdateReply)
//用户-文件夹创建
@handler UserFolderCreate
post /user/folder/create(UserFolderCreateRequest)returns(UserFolderCreateReply)
//用户-文件删除
@handler UserFileDelete
delete /user/file/delete(UserFileDeleteRequest)returns(UserFileDeleteReply)
//用户-文件移动
@handler UserFileMove
put /user/file/move(UserFileMoveRequest)returns(UserFileMoveReply)
//创建分享记录
@handler ShareBasicCreate
post /share/basic/create(ShareBasicCreateRequest)returns(ShareBasicCreateReply)
//资源的保存
@handler ShareBasicSave
post /share/basic/save(ShareBasicSaveRequest) returns(ShareBasicSaveReply)
// 刷新Authorization
@handler RefreshAuthorization
post /refresh/authorization(RefreshAuthorizationRequest)returns (RefreshAuthorizationReply)
//文件上传前基本信息处理
@handler FileUploadPrepare
post /file/upload/prepare(FileUploadPrepareRequest)returns(FileUploadPrepareReply)
//文件分片上传
@handler FileUploadChunk
post /file/upload/chunk(FileUploadChunkRequest)returns(FileUploadChunkReply)
//文件分片上传完成
@handler FileUploadChunkComplete
post /file/upload/chunk/complete(FileUploadChunkCompleteRequest)returns(FileUploadChunkCompleteReply)
}
type LoginRequest {
Name string `json:"name"`
Password string `json:"password"`
}
type LoginReply {
Token string `json:"token"`
RefreshToken string `json:"refresh_token"`
}
type UserDetailRequest {
Identity string `json:"identity"`
}
type UserDetailReply {
Name string `json:"name"`
Email string `json:"email"`
}
type MailCodeSendRequest {
Email string `json:"email"`
}
type MailCodeSendReply {
}
type UserRegisterRequest {
//用户名
Name string `json:"name"`
//密码
Password string `json:"password"`
//邮箱
Email string `json:"email"`
//验证码
Code string `json:"code"`
}
type UserRegisterReply {
}
type FileUploadRequest {
Hash string `json:"hash,optional"`
Name string `json:"name,optional"`
Ext string `json:"ext,optional"`
Size int64 `json:"size,optional"`
Path string `json:"path,optional"`
}
type FileUploadReply {
Identity string `json:"identity"`
Ext string `json:"ext"`
Name string `json:"name"`
}
type UserRepositorySaveRequest {
ParentId int64 `json:"parentId"`
RepositoryIdentity string `json:"repositoryIdentity"`
Ext string `json:"ext"`
Name string `json:"name"`
}
type UserRepositorySaveReply {
}
type UserFileListRequest {
Id int64 `json:"id,optional"`
Page int `json:"page,optional"`
Size int `json:"size,optional"`
}
type UserFileListReply {
List []*UserFile `json:"list"`
Count int64 `json:"count"`
}
type UserFile {
Id int64 `json:"id"`
Identity string `json:"identity"`
RepositoryIdentity string `json:"repository_identity"`
Name string `json:"name"`
Ext string `json:"ext"`
Path string `json:"path"`
Size int64 `json:"size"`
}
type UserFileNameUpdateRequest {
Identity string `json:"identity"`
Name string `json:"name"`
}
type UserFileNameUpdateReply {
}
type UserFolderCreateRequest {
ParentId int64 `json:"parentId"`
Name string `json:"name"`
}
type UserFolderCreateReply {
Identity string `json:"identity"`
}
type UserFileDeleteRequest {
Identity string `json:"identity"`
}
type UserFileDeleteReply {
}
type UserFileMoveRequest {
Identity string `json:"identity"`
ParentIdentity string `json:"parent_identity"`
}
type UserFileMoveReply {
}
type ShareBasicCreateRequest {
UserRepositoryIdentity string `json:"user_repository_identity"`
ExpiredTime int64 `json:"expired_time"`
}
type ShareBasicCreateReply {
Identity string `json:"identity"`
}
type ShareBasicDetailRequest {
Identity string `json:"identity"`
}
type ShareBasicDetailReply {
Name string `json:"name"`
Ext string `json:"ext"`
Size int64 `json:"size"`
Path string `json:"path"`
RepositoryIdentity string `json:"repository_identity"`
}
type ShareBasicSaveRequest {
RepositoryIdentity string `json:"repository_identity"`
ParentId int64 `json:"parentId"`
}
type ShareBasicSaveReply {
Identity string `json:"identity"`
}
type RefreshAuthorizationRequest {
}
type RefreshAuthorizationReply {
Token string `json:"token"`
RefreshToken string `json:"refresh_token"`
}
type FileUploadPrepareRequest {
Md5 string `json:"md5"`
Name string `json:"name"`
Ext string `json:"ext"`
}
type FileUploadPrepareReply {
Identity string `json:"identity"`
UploadId string `json:"upload_id"`
Key string `json:"key"`
}
type FileUploadChunkRequest {
// Key string `json:"key" form:"key"`
// UploadId string `json:"upload_id" form:"upload_id"`
// PartNumber string `json:"part_number" form:"part_number"`
}
type FileUploadChunkReply {
Etag string `json:"etag"` //md5
}
type FileUploadChunkCompleteRequest {
Key string `json:"key"`
UploadId string `json:"upload_id"`
CosObject []CosObject `json:"cos_object"`
}
type CosObject {
PartNumber int `json:"part_number" form:"part_number"`
Etag string `json:"etag"`
}
type FileUploadChunkCompleteReply {
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zhaowen5168/cloud-disk.git
[email protected]:zhaowen5168/cloud-disk.git
zhaowen5168
cloud-disk
cloud-disk
master

搜索帮助