Documentation
¶
Index ¶
- Variables
- func JumpToApiError(context gcontroller.ActionContext, args ...interface{})
- func SetApiSignParams(qs *query.QuerySet, asp *ApiSignParams)
- func VerifyApiSign(asp *ApiSignParams, queryValues url.Values, signQueryNames []string, ...) *exception.Exception
- type ApiContext
- type ApiSignParams
- type BaseController
- type IApiDataContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiSignQueryNames = []string{"t", "nonce"}
Functions ¶
func JumpToApiError ¶
func JumpToApiError(context gcontroller.ActionContext, args ...interface{})
func SetApiSignParams ¶
func SetApiSignParams(qs *query.QuerySet, asp *ApiSignParams)
func VerifyApiSign ¶
Types ¶
type ApiContext ¶
type ApiContext struct {
*controller.BaseContext
ApiData struct {
V string
Data interface{}
Err *exception.Exception
}
MysqlClient *mysql.Client
RedisPool *redis.Pool
RedisClient *redis.Client
MongoPool *mongo.Pool
MongoClient *mongo.Client
MongoLogger golog.ILogger
}
func (*ApiContext) AfterAction ¶
func (a *ApiContext) AfterAction()
func (*ApiContext) BeforeAction ¶
func (a *ApiContext) BeforeAction()
func (*ApiContext) Data ¶
func (a *ApiContext) Data() interface{}
func (*ApiContext) Destruct ¶
func (a *ApiContext) Destruct()
func (*ApiContext) Err ¶
func (a *ApiContext) Err() *exception.Exception
func (*ApiContext) Version ¶
func (a *ApiContext) Version() string
type BaseController ¶
type BaseController struct {
controller.BaseController
}
func (*BaseController) NewActionContext ¶
func (b *BaseController) NewActionContext(req *http.Request, respWriter http.ResponseWriter) gcontroller.ActionContext
type IApiDataContext ¶
type IApiDataContext interface {
gcontroller.ActionContext
Version() string
Data() interface{}
Err() *exception.Exception
}
Click to show internal directories.
Click to hide internal directories.