websvr

package
v0.0.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

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 Bind

func Bind(e *gin.Engine)

绑定路由 m是方法GET POST等

func InitRouter

func InitRouter() *gin.Engine

func Register

func Register(handler interface{}) bool

注册控制器

Types

type CloseDBFunc

type CloseDBFunc func() error

type Route

type Route struct {
	// contains filtered or unexported fields
}

路由结构体

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

func (*WebServer) Run

func (svr *WebServer) Run()

*

  • @description: 启动server
  • @return {*}
  • @author: liqiyuWorks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL