Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompatibilityResult ¶
type CompatibilityResult struct {
Classification DeployClassification `json:"classification"`
Reason string `json:"reason,omitempty"`
AddedIDs []string `json:"addedIds,omitempty"`
RemovedIDs []string `json:"removedIds,omitempty"`
ChangedFingerprints []FingerprintChange `json:"changedFingerprints,omitempty"`
ChangedKeyFingerprints []SessionKeyChange `json:"changedKeyFingerprints,omitempty"`
AddedKeys []string `json:"addedKeys,omitempty"`
RemovedKeys []string `json:"removedKeys,omitempty"`
}
CompatibilityResult describes schema compatibility.
func Compare ¶
func Compare(old, new *Schema) *CompatibilityResult
Compare determines compatibility between two schemas.
type DeployClassification ¶
type DeployClassification string
DeployClassification indicates the type of deploy.
const ( DeployWarm DeployClassification = "warm_deploy" DeployCold DeployClassification = "cold_deploy" DeploySchemaNeutral DeployClassification = "schema_neutral" )
type FingerprintChange ¶
type FingerprintChange struct {
StableID string `json:"stableId"`
OldFingerprint string `json:"oldFingerprint"`
NewFingerprint string `json:"newFingerprint"`
}
FingerprintChange describes a codec fingerprint change.
type PersistedPrimitive ¶
type PersistedPrimitive struct {
StableID string `json:"stableID"`
Scope string `json:"scope"`
Kind string `json:"kind"`
CodecFingerprint string `json:"codecFingerprint"`
}
PersistedPrimitive represents a persisted primitive in the schema.
type Schema ¶
type Schema struct {
SchemaVersion string `json:"schemaVersion"`
ToolVersion string `json:"toolVersion,omitempty"`
BuildSchema string `json:"buildSchema,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
PersistedPrimitives []PersistedPrimitive `json:"persistedPrimitives"`
SessionKeys []SessionKeySchema `json:"sessionKeys"`
SchemaHash string `json:"schemaHash"`
}
Schema represents the vango_state_schema.json structure.
func NormalizeFromManifest ¶
NormalizeFromManifest fills missing schema fields using manifest metadata.
func (*Schema) MarshalDeterministic ¶
MarshalDeterministic returns stable JSON output.
type SessionKeyChange ¶
type SessionKeyChange struct {
Name string `json:"name"`
OldStableID string `json:"oldStableID,omitempty"`
NewStableID string `json:"newStableID,omitempty"`
OldFingerprint string `json:"oldFingerprint"`
NewFingerprint string `json:"newFingerprint"`
}
SessionKeyChange describes a session key change.
type SessionKeySchema ¶
type SessionKeySchema struct {
Name string `json:"name"`
StableID string `json:"stableID"`
CodecFingerprint string `json:"codecFingerprint"`
HasDefault bool `json:"hasDefault"`
}
SessionKeySchema represents a session key in the schema.
func (*SessionKeySchema) UnmarshalJSON ¶
func (s *SessionKeySchema) UnmarshalJSON(data []byte) error
UnmarshalJSON supports legacy "keyName" fields.
Click to show internal directories.
Click to hide internal directories.