feat: import services and standardize Go 1.26.5
This commit is contained in:
795
apps/base/cloud/swagger/cloud.swagger.json
Normal file
795
apps/base/cloud/swagger/cloud.swagger.json
Normal file
@@ -0,0 +1,795 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "blocks.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Album"
|
||||
},
|
||||
{
|
||||
"name": "Bookmark"
|
||||
},
|
||||
{
|
||||
"name": "Disk"
|
||||
},
|
||||
{
|
||||
"name": "Note"
|
||||
},
|
||||
{
|
||||
"name": "Private"
|
||||
},
|
||||
{
|
||||
"name": "Share"
|
||||
},
|
||||
{
|
||||
"name": "Space"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"cloudCloudAlbumItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "相册名称"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "相册描述"
|
||||
},
|
||||
"coverPhoto": {
|
||||
"type": "string",
|
||||
"title": "封面照片URL"
|
||||
},
|
||||
"isPrivate": {
|
||||
"type": "boolean",
|
||||
"title": "是否私有"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"photos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudPhotoItem"
|
||||
},
|
||||
"description": "相册下的照片",
|
||||
"title": "关联关系"
|
||||
}
|
||||
},
|
||||
"title": "相册模型"
|
||||
},
|
||||
"cloudCloudBookmarkItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "标题"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"title": "网址"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "描述"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"title": "分类"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
"title": "标签"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string",
|
||||
"title": "网站图标URL"
|
||||
},
|
||||
"isPrivate": {
|
||||
"type": "boolean",
|
||||
"title": "是否私有"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "网址收藏夹模型"
|
||||
},
|
||||
"cloudCloudDiskDirItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"parentId": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"title": "支持嵌套目录"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "目录名称"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"title": "完整路径"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"$ref": "#/definitions/cloudCloudDiskDirItem",
|
||||
"description": "父级目录",
|
||||
"title": "自关联"
|
||||
},
|
||||
"subdirectories": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudDiskDirItem"
|
||||
},
|
||||
"title": "子级目录"
|
||||
},
|
||||
"files": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudDiskFileItem"
|
||||
},
|
||||
"title": "文件"
|
||||
}
|
||||
},
|
||||
"title": "云盘目录模型"
|
||||
},
|
||||
"cloudCloudDiskFileItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"directoryId": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"title": "文件所属目录"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "文件名"
|
||||
},
|
||||
"originalName": {
|
||||
"type": "string",
|
||||
"title": "原始文件名"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "文件大小 (bytes)"
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string",
|
||||
"title": "文件类型"
|
||||
},
|
||||
"storagePath": {
|
||||
"type": "string",
|
||||
"title": "实际存储路径"
|
||||
},
|
||||
"hash": {
|
||||
"type": "string",
|
||||
"title": "文件哈希,用于去重"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"directory": {
|
||||
"$ref": "#/definitions/cloudCloudDiskDirItem",
|
||||
"description": "文件所属目录",
|
||||
"title": "关联关系"
|
||||
}
|
||||
},
|
||||
"title": "云盘文件"
|
||||
},
|
||||
"cloudCloudNoteItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "标题"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"title": "内容"
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"title": "分类"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
"title": "标签,逗号分隔"
|
||||
},
|
||||
"isMarkdown": {
|
||||
"type": "boolean",
|
||||
"title": "是否是markdown格式"
|
||||
},
|
||||
"isPinned": {
|
||||
"type": "boolean",
|
||||
"title": "是否是置顶"
|
||||
},
|
||||
"isPrivate": {
|
||||
"type": "boolean",
|
||||
"title": "是否是私有"
|
||||
},
|
||||
"views": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "浏览次数"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"attachments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudNoteAttachmentItem"
|
||||
},
|
||||
"title": "关联关系"
|
||||
}
|
||||
},
|
||||
"title": "知识笔记模型"
|
||||
},
|
||||
"cloudCloudPhotoItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"albumId": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"title": "专辑ID"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "照片标题"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "照片描述"
|
||||
},
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"title": "文件路径"
|
||||
},
|
||||
"fileSize": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "文件大小"
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string",
|
||||
"title": "文件类型"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "图片宽度"
|
||||
},
|
||||
"height": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "图片高度"
|
||||
},
|
||||
"takenAt": {
|
||||
"type": "string",
|
||||
"title": "拍摄时间"
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"title": "拍摄地点"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
"title": "标签,逗号分隔"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"album": {
|
||||
"$ref": "#/definitions/cloudCloudAlbumItem",
|
||||
"title": "关联关系"
|
||||
}
|
||||
},
|
||||
"title": "照片模型"
|
||||
},
|
||||
"cloudCloudPrivateItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"dataType": {
|
||||
"type": "string",
|
||||
"description": "数据类型: password, card, document, etc."
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "标题"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "描述"
|
||||
},
|
||||
"data": {
|
||||
"type": "string",
|
||||
"title": "加密存储的实际数据"
|
||||
},
|
||||
"isEncrypted": {
|
||||
"type": "boolean",
|
||||
"title": "是否已加密"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string",
|
||||
"title": "标签"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "个人隐私数据模型"
|
||||
},
|
||||
"cloudCloudShareItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"shareType": {
|
||||
"type": "string",
|
||||
"description": "file, album, note, etc."
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"title": "对应资源的ID"
|
||||
},
|
||||
"shareToken": {
|
||||
"type": "string",
|
||||
"title": "分享令牌"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"title": "可选分享密码"
|
||||
},
|
||||
"expiresAt": {
|
||||
"type": "string",
|
||||
"title": "过期时间"
|
||||
},
|
||||
"viewCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "浏览次数"
|
||||
},
|
||||
"downloadCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "下载次数"
|
||||
},
|
||||
"isPublic": {
|
||||
"type": "boolean",
|
||||
"title": "是否公开"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "分享系统模型"
|
||||
},
|
||||
"cloudCloudSpace": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalStorage": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "总存储空间"
|
||||
},
|
||||
"usedStorage": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "已用存储空间"
|
||||
},
|
||||
"maxStorage": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "最大存储空间"
|
||||
},
|
||||
"fileCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "文件数量"
|
||||
},
|
||||
"albumCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "相册数量"
|
||||
},
|
||||
"photoCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "照片数量"
|
||||
},
|
||||
"noteCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "笔记数量"
|
||||
},
|
||||
"bookmarkCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "书签数量"
|
||||
},
|
||||
"privateCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "私有数量"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"cloudDiskDirs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudDiskDirItem"
|
||||
},
|
||||
"description": "关联云盘目录",
|
||||
"title": "关联关系"
|
||||
},
|
||||
"cloudAlbums": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudAlbumItem"
|
||||
},
|
||||
"title": "关联相册"
|
||||
},
|
||||
"cloudNotes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudNoteItem"
|
||||
},
|
||||
"title": "关联笔记"
|
||||
},
|
||||
"cloudBookmarks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudBookmarkItem"
|
||||
},
|
||||
"title": "关联书签"
|
||||
},
|
||||
"cloudPrivate": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudPrivateItem"
|
||||
},
|
||||
"title": "关联私有数据"
|
||||
},
|
||||
"cloudShares": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudShareItem"
|
||||
},
|
||||
"title": "关联分享"
|
||||
}
|
||||
},
|
||||
"title": "系统统计和配置模型"
|
||||
},
|
||||
"cloudListAlbumsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"albums": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudAlbumItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListBookmarksResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bookmarks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudBookmarkItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListDirsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dirs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudDiskDirItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"title": "请求消息定义"
|
||||
},
|
||||
"cloudListFilesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"files": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudDiskFileItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListNotesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudNoteItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListPhotosResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"photos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudPhotoItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListPrivateDataResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudPrivateItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListSharesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"shares": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudCloudShareItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudNoteAttachmentItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"noteId": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"title": "笔记ID"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "string",
|
||||
"title": "文件名"
|
||||
},
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"title": "文件路径"
|
||||
},
|
||||
"fileSize": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "文件大小"
|
||||
},
|
||||
"mimeType": {
|
||||
"type": "string",
|
||||
"title": "文件类型"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"title": "创建时间"
|
||||
}
|
||||
},
|
||||
"title": "笔记附件模型"
|
||||
},
|
||||
"cloudStatusReply": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "状态码"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"title": "状态说明"
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"title": "数据"
|
||||
},
|
||||
"timeseq": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "响应时间序列"
|
||||
}
|
||||
},
|
||||
"title": "状态回复"
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
251
apps/base/cloud/swagger/cloud/disk.md
Normal file
251
apps/base/cloud/swagger/cloud/disk.md
Normal file
@@ -0,0 +1,251 @@
|
||||
# Disk
|
||||
|
||||
全都需要登录
|
||||
|
||||
- [/cloud.Disk/List](#clouddisklist)
|
||||
- [/cloud.Disk/DirTree](#clouddiskdirtree)
|
||||
- [/cloud.Disk/Download](#clouddiskdownload)
|
||||
- [/cloud.Disk/Make](#clouddiskmake)
|
||||
- [/cloud.Disk/Rename](#clouddiskrename)
|
||||
- [/cloud.Disk/Remove](#clouddiskremove)
|
||||
- [/cloud.Disk/Move](#clouddiskmove)
|
||||
- [/cloud.Disk/Copy](#clouddiskcopy)
|
||||
- [/cloud.Disk/Share](#clouddiskshare)
|
||||
- [/cloud.Disk/ParseShare](#clouddiskparseshare)
|
||||
|
||||
## /cloud.Disk/List
|
||||
|
||||
本级目录列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>, 文件夹唯一标识,获取顶级的不传
|
||||
name: "", // type<string>, 根据文件名称模糊查找,当该字段不为空时identity的限定失效
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/DirTree
|
||||
|
||||
目录树
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>, 文件夹唯一标识,获取顶级的不传
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>, 只返回文件夹
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/Download
|
||||
|
||||
本级及子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表,必传
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/Make
|
||||
|
||||
创建文件/文件夹
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
name: "", // type<string>, 文件/文件夹名称,必传
|
||||
ext: "", // type<string>, 后缀,文件夹传空即可
|
||||
parent_identity: "", // type<string>, 父文件夹标识,选填
|
||||
size: "0", // type<int64>, 文件大小,非文件夹时必传,单位:B
|
||||
hash: "", // type<string>, 文件hash值,非文件夹时必传
|
||||
path: "", // type<string>, 文件地址,非文件夹时必传
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/Rename
|
||||
|
||||
修改文件/文件夹名称
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>, 必传
|
||||
name: "", // type<string>, 文件/文件夹名称,必传
|
||||
ext: "", // type<string>, 后缀,文件夹传空即可
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Remove
|
||||
|
||||
移除文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Move
|
||||
|
||||
移动文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
target_identity: "", // type<string>, 目标文件夹标识,如果是顶级则不填
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Copy
|
||||
|
||||
复制文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
target_identity: "", // type<string>, 目标文件夹标识,如果是顶级则不填
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Share
|
||||
|
||||
分享文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
days: "0", // type<int64>, 有效天数,默认永久
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
key: "", // type<string>, 解析分享内容关键key
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/ParseShare
|
||||
|
||||
解析分享内容
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
key: "", // type<string>, 解析分享内容关键key
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>
|
||||
}
|
||||
```
|
||||
|
||||
251
apps/base/cloud/swagger/disk.md
Normal file
251
apps/base/cloud/swagger/disk.md
Normal file
@@ -0,0 +1,251 @@
|
||||
# Disk
|
||||
|
||||
全都需要登录
|
||||
|
||||
- [/cloud.Disk/List](#clouddisklist)
|
||||
- [/cloud.Disk/DirTree](#clouddiskdirtree)
|
||||
- [/cloud.Disk/Download](#clouddiskdownload)
|
||||
- [/cloud.Disk/Make](#clouddiskmake)
|
||||
- [/cloud.Disk/Rename](#clouddiskrename)
|
||||
- [/cloud.Disk/Remove](#clouddiskremove)
|
||||
- [/cloud.Disk/Move](#clouddiskmove)
|
||||
- [/cloud.Disk/Copy](#clouddiskcopy)
|
||||
- [/cloud.Disk/Share](#clouddiskshare)
|
||||
- [/cloud.Disk/ParseShare](#clouddiskparseshare)
|
||||
|
||||
## /cloud.Disk/List
|
||||
|
||||
本级目录列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>, 文件夹唯一标识,获取顶级的不传
|
||||
name: "", // type<string>, 根据文件名称模糊查找,当该字段不为空时identity的限定失效
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/DirTree
|
||||
|
||||
目录树
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>, 文件夹唯一标识,获取顶级的不传
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>, 只返回文件夹
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/Download
|
||||
|
||||
本级及子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表,必传
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/Make
|
||||
|
||||
创建文件/文件夹
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
name: "", // type<string>, 文件/文件夹名称,必传
|
||||
ext: "", // type<string>, 后缀,文件夹传空即可
|
||||
parent_identity: "", // type<string>, 父文件夹标识,选填
|
||||
size: "0", // type<int64>, 文件大小,非文件夹时必传,单位:B
|
||||
hash: "", // type<string>, 文件hash值,非文件夹时必传
|
||||
path: "", // type<string>, 文件地址,非文件夹时必传
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/Rename
|
||||
|
||||
修改文件/文件夹名称
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
identity: "", // type<string>, 必传
|
||||
name: "", // type<string>, 文件/文件夹名称,必传
|
||||
ext: "", // type<string>, 后缀,文件夹传空即可
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Remove
|
||||
|
||||
移除文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Move
|
||||
|
||||
移动文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
target_identity: "", // type<string>, 目标文件夹标识,如果是顶级则不填
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Copy
|
||||
|
||||
复制文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
target_identity: "", // type<string>, 目标文件夹标识,如果是顶级则不填
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
## /cloud.Disk/Share
|
||||
|
||||
分享文件/文件夹及其子级递归列表
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
list: [""], // list<string>, identity列表
|
||||
days: "0", // type<int64>, 有效天数,默认永久
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
key: "", // type<string>, 解析分享内容关键key
|
||||
}
|
||||
```
|
||||
## /cloud.Disk/ParseShare
|
||||
|
||||
解析分享内容
|
||||
|
||||
|
||||
### Request
|
||||
```javascript
|
||||
{
|
||||
key: "", // type<string>, 解析分享内容关键key
|
||||
}
|
||||
```
|
||||
|
||||
### Reply
|
||||
```javascript
|
||||
{
|
||||
list: [{
|
||||
identity: "", // type<string>, 唯一标识
|
||||
name: "", // type<string>, 文件/文件夹名称
|
||||
ext: "", // type<string>, 后缀,文件夹时为空
|
||||
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||||
file: {
|
||||
identity: "", // type<string>, 唯一标识
|
||||
path: "", // type<string>, 文件路径
|
||||
size: "0", // type<int64>, 文件大小,单位:B
|
||||
}, // type<File>, 文件信息
|
||||
created_at: "", // type<string>
|
||||
updated_at: "", // type<string>
|
||||
children: [{}], // list<UserFile>, 子文件夹
|
||||
}], // list<UserFile>
|
||||
}
|
||||
```
|
||||
|
||||
166
apps/base/cloud/swagger/initial.swagger.json
Normal file
166
apps/base/cloud/swagger/initial.swagger.json
Normal file
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "disk.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Disk"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"cloudDirTreeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudUserFile"
|
||||
},
|
||||
"title": "只返回文件夹"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudEmpty": {
|
||||
"type": "object"
|
||||
},
|
||||
"cloudFile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"title": "唯一标识"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"title": "文件路径"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "文件大小,单位:B"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudUserFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudMakeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudParseShareResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudUserFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudShareResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"title": "解析分享内容关键key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cloudUserFile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"title": "唯一标识"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "文件/文件夹名称"
|
||||
},
|
||||
"ext": {
|
||||
"type": "string",
|
||||
"title": "后缀,文件夹时为空"
|
||||
},
|
||||
"parent": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "父级文件夹序列,按文件名称查询时候生效"
|
||||
},
|
||||
"file": {
|
||||
"$ref": "#/definitions/cloudFile",
|
||||
"title": "文件信息"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"children": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/cloudUserFile"
|
||||
},
|
||||
"title": "子文件夹"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user