Documentation
¶
Overview ¶
Package stackspecintent owns the only first-party persistence contract for canonical StackSpec v2 intent.
Index ¶
- func BasementDomainMigrationCandidate(raw []byte) ([]byte, error)
- func IsCanonicalSHA256(value string) bool
- func PersistBasementDomainMigration(workspace, specPath string, before, after []byte) error
- func WithBasementDomainMigrator(workspace string, join lifecyclemutation.JoinRequest, ...) error
- type BasementDomainMigrator
- type Error
- type ErrorCode
- type Outcome
- type Request
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasementDomainMigrationCandidate ¶ added in v0.47.7
BasementDomainMigrationCandidate admits only the retired Basement domain. It changes the domain and explicit route hosts, then validates every field against current CUE. It does not generally admit invalid current intent.
func IsCanonicalSHA256 ¶
func PersistBasementDomainMigration ¶ added in v0.47.7
PersistBasementDomainMigration is the explicit legacy-domain exception to Persist. The frozen original bytes serve as the CAS token because current CUE deliberately rejects home. The candidate must be exactly the validated narrow transform of those bytes. Interrupted retries accept that same result.
func WithBasementDomainMigrator ¶ added in v0.47.7
func WithBasementDomainMigrator( workspace string, join lifecyclemutation.JoinRequest, migrate func(BasementDomainMigrator) error, ) error
WithBasementDomainMigrator holds the lifecycle mutation lock across the complete identity migration and supplies a persistence capability valid only during callback execution. It is the live command boundary; callers that need only StackSpec persistence use PersistBasementDomainMigration instead.
Types ¶
type BasementDomainMigrator ¶ added in v0.47.7
type BasementDomainMigrator struct {
// contains filtered or unexported fields
}
BasementDomainMigrator supplies the CUE and CAS boundary to local identity migration without coupling the runtime identity service to the compiler.
type ErrorCode ¶
type ErrorCode string
const ( ErrInvalidCandidate ErrorCode = "invalid-candidate" ErrInvalidExpected ErrorCode = "invalid-expected-hash" ErrCASRequired ErrorCode = "compare-and-swap-required" ErrCASConflict ErrorCode = "compare-and-swap-conflict" ErrMissingTarget ErrorCode = "compare-and-swap-missing-target" ErrInvalidCurrent ErrorCode = "invalid-current-intent" )
type Result ¶
type Result struct {
Outcome Outcome
KitProfile stackspecmigration.KitProfile
SpecHash string
PreviousSpecHash string
Canonical []byte
}