capability

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set []string

Set is a collection of capability strings in "resource:action" format. Supports exact match, resource wildcard ("resource:*"), and superadmin ("*").

func (Set) Can

func (s Set) Can(required string) bool

Can reports whether this Set satisfies the required capability.

func (Set) CanAll

func (s Set) CanAll(required ...string) bool

CanAll reports whether this Set satisfies all of the required capabilities.

func (Set) CanAny

func (s Set) CanAny(required ...string) bool

CanAny reports whether this Set satisfies at least one of the required capabilities.

Jump to

Keyboard shortcuts

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