router

package
v0.0.0-...-bb899d6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

@Title: router.go @Author: key7men@gmail.com @Description: 服务端API接口定义 @Update: 2020/7/22 4:07 PM

Index

Constants

This section is empty.

Variables

RouterSet 注入router

Functions

This section is empty.

Types

type IRouter

type IRouter interface {
	Register(app *gin.Engine) error
	Prefixes() []string
}

IRouter 注册路由

type Router

type Router struct {
	Auth           auth.Auther
	CasbinEnforcer *casbin.SyncedEnforcer
	DemoAPI        *handler.Demo
	LoginAPI       *handler.Login
	MenuAPI        *handler.Menu
	RoleAPI        *handler.Role
	UserAPI        *handler.User
}

Router 路由管理器

func (*Router) Prefixes

func (r *Router) Prefixes() []string

Prefixes 路由前缀列表

func (*Router) Register

func (r *Router) Register(app *gin.Engine) error

Register 注册路由

func (*Router) RegisterAPI

func (r *Router) RegisterAPI(app *gin.Engine)

RegisterAPI register api group router

Jump to

Keyboard shortcuts

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