Versions in this module Expand all Collapse all v0 v0.3.0 Mar 1, 2026 Changes in this version + const ModuleName + var ErrForbidden = fmt.Errorf("forbidden") + func WithPolicy(policy Policy) modules.Option + type Authorizer interface + CanPerform func(context.Context, User, Permission) error + CanPerformOwned func(context.Context, User, Permission, uuid.UUID) error + type LocalAuthorizer struct + func NewLocalAuthorizer(policy Policy) *LocalAuthorizer + func (l *LocalAuthorizer) CanPerform(_ context.Context, user User, permission Permission) error + func (l *LocalAuthorizer) CanPerformOwned(_ context.Context, user User, permission Permission, ownerID uuid.UUID) error + type Module struct + func New() *Module + func (m *Module) Authorizer() Authorizer + func (m *Module) Configure(opts ...modules.Option) error + func (m *Module) Shutdown() error + func (m *Module) Start() error + type OwnershipConstraint bool + const NoOwnershipRequired + const OwnershipRequired + type Permission string + type Policy map[string]map[Permission]OwnershipConstraint + type User interface + GetID func() uuid.UUID + GetRoles func() []string