Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Oct 14, 2026 Changes in this version + var ErrDenied = errors.New("access: denied") + var ErrEmptyStatements = errors.New("access: no statements") + var ErrUnknownAction = errors.New("access: unknown action") + var ErrUnknownResource = errors.New("access: unknown resource") + type AccessControl struct + func MustNew(s Statements) *AccessControl + func New(s Statements) (*AccessControl, error) + func (ac *AccessControl) Check(p Permissions) error + func (ac *AccessControl) MustRole(p Permissions) Role + func (ac *AccessControl) NewRole(p Permissions) (Role, error) + func (ac *AccessControl) Statements() Statements + type Actions struct + Actions []string + Connector Connector + func All(actions ...string) Actions + func Any(actions ...string) Actions + type Connector string + const And + const Or + type Permissions map[string][]string + func (p Permissions) Clone() Permissions + func (p Permissions) Request() Request + type Request map[string]Actions + type Role struct + func (r Role) Allows(req Request) bool + func (r Role) Authorize(req Request, connector Connector) error + func (r Role) Permissions() Permissions + type Statements map[string][]string