type

Manifest

An immutable versioned schema contract.

Properties

PropertyTypeDescription
Snapshot()SnapshotA deep copy safe for callers to mutate.
Bytes()([]byte, error)Canonical deterministic JSON.
Equal(other)boolDeep manifest equality.

How it works

Manifest owns a deep copy. Its bytes are deterministic for the same resolved config; public accessors never expose mutable internal state.

Full signature

type Manifest struct { // contains filtered or unexported fields }

Source schema/manifest.go:724

Methods

  • Manifest.Bytes()

    Bytes returns the canonical indented manifest encoding with one trailing newline, suitable for generated artifacts and golden fixtures.

  • Manifest.Equal()

    Equal reports whether two manifests have byte-identical canonical encodings.

  • Manifest.MarshalJSON()

    MarshalJSON implements json.Marshaler without exposing mutable internals.

  • Manifest.Snapshot()

    Snapshot returns a deep copy of the manifest.

  • Manifest.UnmarshalJSON()

    UnmarshalJSON replaces a manifest only after Parse validates the complete encoded value.

  • Manifest.SameInstance()

    SameInstance reports whether manifest and other are copies of one constructed manifest. Manifests are immutable, so data derived from one instance stays valid for all of its copies. Separately constructed equal manifests are different instances.

  • Manifest.SameStorage()

    SameStorage reports whether two manifests have the same storage schema.

  • Manifest.StorageSchema()

    StorageSchema returns the manifest without the settings that never shape stored data. Two manifests with the same storage schema describe the same database, so migration history is compared through this projection and presentation changes need no migration. The projection clears:

Related guides