Documentation ¶ Index ¶ type Config type Option func HTMLGlod(pattern string) Option func StaticFs(path string) Option type Router func New(opts ...Option) *Router func (r *Router) Assign(service ...service.IBaseService) *Router func (r *Router) Startup(config *Config) 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) Source Files ¶ View all Source files middleware.go router.go Click to show internal directories. Click to hide internal directories.