Documentation
¶
Overview ¶
Package datasource owns storage-neutral profile and administrative-policy contracts without binding protocol code to provider models.
Requests select exact validated identities and uses. Successful results are immutable, self-contained, and generation-consistent; absence, ambiguity, inactive data, malformed input, provider unavailability, cancellation, and invariants remain distinct closed failures. Credentials contain public verification material and provider-neutral key-handle IDs, never private keys, signing callbacks, paths, or provider-specific backend records.
Replay storage is a separate domain. Concrete providers and the signing bridge live in subpackages so protocol owners do not import provider implementations.
Index ¶
- Constants
- 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
- type Compatibility
- type Credential
- 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
- type ErrorCode
- type FeedbackRouteID
- type InspectionProvider
- type KeyHandleID
- type Limits
- type Policy
- 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
- 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
- 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
- type ProfileRequest
- 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
- type Provider
- type ProviderState
- type RecordStatus
- type ResolvedPolicy
- 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
- 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
- type TenantID
- type Usage
Constants ¶
const ( // AlgorithmRSASHA256 identifies one RSA-SHA256 signing credential. AlgorithmRSASHA256 = signature.AlgorithmRSASHA256 // AlgorithmEd25519SHA256 identifies one Ed25519-SHA256 signing credential. AlgorithmEd25519SHA256 = signature.AlgorithmEd25519SHA256 // AlgorithmMLDSA44 identifies one pure ML-DSA-44 signing credential. AlgorithmMLDSA44 = signature.AlgorithmMLDSA44 )
Variables ¶
This section is empty.
Functions ¶
func ErrorFromContext ¶
ErrorFromContext maps a context state into the closed error taxonomy.
func IsTypedError ¶
IsTypedError reports whether an error belongs to the closed datasource taxonomy.
func ProfileFactsEqual ¶
ProfileFactsEqual reports exact equality for two immutable profile values.
func ReconcileContextFailure ¶
ReconcileContextFailure combines one validated boundary failure with the context state observed after that boundary. Internal or contradictory outcomes fail closed; coherent terminal context controls ordinary outcomes.
func ValidatePolicyOutcome ¶
func ValidatePolicyOutcome(result ResolvedPolicy, err error) error
ValidatePolicyOutcome enforces the closed policy result/error matrix.
func ValidateProfileOutcome ¶
func ValidateProfileOutcome(result ResolvedProfile, err error) error
ValidateProfileOutcome enforces the closed profile result/error matrix.
Types ¶
type Compatibility ¶
type Compatibility uint8
Compatibility identifies one closed compatibility policy.
const ( // CompatibilityStrict preserves every restrictive DKIM2 rule. CompatibilityStrict Compatibility = iota + 1 )
func ParseCompatibility ¶
func ParseCompatibility(value string) (Compatibility, error)
ParseCompatibility parses the one supported compatibility value.
func (Compatibility) Format ¶
func (c Compatibility) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing unknown numeric values.
func (Compatibility) GoString ¶
func (c Compatibility) GoString() string
GoString returns the stable compatibility representation.
func (Compatibility) Known ¶
func (c Compatibility) Known() bool
Known reports whether the compatibility value is supported.
func (Compatibility) MarshalJSON ¶
func (c Compatibility) MarshalJSON() ([]byte, error)
MarshalJSON emits only a known closed compatibility value.
func (Compatibility) String ¶
func (c Compatibility) String() string
String returns the stable compatibility value or a constant unknown marker.
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
Credential contains one immutable public signing credential and opaque handle ID.
func NewCredential ¶
func NewCredential(selector string, algorithm Algorithm, publicKeySPKI []byte, handleID KeyHandleID, limits Limits) (Credential, error)
NewCredential validates and detaches one provider-neutral signing credential.
func (Credential) Algorithm ¶
func (c Credential) Algorithm() Algorithm
Algorithm returns the baseline signing algorithm.
func (Credential) Format ¶
func (c Credential) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing credential facts.
func (Credential) GoString ¶
func (c Credential) GoString() string
GoString returns a constant protected credential representation.
func (Credential) KeyHandleID ¶
func (c Credential) KeyHandleID() KeyHandleID
KeyHandleID returns the provider-neutral opaque handle identifier.
func (Credential) PublicKey ¶
func (c Credential) PublicKey() any
PublicKey returns detached validated public-key material.
func (Credential) PublicKeySPKIDER ¶
func (c Credential) PublicKeySPKIDER() []byte
PublicKeySPKIDER returns detached canonical public SPKI DER.
func (Credential) PublicKeySPKISHA256 ¶
func (c Credential) PublicKeySPKISHA256() [sha256.Size]byte
PublicKeySPKISHA256 returns the digest of the exact canonical SPKI DER.
func (Credential) Selector ¶
func (c Credential) Selector() string
Selector returns the canonical selector.
func (Credential) String ¶
func (c Credential) String() string
String returns a constant protected credential summary.
func (Credential) Valid ¶
func (c Credential) Valid() bool
Valid reports whether the credential remains complete under hard limits.
func (Credential) ValidForLimits ¶
func (c Credential) ValidForLimits(limits Limits) bool
ValidForLimits reports whether the credential satisfies one narrowed datasource contract.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is one typed secret-safe datasource failure.
func (*Error) Format ¶
Format prevents formatting verbs from exposing internal cause representation.
type ErrorCode ¶
type ErrorCode string
ErrorCode is one stable datasource failure class.
const ( // ErrorCodeInvalidRequest classifies an invalid request or zero value. ErrorCodeInvalidRequest ErrorCode = "invalid_request" // ErrorCodeNotFound classifies an absent exact record or binding. ErrorCodeNotFound ErrorCode = "not_found" // ErrorCodeAmbiguous classifies duplicate exact records. ErrorCodeAmbiguous ErrorCode = "ambiguous" // ErrorCodeInactive classifies a closed administrative record. ErrorCodeInactive ErrorCode = "inactive" // ErrorCodeMalformedData classifies invalid provider input. ErrorCodeMalformedData ErrorCode = "malformed_data" // ErrorCodeLimitExceeded classifies an exceeded resource bound. ErrorCodeLimitExceeded ErrorCode = "limit_exceeded" ErrorCodeUnavailable ErrorCode = "unavailable" // ErrorCodeUnsupportedPlatform classifies missing confinement primitives. ErrorCodeUnsupportedPlatform ErrorCode = "unsupported_platform" // ErrorCodeCancelled classifies context cancellation. ErrorCodeCancelled ErrorCode = "cancelled" // ErrorCodeDeadlineExceeded classifies an elapsed context deadline. ErrorCodeDeadlineExceeded ErrorCode = "deadline_exceeded" // ErrorCodeInternalInvariant classifies an impossible internal state. ErrorCodeInternalInvariant ErrorCode = "internal_invariant" )
func ErrorCodeOf ¶
ErrorCodeOf returns the stable code for one datasource failure.
type FeedbackRouteID ¶
type FeedbackRouteID struct {
// contains filtered or unexported fields
}
FeedbackRouteID identifies one opaque later-service feedback route.
func NewFeedbackRouteID ¶
func NewFeedbackRouteID(value string) (FeedbackRouteID, error)
NewFeedbackRouteID validates one canonical feedback-route identifier.
func (FeedbackRouteID) ByteLen ¶
func (i FeedbackRouteID) ByteLen() int
ByteLen returns the canonical identifier byte length.
func (FeedbackRouteID) Format ¶
func (i FeedbackRouteID) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing the identifier.
func (FeedbackRouteID) GoString ¶
func (i FeedbackRouteID) GoString() string
GoString returns a constant protected feedback-route representation.
func (FeedbackRouteID) String ¶
func (i FeedbackRouteID) String() string
String returns a constant protected feedback-route summary.
func (FeedbackRouteID) Valid ¶
func (i FeedbackRouteID) Valid() bool
Valid reports whether the feedback-route identifier is initialized.
func (FeedbackRouteID) WithinMaxBytes ¶
func (i FeedbackRouteID) WithinMaxBytes(maximum int) bool
WithinMaxBytes reports whether the identifier fits a valid narrowed bound.
type InspectionProvider ¶
type InspectionProvider interface {
Provider
InspectPolicy(context.Context, PolicyRequest) (ResolvedPolicy, error)
}
InspectionProvider exposes exact immutable policy facts for registry construction, including inactive records. Inspection never authorizes signing; callers must use Provider and the signing projection at message time.
type KeyHandleID ¶
type KeyHandleID struct {
// contains filtered or unexported fields
}
KeyHandleID identifies one provider-neutral private-key handle binding.
func NewKeyHandleID ¶
func NewKeyHandleID(value string) (KeyHandleID, error)
NewKeyHandleID validates one canonical key-handle identifier.
func (KeyHandleID) ByteLen ¶
func (i KeyHandleID) ByteLen() int
ByteLen returns the canonical identifier byte length.
func (KeyHandleID) Format ¶
func (i KeyHandleID) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing the identifier.
func (KeyHandleID) GoString ¶
func (i KeyHandleID) GoString() string
GoString returns a constant protected key-handle representation.
func (KeyHandleID) String ¶
func (i KeyHandleID) String() string
String returns a constant protected key-handle summary.
func (KeyHandleID) Valid ¶
func (i KeyHandleID) Valid() bool
Valid reports whether the key-handle identifier is initialized.
func (KeyHandleID) WithinMaxBytes ¶
func (i KeyHandleID) WithinMaxBytes(maximum int) bool
WithinMaxBytes reports whether the identifier fits a valid narrowed bound.
type Limits ¶
type Limits struct {
MaxIdentifierBytes int
MaxDomainBytes int
MaxDomainLabels int
MaxSelectorBytes int
MaxSelectorLabels int
MaxProfiles int
MaxCredentialsPerProfile int
MaxHandles int
MaxPolicies int
MaxJSONFileBytes int
MaxJSONDepth int
MaxJSONStringBytes int
MaxDecodedStringBytes int
MaxDecodedPublicKeyBytes int
MaxRecords int
}
Limits bounds every datasource construction and parsing resource.
func DefaultLimits ¶
func DefaultLimits() Limits
DefaultLimits returns the restrictive default datasource limits. Every credential references its own key handle (providers reject a handle shared between credentials), so MaxHandles is derived as MaxProfiles*MaxCredentialsPerProfile and a profile can carry one credential per signable algorithm (rsa-sha256, ed25519-sha256, mldsa44). MaxRecords is derived too: MaxProfiles*MaxCredentialsPerProfile + MaxProfiles + MaxHandles + MaxPolicies:
MaxHandles = 1024*3 = 3072 MaxRecords = 1024*3 + 1024 + 3072 + 4096 = 11264
ProductionLimits follows the same derivation.
func HardLimits ¶
func HardLimits() Limits
HardLimits returns every non-widenable datasource maximum. The ceiling follows the same derivation as DefaultLimits, so a datasource that fills MaxProfiles with MaxCredentialsPerProfile credentials each still fits:
MaxHandles = 131072*3 = 393216 MaxRecords = 131072*3 + 131072 + 393216 + 262144 = 1179648
func ProductionLimits ¶
func ProductionLimits() Limits
ProductionLimits returns the finite large-installation profile:
MaxHandles = 32768*3 = 98304 MaxRecords = 32768*3 + 32768 + 98304 + 65536 = 294912
Both stay within HardLimits (393216 handles, 1179648 records).
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
Policy contains one immutable exact administrative profile binding.
func NewPolicy ¶
func NewPolicy( tenant TenantID, domain string, use ProfileUse, profileID ProfileID, status RecordStatus, rollout Rollout, compatibility Compatibility, feedback FeedbackRouteID, limits Limits, ) (Policy, error)
NewPolicy validates one exact administrative domain and tenant binding.
func (Policy) Compatibility ¶
func (p Policy) Compatibility() Compatibility
Compatibility returns the strict compatibility policy.
func (Policy) Eligible ¶
Eligible verifies whether this administrative policy may select a signing profile.
func (Policy) FeedbackRouteID ¶
func (p Policy) FeedbackRouteID() (FeedbackRouteID, bool)
FeedbackRouteID returns the optional opaque feedback-route reference.
func (Policy) SigningDomain ¶
SigningDomain returns the canonical administrative signing domain.
func (Policy) Status ¶
func (p Policy) Status() RecordStatus
Status returns the closed policy-record status.
func (Policy) Use ¶
func (p Policy) Use() ProfileUse
Use returns the exact administrative selection purpose.
func (Policy) ValidForLimits ¶
ValidForLimits reports whether the policy satisfies one narrowed datasource contract.
type PolicyRequest ¶
type PolicyRequest struct {
// contains filtered or unexported fields
}
PolicyRequest asks for one exact administrative tenant/domain/use binding.
func NewPolicyRequest ¶
func NewPolicyRequest(tenant TenantID, domain string, use ProfileUse, at time.Time, limits Limits) (PolicyRequest, error)
NewPolicyRequest validates one exact administrative policy request.
func (PolicyRequest) EvaluationTime ¶
func (r PolicyRequest) EvaluationTime() time.Time
EvaluationTime returns the captured UTC evaluation instant.
func (PolicyRequest) Format ¶
func (r PolicyRequest) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing request facts.
func (PolicyRequest) GoString ¶
func (r PolicyRequest) GoString() string
GoString returns a constant protected request representation.
func (PolicyRequest) SigningDomain ¶
func (r PolicyRequest) SigningDomain() string
SigningDomain returns the canonical administrative domain.
func (PolicyRequest) String ¶
func (r PolicyRequest) String() string
String returns a constant protected request summary.
func (PolicyRequest) TenantID ¶
func (r PolicyRequest) TenantID() TenantID
TenantID returns the exact requested tenant.
func (PolicyRequest) Use ¶
func (r PolicyRequest) Use() ProfileUse
Use returns the administrative selection purpose.
func (PolicyRequest) Valid ¶
func (r PolicyRequest) Valid() bool
Valid reports whether the policy request is initialized.
func (PolicyRequest) ValidForLimits ¶
func (r PolicyRequest) ValidForLimits(limits Limits) bool
ValidForLimits reports whether the policy request satisfies one narrowed datasource contract.
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
Profile contains one immutable complete datasource signing profile.
func NewProfile ¶
func NewProfile( id ProfileID, domain string, status RecordStatus, credentials []Credential, notBefore time.Time, notAfter time.Time, limits Limits, ) (Profile, error)
NewProfile validates and detaches one complete datasource signing profile.
func (Profile) ActiveAt ¶
ActiveAt verifies status and the optional half-open validity window at one captured instant.
func (Profile) CredentialCount ¶
CredentialCount returns the bounded number of complete profile credentials.
func (Profile) Credentials ¶
func (p Profile) Credentials() []Credential
Credentials returns detached credentials in canonical signing order: RSA, Ed25519, then ML-DSA-44.
func (Profile) SigningDomain ¶
SigningDomain returns the canonical profile signing domain.
func (Profile) Status ¶
func (p Profile) Status() RecordStatus
Status returns the closed administrative profile status.
func (Profile) ValidForLimits ¶
ValidForLimits reports whether the profile satisfies one narrowed datasource contract.
type ProfileID ¶
type ProfileID struct {
// contains filtered or unexported fields
}
ProfileID identifies one exact signing profile.
func NewProfileID ¶
NewProfileID validates one canonical profile identifier.
func (ProfileID) GoString ¶
GoString returns a constant protected profile-identifier representation.
func (ProfileID) WithinMaxBytes ¶
WithinMaxBytes reports whether the identifier fits a valid narrowed bound.
type ProfileRequest ¶
type ProfileRequest struct {
// contains filtered or unexported fields
}
ProfileRequest asks for one exact profile under an administrative use.
func NewProfileRequest ¶
func NewProfileRequest(profileID ProfileID, use ProfileUse, at time.Time, limits Limits) (ProfileRequest, error)
NewProfileRequest validates one exact profile request under narrowed limits.
func (ProfileRequest) EvaluationTime ¶
func (r ProfileRequest) EvaluationTime() time.Time
EvaluationTime returns the captured UTC evaluation instant.
func (ProfileRequest) Format ¶
func (r ProfileRequest) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing request facts.
func (ProfileRequest) GoString ¶
func (r ProfileRequest) GoString() string
GoString returns a constant protected request representation.
func (ProfileRequest) ProfileID ¶
func (r ProfileRequest) ProfileID() ProfileID
ProfileID returns the exact requested identity.
func (ProfileRequest) String ¶
func (r ProfileRequest) String() string
String returns a constant protected request summary.
func (ProfileRequest) Use ¶
func (r ProfileRequest) Use() ProfileUse
Use returns the administrative selection purpose.
func (ProfileRequest) Valid ¶
func (r ProfileRequest) Valid() bool
Valid reports whether the profile request is initialized.
func (ProfileRequest) ValidForLimits ¶
func (r ProfileRequest) ValidForLimits(limits Limits) bool
ValidForLimits reports whether the profile request satisfies one narrowed datasource contract.
type ProfileUse ¶
type ProfileUse uint8
ProfileUse identifies one administrative profile-selection purpose.
const ( // ProfileUseOriginator selects an administrative originator profile. ProfileUseOriginator ProfileUse = iota + 1 // ProfileUseOrdinaryTransit selects an administrative ordinary-transit profile. ProfileUseOrdinaryTransit // ProfileUseNextDomainTransit selects an administrative next-domain profile. ProfileUseNextDomainTransit // ProfileUseDeliveryStatus selects an administrative delivery-status profile. ProfileUseDeliveryStatus )
func ParseProfileUse ¶
func ParseProfileUse(value string) (ProfileUse, error)
ParseProfileUse parses one exact closed profile-use value.
func (ProfileUse) Format ¶
func (u ProfileUse) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing unknown numeric values.
func (ProfileUse) GoString ¶
func (u ProfileUse) GoString() string
GoString returns the stable profile-use representation.
func (ProfileUse) Known ¶
func (u ProfileUse) Known() bool
Known reports whether the use belongs to the closed vocabulary.
func (ProfileUse) MarshalJSON ¶
func (u ProfileUse) MarshalJSON() ([]byte, error)
MarshalJSON emits only a known closed profile-use value.
func (ProfileUse) String ¶
func (u ProfileUse) String() string
String returns the stable profile-use value or a constant unknown marker.
type Provider ¶
type Provider interface {
ResolveProfile(context.Context, ProfileRequest) (ResolvedProfile, error)
ResolvePolicy(context.Context, PolicyRequest) (ResolvedPolicy, error)
}
Provider resolves immutable profile and administrative policy snapshots.
type ProviderState ¶
type ProviderState uint8
ProviderState identifies the lifecycle of a concrete provider.
const ( // ProviderStateReady permits lookups. ProviderStateReady ProviderState = iota + 1 // ProviderStateDegraded rejects lookups until recovery. ProviderStateDegraded // ProviderStateClosed rejects all later work. ProviderStateClosed )
func (ProviderState) Format ¶
func (s ProviderState) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing unknown numeric values.
func (ProviderState) GoString ¶
func (s ProviderState) GoString() string
GoString returns the stable provider-state representation.
func (ProviderState) Known ¶
func (s ProviderState) Known() bool
Known reports whether the provider state belongs to the closed vocabulary.
func (ProviderState) MarshalJSON ¶
func (s ProviderState) MarshalJSON() ([]byte, error)
MarshalJSON emits only a known closed provider state.
func (ProviderState) String ¶
func (s ProviderState) String() string
String returns the stable provider state or a constant unknown marker.
type RecordStatus ¶
type RecordStatus uint8
RecordStatus identifies one administrative record state.
const ( // RecordStatusActive permits an otherwise authorized record. RecordStatusActive RecordStatus = iota + 1 // RecordStatusDisabled closes an administrative record. RecordStatusDisabled )
func ParseRecordStatus ¶
func ParseRecordStatus(value string) (RecordStatus, error)
ParseRecordStatus parses one exact closed record status.
func (RecordStatus) Format ¶
func (s RecordStatus) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing unknown numeric values.
func (RecordStatus) GoString ¶
func (s RecordStatus) GoString() string
GoString returns the stable record-status representation.
func (RecordStatus) Known ¶
func (s RecordStatus) Known() bool
Known reports whether the status belongs to the closed vocabulary.
func (RecordStatus) MarshalJSON ¶
func (s RecordStatus) MarshalJSON() ([]byte, error)
MarshalJSON emits only a known closed record status.
func (RecordStatus) String ¶
func (s RecordStatus) String() string
String returns the stable record status or a constant unknown marker.
type ResolvedPolicy ¶
type ResolvedPolicy struct {
// contains filtered or unexported fields
}
ResolvedPolicy is one immutable self-contained policy and profile result.
func NewResolvedPolicy ¶
func NewResolvedPolicy(generation uint64, policy Policy, profile ResolvedProfile) (ResolvedPolicy, error)
NewResolvedPolicy constructs one complete generation-consistent policy result.
func (ResolvedPolicy) Format ¶
func (r ResolvedPolicy) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing result facts.
func (ResolvedPolicy) Generation ¶
func (r ResolvedPolicy) Generation() uint64
Generation returns the immutable snapshot generation.
func (ResolvedPolicy) GoString ¶
func (r ResolvedPolicy) GoString() string
GoString returns a constant protected result representation.
func (ResolvedPolicy) Policy ¶
func (r ResolvedPolicy) Policy() Policy
Policy returns the immutable administrative binding.
func (ResolvedPolicy) Profile ¶
func (r ResolvedPolicy) Profile() Profile
Profile returns the immutable same-generation datasource profile.
func (ResolvedPolicy) String ¶
func (r ResolvedPolicy) String() string
String returns a constant protected result summary.
func (ResolvedPolicy) Valid ¶
func (r ResolvedPolicy) Valid() bool
Valid reports whether the policy result is complete and generation-consistent.
func (ResolvedPolicy) ValidForLimits ¶
func (r ResolvedPolicy) ValidForLimits(limits Limits) bool
ValidForLimits reports whether the resolved policy satisfies one narrowed datasource contract.
type ResolvedProfile ¶
type ResolvedProfile struct {
// contains filtered or unexported fields
}
ResolvedProfile is one immutable self-contained profile result.
func NewResolvedProfile ¶
func NewResolvedProfile(generation uint64, profile Profile) (ResolvedProfile, error)
NewResolvedProfile constructs one complete immutable profile result.
func (ResolvedProfile) Format ¶
func (r ResolvedProfile) Format(state fmt.State, _ rune)
Format prevents formatting verbs from exposing result facts.
func (ResolvedProfile) Generation ¶
func (r ResolvedProfile) Generation() uint64
Generation returns the immutable snapshot generation.
func (ResolvedProfile) GoString ¶
func (r ResolvedProfile) GoString() string
GoString returns a constant protected result representation.
func (ResolvedProfile) Profile ¶
func (r ResolvedProfile) Profile() Profile
Profile returns the immutable complete datasource profile.
func (ResolvedProfile) ProfileID ¶
func (r ResolvedProfile) ProfileID() ProfileID
ProfileID returns the exact resolved profile identity.
func (ResolvedProfile) String ¶
func (r ResolvedProfile) String() string
String returns a constant protected result summary.
func (ResolvedProfile) Valid ¶
func (r ResolvedProfile) Valid() bool
Valid reports whether the profile result is complete and initialized.
func (ResolvedProfile) ValidForLimits ¶
func (r ResolvedProfile) ValidForLimits(limits Limits) bool
ValidForLimits reports whether the resolved profile satisfies one narrowed datasource contract.
type Rollout ¶
type Rollout uint8
Rollout identifies one closed administrative rollout state.
func ParseRollout ¶
ParseRollout parses one exact closed rollout value.
func (Rollout) MarshalJSON ¶
MarshalJSON emits only a known closed rollout value.
type TenantID ¶
type TenantID struct {
// contains filtered or unexported fields
}
TenantID identifies one exact administrative tenant.
func NewTenantID ¶
NewTenantID validates one canonical tenant identifier.
func (TenantID) WithinMaxBytes ¶
WithinMaxBytes reports whether the identifier fits a valid narrowed bound.
type Usage ¶
type Usage struct {
// contains filtered or unexported fields
}
Usage contains bounded datasource work counters.
func (Usage) Credentials ¶
Credentials returns the bounded credential count.
func (Usage) ValidForLimits ¶
ValidForLimits reports whether every usage counter satisfies one datasource contract.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package flatfile decodes strict bounded versioned datasource documents into immutable in-memory snapshots.
|
Package flatfile decodes strict bounded versioned datasource documents into immutable in-memory snapshots. |
|
Package memory provides the immutable static datasource reference provider.
|
Package memory provides the immutable static datasource reference provider. |
|
Package signingprofile is the sole bridge from validated datasource results to signing profiles.
|
Package signingprofile is the sole bridge from validated datasource results to signing profiles. |