newe

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 12 Imported by: 0

README

go get https://github.com/hkyangyi/newe

func main() { newe.InitConfig() //newe.NewRoute() RegRoute()

newe.Run()
fmt.Println(newe.Conf)

}

func RegRoute() { r := newe.NewRoute("www", middle.AdminAuth()) r.Any("home", test) }

func test(c *gin.Context) { c.String(200, "aaaa") }

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf    *config.Config
	WorkLog *worklog.WorkLog
	MYDB    *gorm.DB
	REDIS   *redis.NeRedis
	WSMAG   *ws.WsManager
)
View Source
var Route *gin.Engine
View Source
var Serve *http.Server

Functions

func Cors

func Cors() gin.HandlerFunc

func HttpServeRun

func HttpServeRun()

func HttpServeStop

func HttpServeStop()

func InitConfig

func InitConfig()

func InitHttpServe

func InitHttpServe()

func NewRoute

func NewRoute(path string, handlers ...gin.HandlerFunc) *gin.RouterGroup

func RouteInit

func RouteInit()

func Run

func Run()

Types

This section is empty.

Directories

Path Synopsis
common
db
ws
router
app
v1

Jump to

Keyboard shortcuts

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