rolecheck

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	AllMethods bool     `cfg:"all_methods"`
	Methods    []string `cfg:"methods"`
	Roles      []string `cfg:"roles"`
	// contains filtered or unexported fields
}

type PathMap

type PathMap struct {
	RegexPath string `cfg:"regex_path"`
	Map       []Map  `cfg:"map"`
	// contains filtered or unexported fields
}

type Redirect added in v0.6.3

type Redirect struct {
	Enable bool   `cfg:"enable"`
	URL    string `cfg:"url"`
}

type RoleCheck

type RoleCheck struct {
	PathMap     []PathMap `cfg:"path_map"`
	AllowOthers bool      `cfg:"allow_others"`

	Redirect Redirect `cfg:"redirect"`
}

func (*RoleCheck) Middleware

func (m *RoleCheck) Middleware() (echo.MiddlewareFunc, error)

Jump to

Keyboard shortcuts

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