websvr

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

* @Author: lisheng * @Date: 2022-10-10 23:40:57 * @LastEditTime: 2022-11-23 15:24:04 * @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", "/v1/ocean"} // 不进行JWT认证的路由
View Source
var (
	ResiPoints = &NewResiPoints{} // 常驻内存
)
View Source
var Routes = []Route{}

路由集合

Functions

func Bind

func Bind(e *gin.Engine)

绑定路由 m是方法GET POST等 绑定基本路由 e.POST(path, match(path))

func InitRouter

func InitRouter() *gin.Engine

func Register

func Register(handler interface{}) bool

注册控制器

Types

type CloseDBFunc

type CloseDBFunc func() error

type NewResiPoints

type NewResiPoints struct {
	MfwamLonsMap map[string][]string
	MfwamLatsMap map[string][]string
	SmocLonsMap  map[string][]string
	SmocLatsMap  map[string][]string
}

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) InitResidentMemory

func (svr *WebServer) InitResidentMemory()

*

  • @description: 初始化常驻内存
  • @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