Documentation ¶
Overview ¶
* @Author: lisheng * @Date: 2022-10-10 23:40:57 * @LastEditTime: 2022-12-15 15:43:21 * @LastEditors: lisheng * @Description: 路由模块 * @FilePath: /jf-go-kit/websvr/router.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JWT_ROUTE_ARRAY = []string{"/user/login", "/user/register"} // 不进行JWT认证的路由
View Source
var Routes = []Route{}
路由集合
Functions ¶
func InitRouter ¶
Types ¶
type CloseDBFunc ¶
type CloseDBFunc func() error
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
func (*WebServer) CloseDB ¶
func (svr *WebServer) CloseDB()
*
- @description: 统一清理数据库连接
- @return {*}
- @author: liqiyuWorks
func (*WebServer) InitDB ¶
func (svr *WebServer) InitDB()
*
- @description: 初始化数据库
- @return {*}
- @author: liqiyuWorks
func (*WebServer) InitLog ¶
func (svr *WebServer) InitLog()
*
- @description: 初始化log
- @return {*}
- @author: liqiyuWorks
func (*WebServer) InitWebServer ¶
func (svr *WebServer) InitWebServer()
*
- @description: 初始化路由相关服务
- @return {*}
- @author: liqiyuWorks
Click to show internal directories.
Click to hide internal directories.