Documentation ¶
Index ¶
- func AutoRoute(controller AutoRouter) func(*gin.Context)
- func DataMsg(c *gin.Context, data interface{}, msg string, code ...int)
- func DefaultUploadHtml(writer gin.ResponseWriter, extend string)
- func GetStackTraceInfo(msg string) (info string)
- func Normal(engine *gin.Engine, relativePath string, router AutoRouter, ...)
- func RunListener(listener net.Listener, engine *gin.Engine, certFile, keyFile string) (err error)
- func Setup(engine *gin.Engine)
- func StackTrace() string
- func Str2html(raw string) template.HTML
- type AutoRouter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoRoute ¶
func AutoRoute(controller AutoRouter) func(*gin.Context)
AutoRoute 自动路由设置,URL 路径名称要小写 prefix 表示需要关联的前缀 controller 控制器类
func DataMsg ¶
*
- @description: 生成json数据
- @param {*gin.Context} c
- @param {interface{}} data
- @param {string} msg
- @param {...int} code
- @return {*}
func DefaultUploadHtml ¶
func DefaultUploadHtml(writer gin.ResponseWriter, extend string)
func Normal ¶
func Normal(engine *gin.Engine, relativePath string, router AutoRouter, handlers ...gin.HandlerFunc)
Normal Get & Post
func RunListener ¶
RunListener 自动选择HTTP 或者 HTTPS服务 certFile, keyFile 不可用时以http启动,否则 以 tls启动
Types ¶
Directories ¶
Path | Synopsis |
---|---|
* @Author: Wangjun * @Date: 2021-05-15 22:43:19 * @LastEditTime: 2021-07-20 11:34:01 * @LastEditors: Wangjun * @Description: * @FilePath: \golib\autoroute\controller\auth.go * hnxr
|
* @Author: Wangjun * @Date: 2021-05-15 22:43:19 * @LastEditTime: 2021-07-20 11:34:01 * @LastEditors: Wangjun * @Description: * @FilePath: \golib\autoroute\controller\auth.go * hnxr |
* @Author: Wangjun * @Date: 2023-09-01 13:39:49 * @LastEditTime: 2024-11-01 17:38:28 * @LastEditors: wangjun haodreams@163.com * @Description:创建默认的router * @FilePath: \xrdatad:\go\src\gitee.com\haodreams\golib\autoroute\defaulter\default.go * hnxr
|
* @Author: Wangjun * @Date: 2023-09-01 13:39:49 * @LastEditTime: 2024-11-01 17:38:28 * @LastEditors: wangjun haodreams@163.com * @Description:创建默认的router * @FilePath: \xrdatad:\go\src\gitee.com\haodreams\golib\autoroute\defaulter\default.go * hnxr |
* @Author: Wangjun * @Date: 2021-07-19 19:31:56 * @LastEditTime: 2023-07-20 13:38:58 * @LastEditors: Wangjun * @Description: * @FilePath: \golib\autoroute\minauth\user.go * hnxr
|
* @Author: Wangjun * @Date: 2021-07-19 19:31:56 * @LastEditTime: 2023-07-20 13:38:58 * @LastEditors: Wangjun * @Description: * @FilePath: \golib\autoroute\minauth\user.go * hnxr |
* @Author: Wangjun * @Date: 2021-11-01 10:59:05 * @LastEditTime: 2021-11-01 11:06:03 * @LastEditors: Wangjun * @Description: * @FilePath: \xr_ai_monitord:\go\src\gitee.com\haodreams\golib\autoroute\restdef\restdef.go * hnxr
|
* @Author: Wangjun * @Date: 2021-11-01 10:59:05 * @LastEditTime: 2021-11-01 11:06:03 * @LastEditors: Wangjun * @Description: * @FilePath: \xr_ai_monitord:\go\src\gitee.com\haodreams\golib\autoroute\restdef\restdef.go * hnxr |
Click to show internal directories.
Click to hide internal directories.