rbac

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForbiddenRole = errors.New("user does not have access")
View Source
var UnauthorizedAuthUser = errors.New("error to get authUser param from auth token")

Functions

func Can

func Can(roles ...string) func(c *gin.Context)

Types

type AuthUser

type AuthUser struct {
	ID   int
	Role string
}

func User

func User(ctx context.Context) (*AuthUser, error)

Jump to

Keyboard shortcuts

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