diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7b9fb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +### Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out +.idea +storage/* +blog.iml +# Dependency directories (remove the comment below to include it) +# vendor/ + diff --git a/docs/docs.go b/docs/docs.go index 1362024..2ecc6b9 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -268,7 +268,7 @@ var doc = `{ { "type": "file", "description": "文件", - "name": "state", + "name": "file", "in": "formData", "required": true } diff --git a/docs/swagger.json b/docs/swagger.json index 993bc8a..e5006c7 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -251,7 +251,7 @@ { "type": "file", "description": "文件", - "name": "state", + "name": "file", "in": "formData", "required": true } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 9dc2271..b0f4456 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -219,7 +219,7 @@ paths: type: integer - description: 文件 in: formData - name: state + name: file required: true type: file produces: diff --git a/internal/routess/api/upload.go b/internal/routess/api/upload.go index 7c278c9..6bf56fa 100644 --- a/internal/routess/api/upload.go +++ b/internal/routess/api/upload.go @@ -19,7 +19,7 @@ func NewUpload() Upload { // @Summary 上传图片 // @Produce json // @Param type formData int true "文件类型1图片" required Enums(1,2,3) -// @Param state formData file true "文件" +// @Param file formData file true "文件" // @Success 200 {object} service.FileInfo "成功" // @Failure 400 {object} errorcode.Error "请求错误" // @Failure 500 {object} errorcode.Error "内部错误" diff --git a/storage/logs/app.log b/storage/logs/app.log deleted file mode 100644 index 2cfb486..0000000 --- a/storage/logs/app.log +++ /dev/null @@ -1,50 +0,0 @@ -2021/05/27 11:05:37 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622084737609101710} -2021/05/27 11:21:12 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622085672929232372} -2021/05/27 11:51:10 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622087470164603650} -2021/05/27 11:51:27 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622087487441027324} -2021/05/27 11:54:41 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622087681328002588} -2021/05/27 11:57:54 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622087874303187563} -2021/05/27 14:07:35 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622095655653485221} -2021/05/27 14:08:02 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622095682368233943} -2021/05/27 14:08:25 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622095705608187304} -2021/05/27 14:37:06 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622097426493197748} -2021/05/27 14:37:14 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State必须是[0 1]中的一个","time":1622097434325394979} -2021/05/27 14:38:00 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State必须是[0 1]中的一个","time":1622097480138488964} -2021/05/27 16:02:37 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622102557922696550} -2021/05/27 16:06:13 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: ","time":1622102773119591365} -2021/05/27 16:17:48 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622103468619951851} -2021/05/27 16:20:57 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622103657062869940} -2021/05/27 16:39:06 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622104746415966590} -2021/05/27 16:46:18 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622105178606120868} -2021/05/27 16:47:02 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622105222324148943} -2021/05/27 19:32:06 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622115126240365402} -2021/05/27 19:38:00 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622115480450697332} -2021/05/27 19:56:13 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622116573249023863} -2021/05/27 19:57:06 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622116626105455018} -2021/05/27 19:59:00 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622116740320292554} -2021/05/27 19:59:17 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622116757447119782} -2021/05/27 19:59:51 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622116791393630451} -2021/05/28 10:18:28 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622168308865618331} -2021/05/28 11:01:23 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622170883605638925} -2021/05/28 11:21:46 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622172106599262267} -2021/05/28 11:31:47 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622172707489849654} -2021/05/28 11:31:50 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622172710615258635} -2021/05/28 11:31:53 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622172713867713030} -2021/05/28 11:33:49 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622172829474375529} -2021/05/28 11:34:18 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622172858829135730} -2021/05/28 11:34:19 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622172859814946252} -2021/05/28 11:35:47 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622172947398620704} -2021/05/28 11:38:50 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622173130414371110} -2021/05/28 11:41:36 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622173296327015991} -2021/05/28 16:28:31 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622190511003684831} -2021/05/28 16:53:48 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622192028460804461} -2021/05/28 17:02:49 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622192569815835955} -2021/05/28 17:04:13 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622192653208795175} -2021/05/28 17:05:45 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622192745007678561} -2021/05/28 17:05:49 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622192749363800854} -2021/05/28 17:06:02 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"app.BindAndValid errs: State为必填字段","time":1622192762407831575} -2021/05/28 17:09:42 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622192982235099983} -2021/05/28 17:10:37 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622193037895200224} -2021/05/28 17:22:05 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622193725365423500} -2021/05/28 18:35:09 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622198109257587951} -2021/05/28 18:36:38 {"callers":["/home/xing/IdeaProjects/blog/main.go: 26 main.init.0"],"level":"info","message":"eddycjy: go-programming-tour-book/blog-service","time":1622198198869750999}