Documentation
¶
Overview ¶
Package expiry is the pure expiry-policy engine. A keypair does not self-expire; this computes the policy reminder (per key: expires_on, days_remaining, state).
Index ¶
Constants ¶
const ( OK = "ok" DueSoon = "due_soon" Overdue = "overdue" Unknown = "unknown" )
State values.
Variables ¶
This section is empty.
Functions ¶
func BannerLines ¶
BannerLines is one warning line per due/overdue key - the inline reminder.
Types ¶
type Status ¶
type Status struct {
Fingerprint string
KeyName string
Profile string
Created *string
ExpiresOn *string
DaysRemaining *int
State string
}
Status is one key's expiry policy state.
func ComputeStatesIn ¶ added in v0.1.6
func ComputeStatesIn(inv *inventory.Inventory, warnBeforeDays []int, today time.Time, root string) []Status
ComputeStatesIn returns per-key expiry status, most-urgent first. today should be a date (UTC midnight); warnBeforeDays is the manifest's warn thresholds; root is the key root, so a rotated-out predecessor in a profile's old/ is never counted as live.
func (Status) NeedsAttention ¶
NeedsAttention is true for due_soon/overdue keys.