Documentation
¶
Index ¶
Constants ¶
const SchemaVersion = "1.0"
SchemaVersion is the current schema version.
const SchemaVersionID = uint16(1)
SchemaVersionID is the numeric schema version stored in session blobs.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compatibility ¶
type Compatibility int
Compatibility indicates schema compatibility.
const ( CompatibilitySame Compatibility = iota CompatibilityAdditive CompatibilityIncompatible )
func CompareSchemas ¶
func CompareSchemas(persisted, current *Schema) (Compatibility, []string)
CompareSchemas compares persisted vs current schema and returns compatibility and reasons.
type InspectEntry ¶
type InspectEntry struct {
StableID string `json:"stableID"`
DebugName string `json:"debugName,omitempty"`
AnchorKey string `json:"anchorKey"`
Kind string `json:"kind"`
Class string `json:"class"`
Persisted bool `json:"persisted"`
}
InspectEntry is one item from `vango inspect state --json`.
func ParseInspectJSON ¶
func ParseInspectJSON(data []byte) ([]InspectEntry, error)
ParseInspectJSON parses `vango inspect state --json` output.
type InspectIndex ¶
type InspectIndex struct {
ByAnchorKey map[string]InspectEntry
ByStableID map[string][]InspectEntry
ByDebugName map[string][]InspectEntry
}
InspectIndex provides deterministic identity lookups for tests/debug/devtools.
func BuildInspectIndex ¶
func BuildInspectIndex(entries []InspectEntry) InspectIndex
BuildInspectIndex builds deterministic lookup maps from inspect entries.
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"`
PersistedPrimitives []PersistedPrimitive `json:"persistedPrimitives"`
SessionKeys []SessionKeySchema `json:"sessionKeys"`
SchemaHash string `json:"schemaHash"`
}
Schema represents the runtime state schema for persisted primitives.
func BuildCurrentSchema ¶
func BuildCurrentSchema() *Schema
BuildCurrentSchema builds the schema from runtime bindings.