Documentation
¶
Index ¶
Constants ¶
View Source
const TokenExpireDuration = time.Hour * 24 * 30
TokenExpireDuration expireDuration
Variables ¶
View Source
var MySecret = []byte("#1024helper")
MySecret ...
Functions ¶
func HTTPResponse ¶
HTTPResponse 统一返回格式
Types ¶
type Context ¶
type Context struct {
context.Context
Operator *Operator
// contains filtered or unexported fields
}
Context context define
type ListData ¶
type ListData struct {
TotalOption
List interface{} `json:"list"`
}
ListData ...
func NewListData ¶
func NewListData(opt PageOption, total int64, list interface{}) *ListData
NewListData fill data
type PageOption ¶
type PageOption struct {
PageIndex int `form:"pageIndex"`
PageSize int `form:"pageSize"`
Sort string `form:"sort"` //asc or desc
Scope string `form:"scope"`
}
PageOption ...
type ResultReply ¶
type ResultReply struct {
Result bool `json:"result"`
Msg interface{} `json:"msg"`
}
ResultReply ...
Click to show internal directories.
Click to hide internal directories.