Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/opp into dev
正在显示
4 个修改的文件
包含
6 行增加
和
35 行删除
| @@ -67,6 +67,7 @@ func (this *BaseController) Valid(obj interface{}) (result bool, msg *protocol.R | @@ -67,6 +67,7 @@ func (this *BaseController) Valid(obj interface{}) (result bool, msg *protocol.R | ||
| 67 | msg = protocol.BadRequestParam(2) | 67 | msg = protocol.BadRequestParam(2) |
| 68 | return | 68 | return |
| 69 | } | 69 | } |
| 70 | + | ||
| 70 | return | 71 | return |
| 71 | } | 72 | } |
| 72 | 73 | ||
| @@ -76,24 +77,6 @@ func (this *BaseController) Resp(msg *protocol.ResponseMessage) { | @@ -76,24 +77,6 @@ func (this *BaseController) Resp(msg *protocol.ResponseMessage) { | ||
| 76 | this.ServeJSON() | 77 | this.ServeJSON() |
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | -//GenMessage genarate a response message | ||
| 80 | -// func (this *BaseController) GenMessage(rsp interface{}, err error) *protocol.ResponseMessage { | ||
| 81 | -// var msg *protocol.ResponseMessage | ||
| 82 | -// if err == nil { | ||
| 83 | -// msg = protocol.ReturnResponse(0) | ||
| 84 | -// msg.Data = rsp | ||
| 85 | -// return msg | ||
| 86 | -// } | ||
| 87 | -// //log.Error(err) | ||
| 88 | -// if e, ok := err.(common.Error); ok { | ||
| 89 | -// msg = protocol.ReturnResponse(e.Code) | ||
| 90 | -// msg.Data = rsp | ||
| 91 | -// return msg | ||
| 92 | -// } | ||
| 93 | -// msg = protocol.ReturnResponse(1) | ||
| 94 | -// return msg | ||
| 95 | -// } | ||
| 96 | - | ||
| 97 | //获取请求头信息 | 80 | //获取请求头信息 |
| 98 | func GetRequestHeader(ctx *context.Context) *protocol.RequestHeader { | 81 | func GetRequestHeader(ctx *context.Context) *protocol.RequestHeader { |
| 99 | h := &protocol.RequestHeader{} | 82 | h := &protocol.RequestHeader{} |
| @@ -6,10 +6,12 @@ require ( | @@ -6,10 +6,12 @@ require ( | ||
| 6 | github.com/astaxie/beego v1.10.0 | 6 | github.com/astaxie/beego v1.10.0 |
| 7 | github.com/go-sql-driver/mysql v1.4.1 | 7 | github.com/go-sql-driver/mysql v1.4.1 |
| 8 | github.com/gorilla/websocket v1.4.1 | 8 | github.com/gorilla/websocket v1.4.1 |
| 9 | + github.com/klauspost/cpuid v1.2.1 // indirect | ||
| 9 | github.com/prometheus/client_golang v1.1.0 | 10 | github.com/prometheus/client_golang v1.1.0 |
| 10 | - github.com/prometheus/common v0.6.0 | ||
| 11 | - github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect | 11 | + github.com/satori/go.uuid v1.2.0 |
| 12 | + github.com/sony/sonyflake v1.0.0 | ||
| 12 | gitlab.fjmaimaimai.com/mmm-go/gocomm v0.0.1 | 13 | gitlab.fjmaimaimai.com/mmm-go/gocomm v0.0.1 |
| 14 | + golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect | ||
| 13 | google.golang.org/appengine v1.6.2 // indirect | 15 | google.golang.org/appengine v1.6.2 // indirect |
| 14 | ) | 16 | ) |
| 15 | 17 |
services/filestore/file.go
已删除
100755 → 0
| 1 | -package filestore | ||
| 2 | - | ||
| 3 | -//IFileStore TODO文件存储相关 | ||
| 4 | -type IFileStore interface { | ||
| 5 | - Auth() error //在获取文件前进行对请求进行检查 | ||
| 6 | - ReadFile() (string, error) //实际获取文件操作 | ||
| 7 | - StoreFile() (string, error) //实际存储文件操作 | ||
| 8 | - DeleteFile() error | ||
| 9 | -} | ||
| 10 | - | ||
| 11 | -// type LocalFileStore struct { | ||
| 12 | -// } | ||
| 13 | - | ||
| 14 | -// type XXXFileStore struct { | ||
| 15 | -// } |
-
请 注册 或 登录 后发表评论