Documentation
¶
Index ¶
Constants ¶
const ( RegimeEUAIAct = "eu-ai-act" RegimeNISTAIRMF = "nist-ai-rmf" )
Canonical regime identifiers. Pack JSON version strings stay independent (e.g. eu-ai-act → eu-ai-act-2024-v0.1.0) so releases can bump pack content without renaming the regime selector.
const ( CharacterHardLaw = "hard_law" CharacterPrinciples = "principles" CharacterGuidance = "guidance" CharacterMapping = "mapping" )
Character describes the legal nature of a regime pack's outcomes.
Variables ¶
This section is empty.
Functions ¶
func NormalizeRegime ¶
NormalizeRegime trims and lowercases a regime selector.
func NormalizeRegimes ¶
NormalizeRegimes deduplicates and normalizes a regime list, preserving order.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader resolves regime IDs to embedded packs.
func DefaultLoader ¶
DefaultLoader returns a loader with every shipped pack registered.
type Rule ¶
type Rule struct {
ID string `json:"id"`
Tier string `json:"tier"`
ArticleOrAnnex string `json:"article_or_annex"`
Summary string `json:"summary"`
When RuleWhen `json:"when"`
Match string `json:"match"` // "any_group" (default) or "all_groups"
RecommendedControls []string `json:"recommended_controls"`
TechnicalControls []TechnicalControl `json:"technical_controls,omitempty"`
JudgmentCall bool `json:"judgment_call"`
JudgmentCallNote string `json:"judgment_call_note"`
}
Rule is one versioned classification mapping.
type RuleWhen ¶
type RuleWhen struct {
AnyFlags []string `json:"any_flags"`
DeploymentContexts []string `json:"deployment_contexts"`
AffectedPopulations []string `json:"affected_populations"`
DataTypes []string `json:"data_types"`
AutonomyLevels []string `json:"autonomy_levels"`
PurposeKeywords []string `json:"purpose_keywords"`
}
RuleWhen describes match conditions. Empty slices mean "don't constrain on this field".
type Set ¶
type Set struct {
Version string `json:"version"`
LastUpdated string `json:"last_updated"`
Framework string `json:"framework"`
Notes []string `json:"notes"`
Rules []Rule `json:"rules"`
}
Set is a loaded ruleset document.
func LoadDefault ¶
LoadDefault loads the embedded EU AI Act v0.1.0 ruleset.
func LoadNISTAIRMF ¶
LoadNISTAIRMF loads the embedded NIST AI RMF mapping pack v0.1.0.
type TechnicalControl ¶
type TechnicalControl struct {
ID string `json:"id"`
PaperRef string `json:"paper_ref"`
Summary string `json:"summary"`
TechnicalHook string `json:"technical_hook"`
EvidenceType string `json:"evidence_type"`
}
TechnicalControl links policy text to an implementable hook and evidence type.