Documentation ¶
Index ¶
- Constants
- func CheckSign(sign, appid, path, ts string) (ok bool)
- func File(c interface{}, filePath, fileName string)
- func JSON(c interface{}, data interface{}, err error)
- func Redirect(c interface{}, location string)
- func VerifySign(c *gin.Context)
- type CommonRsp
- type Config
- type EchoEngine
- type GinEngine
- type Pager
- type RecoverInfo
Constants ¶
View Source
const ( TypeOctetStream = "application/octet-stream" TypeForm = "application/x-www-form-urlencoded" TypeJson = "application/json" TypeXml = "application/xml" TypeJpg = "image/jpeg" TypePng = "image/png" )
Variables ¶
This section is empty.
Functions ¶
func VerifySign ¶
VerifySign 验证Sign,签名规则,base64(md5(appid+path+ts)) todo: 当前支持60s验证,后续改成单次验证后即失效
Types ¶
type EchoEngine ¶
type EchoEngine struct { Echo *echo.Echo // contains filtered or unexported fields }
func InitEcho ¶
func InitEcho(c *Config) *EchoEngine
func (*EchoEngine) Logger ¶
func (e *EchoEngine) Logger() echo.MiddlewareFunc
Logger echo middleware logger
func (*EchoEngine) Recover ¶
func (e *EchoEngine) Recover() echo.MiddlewareFunc
Recover echo middleware recover
func (*EchoEngine) Start ¶
func (e *EchoEngine) Start()
type GinEngine ¶
func (*GinEngine) Recovery ¶
func (g *GinEngine) Recovery() gin.HandlerFunc
Recovery gin middleware recovery
Click to show internal directories.
Click to hide internal directories.