Feat: sign auth middleware

This commit is contained in:
HFO4
2019-12-10 20:17:21 +08:00
parent 36d5f51495
commit ea7f034332
4 changed files with 45 additions and 8 deletions

View File

@@ -14,6 +14,19 @@ type FileDownloadService struct {
Path string `uri:"path" binding:"required,min=1,max=65535"`
}
type FileAnonymousGetService struct {
ID uint `uri:"id" binding:"required,min=1"`
Name string `uri:"name" binding:"required"`
}
// Download 签名的匿名文件下载
func (service *FileAnonymousGetService) Download(ctx context.Context, c *gin.Context) serializer.Response {
return serializer.Response{
Code: 0,
}
}
// Download 文件下载
func (service *FileDownloadService) Download(ctx context.Context, c *gin.Context) serializer.Response {
// 创建文件系统