schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExpectedSchemaName    = "io.mb3r.bering.model"
	ExpectedSchemaVersion = "1.0.0"
	ExpectedSchemaURI     = "https://mb3r-lab.github.io/Bering/schema/model/v1.0.0/model.schema.json"
	ExpectedSchemaDigest  = "sha256:272277c093f37580adcd2dded225bd37c86539d642d7910baad7e4228227d1a7"

	ExpectedSnapshotSchemaName    = "io.mb3r.bering.snapshot"
	ExpectedSnapshotSchemaVersion = "1.0.0"
	ExpectedSnapshotSchemaURI     = "https://mb3r-lab.github.io/Bering/schema/snapshot/v1.0.0/snapshot.schema.json"
	ExpectedSnapshotSchemaDigest  = "sha256:87e4e887ed4a37b72f6136e268b73552eccb92941c4de2c6f3a514dd066ea972"
)

Variables

This section is empty.

Functions

func EmbeddedSchema

func EmbeddedSchema() []byte

func EmbeddedSchemaDigest

func EmbeddedSchemaDigest() string

func EmbeddedSnapshotSchema

func EmbeddedSnapshotSchema() []byte

func EmbeddedSnapshotSchemaDigest

func EmbeddedSnapshotSchemaDigest() string

func ValidateArtifactJSON

func ValidateArtifactJSON(raw []byte) error

func ValidateJSON

func ValidateJSON(raw []byte) error

func ValidateSnapshotJSON

func ValidateSnapshotJSON(raw []byte) error

func ValidateSnapshotStrict

func ValidateSnapshotStrict(ref SchemaRef) error

func ValidateStrict

func ValidateStrict(ref SchemaRef) error

Types

type SchemaRef

type SchemaRef struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	URI     string `json:"uri"`
	Digest  string `json:"digest"`
}

func ExpectedRef

func ExpectedRef() SchemaRef

func ExpectedSnapshotRef

func ExpectedSnapshotRef() SchemaRef

func ExtractSchemaRef

func ExtractSchemaRef(raw []byte) (SchemaRef, error)

Jump to

Keyboard shortcuts

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