Versions in this module Expand all Collapse all v1 v1.1.19 May 10, 2022 v1.1.18 May 10, 2022 v1.1.17 May 10, 2022 Changes in this version + const AbortIndex + const FileTypeDocument + const FileTypeMusic + const FileTypeOther + const FileTypePicture + const FileTypeVideo + var Ctx = context.Background() + func Monitor() (err error) + func NewConfig() *config + func NewCrypt(input string) *crypt + func NewError(input string) *err + func NewExcel(file string) *excel + func NewLogger() *logger + func NewMySQL() *mySql + func NewRedis() *redisModel + func NewRequest() *httpRequest + func NewSnowflake(workId, dataId int64) (id int64, err error) + func NewUtil() *util + func NewValidate() *validate + func Println(input string, color int) + func Recover() + type Captcha struct + func NewImage(digits []int, width, height int) *Captcha + func (captcha *Captcha) WriteTo(w io.Writer) (int64, error) + type Context struct + Errors []ErrorMsg + Keys map[string]interface{} + Params httprouter.Params + Req *http.Request + Writer http.ResponseWriter + func (c *Context) Abort(code int) + func (c *Context) Error(err error, meta interface{}) + func (c *Context) Fail(code int, err error) + func (c *Context) Get(key string) interface{} + func (c *Context) Next() + func (c *Context) Set(key string, item interface{}) + type ErrorMsg struct + Message string + Meta interface{} + type File struct + Body multipart.File + Ext string + FilePath string + FilePathAP string + Filename string + Header map[string][]string + MIME string + Md5 string + Savename string + Sha1 string + Size int64 + Type int + func (file *File) BuildRes() map[string]interface{} + func (file *File) Del(delFile string) bool + func (file *File) GetFileHash() *File + func (file *File) GetFilePath() *File + func (file *File) GetFileType() *File + func (file *File) GetSaveName() *File + func (file *File) Save() map[string]interface{} + type H map[string]interface + type HandlerFunc func(*HttpUtil) + type HttpEngine struct + func Default() *HttpEngine + func New() *HttpEngine + func (engine *HttpEngine) Run() + func (engine *HttpEngine) ServeFiles(path string, root http.FileSystem) + func (engine *HttpEngine) ServeHTTP(w http.ResponseWriter, req *http.Request) + type HttpUtil struct + Req *ReqHelper.Request + Res *Response + type Jwt struct + func NewJwt() *Jwt + func (jwt *Jwt) Build(data map[string]interface{}, iv string) string + func (jwt *Jwt) Get(input, key, iv string) (value interface{}) + func (jwt *Jwt) GetData(input, iv string) (data map[string]interface{}) + func (jwt *Jwt) Refresh(input, iv string) string + func (jwt *Jwt) Valid(input, iv string) bool + type JwtHeader struct + Algorithm string + Type string + func (header *JwtHeader) New() *JwtHeader + type JwtSignature string + type MySqlConf struct + Charset string + Db string + Debug bool + Host string + MaxIdleConns int + MaxOpenConns int + Pass string + Port string + Prefix string + User string + type Response struct + func (r *Response) Captcha(code string) + func (r *Response) Data(code int, data []byte) + func (r *Response) Error(code string) + func (r *Response) Html(data interface{}) + func (r *Response) JSON(code int, obj interface{}) + func (r *Response) ListPage(list interface{}, count int64, msg string) + func (r *Response) New(c *Context) *Response + func (r *Response) Redirect(uri string) + func (r *Response) String(code int, msg string) + func (r *Response) Success(data interface{}, msg string) + func (r *Response) XML(code int, obj interface{}) + type RouterGroup struct + Handlers []HandlerFunc + func (group *RouterGroup) DELETE(path string, handlers ...HandlerFunc) + func (group *RouterGroup) GET(path string, handlers ...HandlerFunc) + func (group *RouterGroup) Group(component string, handlers ...HandlerFunc) *RouterGroup + func (group *RouterGroup) Handle(method, p string, handlers []HandlerFunc) + func (group *RouterGroup) PATCH(path string, handlers ...HandlerFunc) + func (group *RouterGroup) POST(path string, handlers ...HandlerFunc) + func (group *RouterGroup) PUT(path string, handlers ...HandlerFunc) + func (group *RouterGroup) Use(middlewares ...HandlerFunc) + type Rule struct + IsMust bool + Name string + ParamType string + Rule []string + type SnowflakeIdWorker struct + type WebSocket struct + func (ws *WebSocket) Handler(w http.ResponseWriter, r *http.Request)