Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v0.26.5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidationError

type ValidationError error

ValidationError is a validation error as defined by this package As of now, it simply equates to a stock Golang error

func Validate

func Validate(schemaType string, bytes []byte) ([]ValidationError, error)

Validate validates the provided bytes against the provided CNAB-Spec schemaType

func ValidateBundle

func ValidateBundle(bytes []byte) ([]ValidationError, error)

ValidateBundle validates the provided bundle bytes against the applicable CNAB-Spec schema

func ValidateClaim

func ValidateClaim(bytes []byte) ([]ValidationError, error)

ValidateClaim validates the provided claim bytes against the applicable CNAB-Spec schema

type Version

type Version string

Version represents the schema version of an object

func GetSemver

func GetSemver(schemaVersion string) (Version, error)

GetSemver returns a proper semver Version from the provided string, trimming the non-semver prefix according to schema versioning protocol in the cnabio/cnab-spec repo

func (Version) Validate

func (v Version) Validate() error

Validate the provided schema version is present and adheres to semantic versioning

Jump to

Keyboard shortcuts

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