acl

package
v0.0.3-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	// contains filtered or unexported fields
}

ACL represents an Access Control List that manages permissions between subjects and resources. It uses a simple allow-based model where permissions must be explicitly granted.

func NewACL

func NewACL() *ACL

NewACL creates a new empty Access Control List.

func (*ACL) Allow

func (a *ACL) Allow(subject, resource string)

Allow grants permission for a subject to access a specific resource. It creates the subject's permission map if it doesn't exist.

func (*ACL) IsAllowed

func (a *ACL) IsAllowed(subject, resource string) bool

IsAllowed checks if a subject has permission to access a specific resource. It returns false if either the subject or resource is not found in the ACL.

Jump to

Keyboard shortcuts

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