wardenerr

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package wardenerr holds shared sentinel errors used across warden subpackages. It exists as a leaf package so that low-level packages (e.g. store/memory) can return typed errors without importing the root warden package, which would create an import cycle in tests.

The root warden package re-exports these as aliases (warden.ErrXX), so callers should prefer the warden.* names. Subpackages that implement store interfaces import wardenerr directly.

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyExists = errors.New("warden: already exists")

ErrAlreadyExists is the common base error for entity-uniqueness violations. Use errors.Is(err, ErrAlreadyExists) to match any of the specialized ErrDuplicate* errors below.

View Source
var ErrDuplicateAssignment = fmt.Errorf("warden: role already assigned to subject: %w", ErrAlreadyExists)

ErrDuplicateAssignment is returned when a role is already assigned to a subject within the same scope. Wraps ErrAlreadyExists.

View Source
var ErrDuplicatePermission = fmt.Errorf("warden: permission already exists in this scope: %w", ErrAlreadyExists)

ErrDuplicatePermission is returned when a permission would violate the (tenant_id, namespace_path, name) uniqueness constraint.

View Source
var ErrDuplicatePolicy = fmt.Errorf("warden: policy already exists in this scope: %w", ErrAlreadyExists)

ErrDuplicatePolicy is returned when a policy would violate the (tenant_id, namespace_path, name) uniqueness constraint.

View Source
var ErrDuplicateRelation = fmt.Errorf("warden: relation tuple already exists: %w", ErrAlreadyExists)

ErrDuplicateRelation is returned when a relation tuple already exists. Wraps ErrAlreadyExists.

View Source
var ErrDuplicateResourceType = fmt.Errorf("warden: resource type already exists in this scope: %w", ErrAlreadyExists)

ErrDuplicateResourceType is returned when a resource type would violate the (tenant_id, namespace_path, name) uniqueness constraint.

View Source
var ErrDuplicateRole = fmt.Errorf("warden: role already exists in this scope: %w", ErrAlreadyExists)

ErrDuplicateRole is returned when a role would violate the (tenant_id, namespace_path, slug) uniqueness constraint.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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