Documentation
¶
Overview ¶
Package admincontract owns the versioned provider-neutral datasource administration commitment grammar shared with external lifecycle writers.
The package contains no provider, command, transport, or service dependency. Concrete LDAP and SQL mutations remain owned by dkim2d internal packages.
Index ¶
- Constants
- func ValidCommand(command Command) bool
- func ValidState(state State) bool
- type AuditReceipt
- type CampaignPlan
- type Command
- type DNSBatch
- type Digest
- func AuditCommitment(receipt AuditReceipt) (Digest, error)
- func CampaignPlanDigest(plan CampaignPlan) (Digest, error)
- func DNSBatchDigest(batch DNSBatch) (Digest, error)
- func FrozenWorkDigest(work []WorkItem) (Digest, error)
- func ParseDigest(value []byte) (Digest, error)
- func ParseDigestHex(value string) (Digest, error)
- func PurgePlanDigest(plan PurgePlan) (Digest, error)
- type Mode
- type PurgePlan
- type PurgeTarget
- type State
- type WorkItem
Constants ¶
const (
// ContractVersion is the exact cross-repository compatibility version.
ContractVersion = "dkim2-admin-contract-v1"
)
Variables ¶
This section is empty.
Functions ¶
func ValidCommand ¶
ValidCommand reports whether a campaign command belongs to this contract version.
func ValidState ¶
ValidState reports whether a public campaign state belongs to this contract version.
Types ¶
type AuditReceipt ¶
type AuditReceipt struct {
Version string
Generation uint64
Schema string
Lifecycle string
OperationClass string
ContentDigest Digest
DestroyedAt time.Time
Result string
PolicyVersion string
PurgePlanDigest Digest
}
AuditReceipt is compact key-free destruction evidence.
type CampaignPlan ¶
type CampaignPlan struct {
Version string
Mode Mode
SourceSchema string
SourceGeneration uint64
CandidateGeneration uint64
OperationID string
Work []WorkItem
EmergencyReason string
RotationPolicyVersion string
DNSPolicyVersion string
RetentionPolicyVersion string
LimitProfileVersion string
}
CampaignPlan is the exact key-free normal or emergency plan projection.
type Command ¶
type Command string
Command identifies one closed campaign control action.
const ( CommandPlan Command = "plan" CommandPrepare Command = "prepare" CommandStage Command = "stage" CommandDNSExport Command = "dns_export" CommandDNSProve Command = "dns_prove" CommandActivate Command = "activate" CommandStatus Command = "status" CommandReconcile Command = "reconcile" CommandAbort Command = "abort" CommandPurgePlan Command = "purge_plan" CommandPurgeApply Command = "purge_apply" )
Command values identify the closed campaign control vocabulary.
type DNSBatch ¶
type DNSBatch struct {
CandidateDigest Digest
FrozenWorkDigest Digest
Ordinal uint32
Start uint32
End uint32
Total uint32
}
DNSBatch binds one deterministic contiguous work range to immutable candidate content.
type Digest ¶
type Digest struct {
// contains filtered or unexported fields
}
Digest contains one exact nonzero SHA-256 commitment.
func AuditCommitment ¶
func AuditCommitment(receipt AuditReceipt) (Digest, error)
AuditCommitment validates and commits one compact key-free purge receipt.
func CampaignPlanDigest ¶
func CampaignPlanDigest(plan CampaignPlan) (Digest, error)
CampaignPlanDigest validates and commits to one complete frozen campaign plan.
func DNSBatchDigest ¶
DNSBatchDigest validates and commits one deterministic contiguous DNS batch.
func FrozenWorkDigest ¶
FrozenWorkDigest validates and commits to an already canonical work inventory.
func ParseDigest ¶
ParseDigest validates and detaches one exact SHA-256 commitment.
func ParseDigestHex ¶
ParseDigestHex validates one canonical lowercase hexadecimal commitment.
func PurgePlanDigest ¶
PurgePlanDigest validates and commits one exact ordered noncurrent target set.
type PurgePlan ¶
type PurgePlan struct {
Version string
CurrentGeneration uint64
InventoryVersion string
PolicyVersion string
Targets []PurgeTarget
}
PurgePlan is one read-only exact ordered destructive work projection.
type PurgeTarget ¶
PurgeTarget is one exact noncurrent generation selected by retention policy.
type State ¶
type State string
State identifies one closed public campaign state.
const ( StatePlanned State = "planned" StatePreparing State = "preparing" StatePrepared State = "prepared" StateStaged State = "staged" StateDNSInProgress State = "dns_in_progress" StateDNSComplete State = "dns_complete" StateActivating State = "activating" StateActivated State = "activated" StateConflict State = "conflict" StateFailed State = "failed" StateAborted State = "aborted" StateReconcileRequired State = "reconcile_required" )
State values describe the closed externally visible campaign progression.