Documentation
¶
Overview ¶
Package il is writ's intermediate language: the compiled rule format per SPEC §10–11. The IL is writ's real policy interface; the surface language is one frontend over it. Macros are fully expanded here — nothing downstream of the compiler knows they existed.
IL equality is canonical, not structural: two rules are the same rule iff their content ids match. Nothing may compare rules with deep equality.
Index ¶
Constants ¶
const Schema = 3
Schema is the IL schema version carried by every policy.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllowRule ¶
type AllowRule struct {
Label string
Users Selector
Accounts Selector
Hosts Selector
Require []string
When []string
Until *time.Time
TTL time.Duration
Notify []string
}
AllowRule grants access when all three positions match and every clause holds. Label is cosmetic and excluded from the content id. Until nil means no expiry; TTL zero means the deployment default.
type DenyRule ¶
type DenyRule struct {
Label string
Users NegatableSelector
Accounts NegatableSelector
Hosts NegatableSelector
When []string
Notify []string
}
DenyRule withdraws access when all three positions match and its `when` flags (if any) hold. Deny always wins.
type Kind ¶ added in v0.42.0
type Kind string
Kind identifies the object selected at one rule position.
type NegatableSelector ¶ added in v0.42.0
NegatableSelector is available only in deny rules. Not complements the whole selector, after matching all candidate names or memberships.
type Policy ¶
Policy is a compiled rule set. Rule order is preserved from the source for reporting, but evaluation is order-independent.