360 lines
9.0 KiB
YAML
360 lines
9.0 KiB
YAML
definitions:
|
||
model.AbortMultipartUploadRequest:
|
||
properties:
|
||
appId:
|
||
description: 应用 ID
|
||
type: string
|
||
key:
|
||
description: 文件名(包含路径)
|
||
type: string
|
||
ossType:
|
||
description: 云服务商, 可不填, 会选择默认服务商, 目前可选huaweiyun,aliyun,minio(不支持临时角色)
|
||
type: string
|
||
uploadId:
|
||
description: 分段上传任务全局唯一标识
|
||
type: string
|
||
required:
|
||
- appId
|
||
- key
|
||
- uploadId
|
||
type: object
|
||
model.AbortMultipartUploadResponse:
|
||
type: object
|
||
model.CompleteMultipartUploadRequest:
|
||
properties:
|
||
appId:
|
||
description: 应用 ID
|
||
type: string
|
||
key:
|
||
description: 文件名(包含路径)
|
||
type: string
|
||
ossType:
|
||
description: 云服务商, 可不填, 会选择默认服务商, 目前可选huaweiyun,aliyun,minio(不支持临时角色)
|
||
type: string
|
||
parts:
|
||
items:
|
||
$ref: '#/definitions/model.Part'
|
||
type: array
|
||
uploadId:
|
||
description: 分段上传任务全局唯一标识
|
||
type: string
|
||
required:
|
||
- appId
|
||
- key
|
||
- parts
|
||
- uploadId
|
||
type: object
|
||
model.CompleteMultipartUploadResponse:
|
||
properties:
|
||
uri:
|
||
type: string
|
||
url:
|
||
description: 资源链接
|
||
type: string
|
||
type: object
|
||
model.GeneralResponse:
|
||
properties:
|
||
data:
|
||
type: object
|
||
message:
|
||
type: integer
|
||
result:
|
||
type: integer
|
||
type: object
|
||
model.GetHostReq:
|
||
properties:
|
||
appId:
|
||
description: 应用 ID
|
||
type: string
|
||
ossType:
|
||
description: 云服务商, 可不填, 会选择默认服务商, 目前可选huaweiyun,aliyun,minio(不支持临时角色)
|
||
type: string
|
||
required:
|
||
- appId
|
||
type: object
|
||
model.GetHostResp:
|
||
properties:
|
||
host:
|
||
type: string
|
||
type: object
|
||
model.InitMultipartUploadRequest:
|
||
properties:
|
||
appId:
|
||
description: 应用 ID
|
||
type: string
|
||
key:
|
||
description: 文件名(包含路径)
|
||
type: string
|
||
ossType:
|
||
description: 云服务商, 可不填, 会选择默认服务商, 目前可选huaweiyun,aliyun,minio(不支持临时角色)
|
||
type: string
|
||
required:
|
||
- appId
|
||
- key
|
||
type: object
|
||
model.InitMultipartUploadResponse:
|
||
properties:
|
||
key:
|
||
description: 文件名(包含路径)
|
||
type: string
|
||
uploadId:
|
||
description: 分段上传任务全局唯一标识
|
||
type: string
|
||
type: object
|
||
model.Part:
|
||
properties:
|
||
ETag:
|
||
description: 段数据的MD5值
|
||
type: string
|
||
partNumber:
|
||
description: 分段序号, 范围是1~10000
|
||
type: integer
|
||
required:
|
||
- ETag
|
||
- partNumber
|
||
type: object
|
||
model.UploadPartResponse:
|
||
properties:
|
||
ETag:
|
||
description: 段数据的MD5值
|
||
type: string
|
||
key:
|
||
description: 文件名(包含路径)
|
||
type: string
|
||
partNumber:
|
||
description: 分段序号, 范围是1~10000
|
||
type: integer
|
||
uploadId:
|
||
description: 分段上传任务全局唯一标识
|
||
type: string
|
||
required:
|
||
- ETag
|
||
- partNumber
|
||
type: object
|
||
model.UploadResponse:
|
||
properties:
|
||
uri:
|
||
type: string
|
||
url:
|
||
description: 资源链接
|
||
type: string
|
||
type: object
|
||
host: 127.0.0.1:18005
|
||
info:
|
||
contact: {}
|
||
title: 云存储服务接口
|
||
version: "1.0"
|
||
paths:
|
||
/abort-multipart-upload:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
parameters:
|
||
- description: MOCK
|
||
in: header
|
||
name: FZM-SIGNATURE
|
||
required: true
|
||
type: string
|
||
- description: body
|
||
in: body
|
||
name: data
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/model.AbortMultipartUploadRequest'
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/model.GeneralResponse'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/model.AbortMultipartUploadResponse'
|
||
type: object
|
||
summary: 取消分段上传任务
|
||
tags:
|
||
- oss 分段上传
|
||
/complete-multipart-upload:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
parameters:
|
||
- description: MOCK
|
||
in: header
|
||
name: FZM-SIGNATURE
|
||
required: true
|
||
type: string
|
||
- description: body
|
||
in: body
|
||
name: data
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/model.CompleteMultipartUploadRequest'
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/model.GeneralResponse'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/model.CompleteMultipartUploadResponse'
|
||
type: object
|
||
summary: 合并段
|
||
tags:
|
||
- oss 分段上传
|
||
/get-host:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
parameters:
|
||
- description: MOCK
|
||
in: header
|
||
name: FZM-SIGNATURE
|
||
required: true
|
||
type: string
|
||
- description: body
|
||
in: body
|
||
name: data
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/model.GetHostReq'
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/model.GeneralResponse'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/model.GetHostResp'
|
||
type: object
|
||
summary: 获得 oss Host
|
||
tags:
|
||
- oss
|
||
/init-multipart-upload:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
parameters:
|
||
- description: MOCK
|
||
in: header
|
||
name: FZM-SIGNATURE
|
||
required: true
|
||
type: string
|
||
- description: body
|
||
in: body
|
||
name: data
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/model.InitMultipartUploadRequest'
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/model.GeneralResponse'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/model.InitMultipartUploadResponse'
|
||
type: object
|
||
summary: 初始化分段上传任务
|
||
tags:
|
||
- oss 分段上传
|
||
/upload:
|
||
post:
|
||
consumes:
|
||
- multipart/form-data
|
||
parameters:
|
||
- description: MOCK
|
||
in: header
|
||
name: FZM-SIGNATURE
|
||
required: true
|
||
type: string
|
||
- description: file
|
||
in: formData
|
||
name: file
|
||
required: true
|
||
type: file
|
||
- description: 应用 ID
|
||
in: formData
|
||
name: appId
|
||
required: true
|
||
type: string
|
||
- description: 文件名(包含路径)
|
||
in: formData
|
||
name: key
|
||
required: true
|
||
type: string
|
||
- description: 云服务商, 可不填, 会选择默认服务商, 目前可选huaweiyun,aliyun,minio(不支持临时角色)
|
||
in: formData
|
||
name: ossType
|
||
type: string
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/model.GeneralResponse'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/model.UploadResponse'
|
||
type: object
|
||
summary: 上传文件
|
||
tags:
|
||
- oss 普通上传
|
||
/upload-part:
|
||
post:
|
||
consumes:
|
||
- multipart/form-data
|
||
parameters:
|
||
- description: MOCK
|
||
in: header
|
||
name: FZM-SIGNATURE
|
||
required: true
|
||
type: string
|
||
- description: aliyun, huaweiyun 除了最后一段以外,其他段的大小范围是100KB~5GB;最后段大小范围是0~5GB。minio
|
||
除了最后一段以外,其他段的大小范围是5MB~5GB;最后段大小范围是0~5GB。
|
||
in: formData
|
||
name: file
|
||
required: true
|
||
type: file
|
||
- description: 应用 ID
|
||
in: formData
|
||
name: appId
|
||
required: true
|
||
type: string
|
||
- description: 文件名(包含路径)
|
||
in: formData
|
||
name: key
|
||
required: true
|
||
type: string
|
||
- description: 云服务商, 可不填, 会选择默认服务商, 目前可选huaweiyun,aliyun,minio(不支持临时角色)
|
||
in: formData
|
||
name: ossType
|
||
type: string
|
||
- description: 分段序号, 范围是1~10000
|
||
in: formData
|
||
name: partNumber
|
||
required: true
|
||
type: integer
|
||
- description: 分段上传任务全局唯一标识
|
||
in: formData
|
||
name: uploadId
|
||
required: true
|
||
type: string
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/definitions/model.GeneralResponse'
|
||
- properties:
|
||
data:
|
||
$ref: '#/definitions/model.UploadPartResponse'
|
||
type: object
|
||
summary: 上传段
|
||
tags:
|
||
- oss 分段上传
|
||
swagger: "2.0"
|