schema

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package schema embeds versioned JSON schemas for manifest and environment validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvironmentsSchema

func GetEnvironmentsSchema(version string) ([]byte, error)

GetEnvironmentsSchema returns the environments schema for the given version. Version strings should follow the format "v1-alpha.1", "v1-beta.2", etc. The schema file must be named "environments.json" within the version directory.

func GetLatestManifestSchema

func GetLatestManifestSchema() ([]byte, error)

GetLatestManifestSchema returns the latest manifest schema ([]byte) by version order.

func GetLatestManifestVersion

func GetLatestManifestVersion() (string, error)

GetLatestManifestVersion returns the latest manifest schema version (string).

func GetManifestSchema

func GetManifestSchema(version string) ([]byte, error)

GetManifestSchema retrieves the JSON schema for validating manifests at a specific version. Version strings should follow the format "v1-alpha.1", "v1-beta.2", etc. The schema file must be named "manifest.json" within the version directory.

func GetManifestSchemas

func GetManifestSchemas() (map[string][]byte, error)

GetManifestSchemas returns a map of version string to manifest schema []byte.

func GetValidManifestVersions

func GetValidManifestVersions() ([]string, error)

GetValidManifestVersions returns all supported manifest schema versions in ascending order.

Types

type SchemaType

type SchemaType string

SchemaType is the type of schema.

const (
	// SchemaTypeManifest is the type of schema for validating manifests.
	SchemaTypeManifest SchemaType = "manifest"
	// SchemaTypeEnvironments is the type of schema for validating environments.
	SchemaTypeEnvironments SchemaType = "environments"
)

func (SchemaType) String

func (s SchemaType) String() string

String returns the string representation of the schema type.

Jump to

Keyboard shortcuts

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