type TokenCheck struct {}
func NewTokenCheck() *TokenCheck {
return &TokenCheck{}
}
func(this *TokenCheck) OnRequest(ctx *gin.Context) error{
if ctx.Query("token")==""{
goft.Throw("token requred",503,ctx)
}
return nil
}
func(this *TokenCheck) OnResponse(result interface{}) (interface{}, error){
return result,nil
}