router

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerName string
	RunMode    string
}

type Option

type Option func(router *Router)

func HTMLGlod

func HTMLGlod(pattern string) Option

func StaticFs

func StaticFs(path string) Option

type Router

type Router struct {
	sync.Once
	sync.Mutex
	*gin.Engine
	// contains filtered or unexported fields
}

Router 路由类

func New

func New(opts ...Option) *Router

New 构造函数

permission 角色鉴权中间件

func (*Router) Assign

func (r *Router) Assign(service ...service.IBaseService) *Router

func (*Router) Startup

func (r *Router) Startup(config *Config)

Jump to

Keyboard shortcuts

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