permission

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth() gin.HandlerFunc

func Required

func Required(roles ...string) gin.HandlerFunc

写带参数的 Gin中间件

Types

type Auther

type Auther struct {
	// contains filtered or unexported fields
}

func NewAuther

func NewAuther() *Auther

func (*Auther) Auth

func (a *Auther) Auth(c *gin.Context)

type Permissoner

type Permissoner struct {
	// contains filtered or unexported fields
}

func (*Permissoner) CheckPerm

func (p *Permissoner) CheckPerm(c *gin.Context)

func (*Permissoner) HasPerm

func (a *Permissoner) HasPerm(role string) error

Jump to

Keyboard shortcuts

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