作者 yangfu

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/opp into dev

... ... @@ -23,3 +23,4 @@
opp
/vendor
/*.exe~
... ...
... ... @@ -67,6 +67,7 @@ func (this *BaseController) Valid(obj interface{}) (result bool, msg *protocol.R
msg = protocol.BadRequestParam(2)
return
}
return
}
... ... @@ -76,24 +77,6 @@ func (this *BaseController) Resp(msg *protocol.ResponseMessage) {
this.ServeJSON()
}
//GenMessage genarate a response message
// func (this *BaseController) GenMessage(rsp interface{}, err error) *protocol.ResponseMessage {
// var msg *protocol.ResponseMessage
// if err == nil {
// msg = protocol.ReturnResponse(0)
// msg.Data = rsp
// return msg
// }
// //log.Error(err)
// if e, ok := err.(common.Error); ok {
// msg = protocol.ReturnResponse(e.Code)
// msg.Data = rsp
// return msg
// }
// msg = protocol.ReturnResponse(1)
// return msg
// }
//获取请求头信息
func GetRequestHeader(ctx *context.Context) *protocol.RequestHeader {
h := &protocol.RequestHeader{}
... ...
... ... @@ -6,10 +6,12 @@ require (
github.com/astaxie/beego v1.10.0
github.com/go-sql-driver/mysql v1.4.1
github.com/gorilla/websocket v1.4.1
github.com/klauspost/cpuid v1.2.1 // indirect
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/common v0.6.0
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
github.com/satori/go.uuid v1.2.0
github.com/sony/sonyflake v1.0.0
gitlab.fjmaimaimai.com/mmm-go/gocomm v0.0.1
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect
google.golang.org/appengine v1.6.2 // indirect
)
... ...
package filestore
//IFileStore TODO文件存储相关
type IFileStore interface {
Auth() error //在获取文件前进行对请求进行检查
ReadFile() (string, error) //实际获取文件操作
StoreFile() (string, error) //实际存储文件操作
DeleteFile() error
}
// type LocalFileStore struct {
// }
// type XXXFileStore struct {
// }