schema

package
v0.2.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityType

type EntityType string
const (
	EntityCollection EntityType = "collection"
	EntityArtifact   EntityType = "artifact"
)

type Key

type Key struct {
	Entity        EntityType `json:"entity"`
	Kind          Kind       `json:"kind"`
	SchemaID      SchemaID   `json:"schemaID"`
	SchemaVersion string     `json:"schemaVersion"`
}

func ArtifactKey

func ArtifactKey(
	kind artifact.ArtifactKind,
	schemaID SchemaID,
	schemaVersion string,
) Key

func CollectionKey

func CollectionKey(
	kind collection.CollectionKind,
	schemaID SchemaID,
	schemaVersion string,
) Key

func (Key) Validate

func (k Key) Validate() error

type Kind

type Kind string

Kind is the entity-neutral kind portion of a schema key.

The Entity field determines whether the Kind must satisfy CollectionKind or ArtifactKind validation.

type ParsedDocument

type ParsedDocument struct {
	Key    Key
	Digest cryptoutil.Digest
	Raw    json.RawMessage
}

ParsedDocument is a canonical document accepted by a registered schema codec. It is a Store domain value, not a provider-private type.

func (ParsedDocument) Clone

func (d ParsedDocument) Clone() ParsedDocument

func (ParsedDocument) Validate

func (d ParsedDocument) Validate() error

type SchemaID

type SchemaID string

func (SchemaID) Validate

func (v SchemaID) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL