route

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: AGPL-3.0 Imports: 5 Imported by: 23

README

后台路由登记

Documentation

Index

Constants

View Source
const (
	MetaKeyPermission = `permission`
	PermissionPublic  = `public` // 所有登录用户
	PermissionGuest   = `guest`  // 匿名
)

Variables

This section is empty.

Functions

func AddGroupNamer

func AddGroupNamer(namers ...func(string) string)

func Apply

func Apply()

func Clear

func Clear()

func GuestHandler

func GuestHandler(h interface{}, meta ...echo.H) echo.Handler

func HandlerWithRequest

func HandlerWithRequest(handler interface{}, requests interface{}, methods ...string) echo.Handler

func Host

func Host(hostName string, middlewares ...interface{}) route.Hoster

func IRegister

func IRegister() route.IRegister

func Logger

func Logger() logger.Logger

func MakeHandler

func MakeHandler(handler interface{}, requests ...interface{}) echo.Handler

func MetaHandler

func MetaHandler(handler interface{}, m echo.H, requests ...interface{}) echo.Handler

func MetaHandlerWithRequest

func MetaHandlerWithRequest(handler interface{}, m echo.H, requests interface{}, methods ...string) echo.Handler

func PermGuestKV

func PermGuestKV() (string, string)

func PermPublicKV

func PermPublicKV() (string, string)

func Pre

func Pre(middlewares ...interface{})

func PreToGroup

func PreToGroup(groupName string, middlewares ...interface{})

func Prefix

func Prefix() string

func PublicHandler

func PublicHandler(h interface{}, meta ...echo.H) echo.Handler

func Register

func Register(fn func(echo.RouteRegister))

func RegisterToGroup

func RegisterToGroup(groupName string, fn func(echo.RouteRegister), middlewares ...interface{}) route.MetaSetter

func Routes

func Routes() []*echo.Route

func SetGroupMetaPermissionGuest

func SetGroupMetaPermissionGuest(s GroupSetMetaKV) *echo.Group

func SetGroupMetaPermissionPublic

func SetGroupMetaPermissionPublic(s GroupSetMetaKV) *echo.Group

func SetMetaPermissionGuest

func SetMetaPermissionGuest(s RouteSetMetaKV) echo.IRouter

func SetMetaPermissionPublic

func SetMetaPermissionPublic(s RouteSetMetaKV) echo.IRouter

func SetPrefix

func SetPrefix(prefix string)

func SetRootGroup

func SetRootGroup(groupName string)

func Use

func Use(middlewares ...interface{})

func UseToGroup

func UseToGroup(groupName string, middlewares ...interface{})

UseToGroup “@”符号代表后台网址前缀

Types

type GroupSetMetaKV

type GroupSetMetaKV interface {
	SetMetaKV(string, interface{}) *echo.Group
}

type RouteSetMetaKV

type RouteSetMetaKV interface {
	SetMetaKV(string, interface{}) echo.IRouter
}

Jump to

Keyboard shortcuts

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