Documentation
¶
Overview ¶
Package identity owns the stable identity policy for D&D non-player characters.
Index ¶
Constants ¶
const ( // Policy identifies the complete identity comparison and ID derivation // policy. A future semantic change must use a new value. Policy = "dnd.npc_registry.identity.v1" // IdentityPolicy is an explicit alias for callers recording policy // fingerprints. IdentityPolicy = Policy )
Variables ¶
This section is empty.
Functions ¶
func ComparisonKey ¶
ComparisonKey returns the stable key used for NPC identity comparisons.
func DeriveID ¶
DeriveID returns the deterministic ID for a canonical NPC name. Empty identity keys intentionally produce an empty ID so shape validation can report the missing identity instead of manufacturing one.
func IDFor ¶
IDFor is a concise alias for DeriveID for callers that work with IDs as values rather than derivation operations.
func NormalizeDisplay ¶
NormalizeDisplay trims and collapses Unicode whitespace while retaining all other observed spelling and punctuation.
Types ¶
type Issue ¶
Issue is an inspectable identity validation problem.
func ValidateList ¶
func ValidateList(list dnd.NPCRegistry) []Issue
ValidateList validates the identity members of list.
func ValidateRegistry ¶
ValidateRegistry checks all identity invariants without changing the input. It accepts the NPC slice used by typed pipeline artifacts. Use ValidateList when the enclosing NPCRegistry is more convenient at the call site.