route

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTags

func GetTags(absPath, method string) ([]string, bool)

func LoadOrStore

func LoadOrStore(absPath, method, desc string, authType PermLevel, tag TagName, handler gin.HandlerFunc, middlewares ...gin.HandlerFunc) (bool, error)

Types

type Paths

type Paths []*_path

func (Paths) Get

func (paths Paths) Get(absPath, method string) *_path

type PermLevel

type PermLevel uint32
const (
	PermNone       PermLevel = 0 // 无需校验
	PermNeedEnable PermLevel = 1 // 需要用户enable
	PermNeedCheck  PermLevel = 2 // 需要用户有权限
)

type Route

type Route struct {
	Tag  string
	Name string
	Subs []Route
}

type TagName

type TagName struct {
	Tag  string
	Name string
}

Jump to

Keyboard shortcuts

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