Versions in this module Expand all Collapse all v0 v0.3.3 Nov 6, 2026 Changes in this version + const AlgorithmEd25519SHA256 + const AlgorithmMLDSA44 + const AlgorithmRSASHA256 + func ErrorFromContext(ctx context.Context) (result error) + func IsTypedError(err error) bool + func NewError(code ErrorCode) error + func ProfileFactsEqual(left, right Profile) bool + func ReconcileContextFailure(boundaryErr, contextErr error) error + func ValidatePolicyOutcome(result ResolvedPolicy, err error) error + func ValidateProfileOutcome(result ResolvedProfile, err error) error + type Algorithm = signature.Algorithm + type Compatibility uint8 + const CompatibilityStrict + func ParseCompatibility(value string) (Compatibility, error) + func (c Compatibility) Format(state fmt.State, _ rune) + func (c Compatibility) GoString() string + func (c Compatibility) Known() bool + func (c Compatibility) MarshalJSON() ([]byte, error) + func (c Compatibility) String() string + type Credential struct + func NewCredential(selector string, algorithm Algorithm, publicKeySPKI []byte, ...) (Credential, error) + func (c Credential) Algorithm() Algorithm + func (c Credential) Format(state fmt.State, _ rune) + func (c Credential) GoString() string + func (c Credential) KeyHandleID() KeyHandleID + func (c Credential) PublicKey() any + func (c Credential) PublicKeySPKIDER() []byte + func (c Credential) PublicKeySPKISHA256() [sha256.Size]byte + func (c Credential) Selector() string + func (c Credential) String() string + func (c Credential) Valid() bool + func (c Credential) ValidForLimits(limits Limits) bool + type Error struct + func (e *Error) Code() ErrorCode + func (e *Error) Error() string + func (e *Error) Format(state fmt.State, _ rune) + func (e *Error) GoString() string + func (e *Error) Unwrap() error + type ErrorCode string + const ErrorCodeAmbiguous + const ErrorCodeCancelled + const ErrorCodeDeadlineExceeded + const ErrorCodeInactive + const ErrorCodeInternalInvariant + const ErrorCodeInvalidRequest + const ErrorCodeLimitExceeded + const ErrorCodeMalformedData + const ErrorCodeNotFound + const ErrorCodeUnavailable + const ErrorCodeUnsupportedPlatform + func ErrorCodeOf(err error) ErrorCode + func (c ErrorCode) Known() bool + type FeedbackRouteID struct + func NewFeedbackRouteID(value string) (FeedbackRouteID, error) + func (i FeedbackRouteID) ByteLen() int + func (i FeedbackRouteID) Format(state fmt.State, _ rune) + func (i FeedbackRouteID) GoString() string + func (i FeedbackRouteID) String() string + func (i FeedbackRouteID) Valid() bool + func (i FeedbackRouteID) WithinMaxBytes(maximum int) bool + type InspectionProvider interface + InspectPolicy func(context.Context, PolicyRequest) (ResolvedPolicy, error) + type KeyHandleID struct + func NewKeyHandleID(value string) (KeyHandleID, error) + func (i KeyHandleID) ByteLen() int + func (i KeyHandleID) Format(state fmt.State, _ rune) + func (i KeyHandleID) GoString() string + func (i KeyHandleID) String() string + func (i KeyHandleID) Valid() bool + func (i KeyHandleID) WithinMaxBytes(maximum int) bool + type Limits struct + MaxCredentialsPerProfile int + MaxDecodedPublicKeyBytes int + MaxDecodedStringBytes int + MaxDomainBytes int + MaxDomainLabels int + MaxHandles int + MaxIdentifierBytes int + MaxJSONDepth int + MaxJSONFileBytes int + MaxJSONStringBytes int + MaxPolicies int + MaxProfiles int + MaxRecords int + MaxSelectorBytes int + MaxSelectorLabels int + func DefaultLimits() Limits + func HardLimits() Limits + func ProductionLimits() Limits + func (l Limits) Validate() error + type Policy struct + func NewPolicy(tenant TenantID, domain string, use ProfileUse, profileID ProfileID, ...) (Policy, error) + func (p Policy) Compatibility() Compatibility + func (p Policy) Eligible() error + func (p Policy) FeedbackRouteID() (FeedbackRouteID, bool) + func (p Policy) Format(state fmt.State, _ rune) + func (p Policy) GoString() string + func (p Policy) ProfileID() ProfileID + func (p Policy) Rollout() Rollout + func (p Policy) SigningDomain() string + func (p Policy) Status() RecordStatus + func (p Policy) String() string + func (p Policy) TenantID() TenantID + func (p Policy) Use() ProfileUse + func (p Policy) Valid() bool + func (p Policy) ValidForLimits(limits Limits) bool + type PolicyRequest struct + func NewPolicyRequest(tenant TenantID, domain string, use ProfileUse, at time.Time, limits Limits) (PolicyRequest, error) + func (r PolicyRequest) EvaluationTime() time.Time + func (r PolicyRequest) Format(state fmt.State, _ rune) + func (r PolicyRequest) GoString() string + func (r PolicyRequest) SigningDomain() string + func (r PolicyRequest) String() string + func (r PolicyRequest) TenantID() TenantID + func (r PolicyRequest) Use() ProfileUse + func (r PolicyRequest) Valid() bool + func (r PolicyRequest) ValidForLimits(limits Limits) bool + type Profile struct + func NewProfile(id ProfileID, domain string, status RecordStatus, credentials []Credential, ...) (Profile, error) + func (p Profile) ActiveAt(at time.Time) error + func (p Profile) CredentialCount() int + func (p Profile) Credentials() []Credential + func (p Profile) Format(state fmt.State, _ rune) + func (p Profile) GoString() string + func (p Profile) ID() ProfileID + func (p Profile) SigningDomain() string + func (p Profile) Status() RecordStatus + func (p Profile) String() string + func (p Profile) Valid() bool + func (p Profile) ValidForLimits(limits Limits) bool + func (p Profile) ValidityWindow() (time.Time, time.Time, bool) + type ProfileID struct + func NewProfileID(value string) (ProfileID, error) + func (i ProfileID) ByteLen() int + func (i ProfileID) Format(state fmt.State, _ rune) + func (i ProfileID) GoString() string + func (i ProfileID) String() string + func (i ProfileID) Valid() bool + func (i ProfileID) WithinMaxBytes(maximum int) bool + type ProfileRequest struct + func NewProfileRequest(profileID ProfileID, use ProfileUse, at time.Time, limits Limits) (ProfileRequest, error) + func (r ProfileRequest) EvaluationTime() time.Time + func (r ProfileRequest) Format(state fmt.State, _ rune) + func (r ProfileRequest) GoString() string + func (r ProfileRequest) ProfileID() ProfileID + func (r ProfileRequest) String() string + func (r ProfileRequest) Use() ProfileUse + func (r ProfileRequest) Valid() bool + func (r ProfileRequest) ValidForLimits(limits Limits) bool + type ProfileUse uint8 + const ProfileUseDeliveryStatus + const ProfileUseNextDomainTransit + const ProfileUseOrdinaryTransit + const ProfileUseOriginator + func ParseProfileUse(value string) (ProfileUse, error) + func (u ProfileUse) Format(state fmt.State, _ rune) + func (u ProfileUse) GoString() string + func (u ProfileUse) Known() bool + func (u ProfileUse) MarshalJSON() ([]byte, error) + func (u ProfileUse) String() string + type Provider interface + ResolvePolicy func(context.Context, PolicyRequest) (ResolvedPolicy, error) + ResolveProfile func(context.Context, ProfileRequest) (ResolvedProfile, error) + type ProviderState uint8 + const ProviderStateClosed + const ProviderStateDegraded + const ProviderStateReady + func (s ProviderState) Format(state fmt.State, _ rune) + func (s ProviderState) GoString() string + func (s ProviderState) Known() bool + func (s ProviderState) MarshalJSON() ([]byte, error) + func (s ProviderState) String() string + type RecordStatus uint8 + const RecordStatusActive + const RecordStatusDisabled + func ParseRecordStatus(value string) (RecordStatus, error) + func (s RecordStatus) Format(state fmt.State, _ rune) + func (s RecordStatus) GoString() string + func (s RecordStatus) Known() bool + func (s RecordStatus) MarshalJSON() ([]byte, error) + func (s RecordStatus) String() string + type ResolvedPolicy struct + func NewResolvedPolicy(generation uint64, policy Policy, profile ResolvedProfile) (ResolvedPolicy, error) + func (r ResolvedPolicy) Format(state fmt.State, _ rune) + func (r ResolvedPolicy) Generation() uint64 + func (r ResolvedPolicy) GoString() string + func (r ResolvedPolicy) Policy() Policy + func (r ResolvedPolicy) Profile() Profile + func (r ResolvedPolicy) String() string + func (r ResolvedPolicy) Valid() bool + func (r ResolvedPolicy) ValidForLimits(limits Limits) bool + type ResolvedProfile struct + func NewResolvedProfile(generation uint64, profile Profile) (ResolvedProfile, error) + func (r ResolvedProfile) Format(state fmt.State, _ rune) + func (r ResolvedProfile) Generation() uint64 + func (r ResolvedProfile) GoString() string + func (r ResolvedProfile) Profile() Profile + func (r ResolvedProfile) ProfileID() ProfileID + func (r ResolvedProfile) String() string + func (r ResolvedProfile) Valid() bool + func (r ResolvedProfile) ValidForLimits(limits Limits) bool + type Rollout uint8 + const RolloutEnforce + const RolloutObserve + const RolloutOff + func ParseRollout(value string) (Rollout, error) + func (r Rollout) Format(state fmt.State, _ rune) + func (r Rollout) GoString() string + func (r Rollout) Known() bool + func (r Rollout) MarshalJSON() ([]byte, error) + func (r Rollout) String() string + type TenantID struct + func NewTenantID(value string) (TenantID, error) + func (i TenantID) ByteLen() int + func (i TenantID) Format(state fmt.State, _ rune) + func (i TenantID) GoString() string + func (i TenantID) String() string + func (i TenantID) Valid() bool + func (i TenantID) WithinMaxBytes(maximum int) bool + type Usage struct + func NewUsage(profiles, credentials, handles, policies, bytes int, limits Limits) (Usage, error) + func (u Usage) Add(other Usage, limits Limits) (Usage, error) + func (u Usage) Bytes() int + func (u Usage) Credentials() int + func (u Usage) Handles() int + func (u Usage) Policies() int + func (u Usage) Profiles() int + func (u Usage) Records() int + func (u Usage) ValidForLimits(limits Limits) bool