label

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 1 Imported by: 140

Documentation

Index

Constants

View Source
const (
	// ResourceLableKey key name
	ResourceLableKey = "resource"

	// AuthLabelKey 控制是否开启认证
	AuthLabelKey = "auth"

	// PermissionLabelKey 控制是否开启权限判定
	PermissionLabelKey = "permission"

	// AllowLabelKey 控制允许的角色
	AllowLabelKey = "allow"

	// 控制是否开启审计
	AuditLabelKey = "audit"
)
View Source
const (
	Enable  = true
	Disable = false
)
View Source
const (
	// ActionLableKey key name
	ActionLableKey = "action"
)

Variables

View Source
var (
	// Get Label
	Get = action("get")
	// List label
	List = action("list")
	// Create label
	Create = action("create")
	// Update label
	Update = action("update")
	// Delete label
	Delete = action("delete")
)

Functions

func Action

func Action(name string) *http.Label

Action action Lable

Types

type Meta added in v1.8.5

type Meta map[string]interface{}

func (Meta) Action added in v1.8.5

func (m Meta) Action() string

func (Meta) Allow added in v1.8.5

func (m Meta) Allow() []string

func (Meta) AuditEnable added in v1.8.5

func (m Meta) AuditEnable() bool

func (Meta) AuthEnable added in v1.8.5

func (m Meta) AuthEnable() bool

func (Meta) PermissionEnable added in v1.8.5

func (m Meta) PermissionEnable() bool

func (Meta) Resource added in v1.8.5

func (m Meta) Resource() string

Jump to

Keyboard shortcuts

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