Documentation
¶
Overview ¶
Package schema embeds versioned JSON schemas for manifest and environment validation.
Index ¶
- func GetEnvironmentsSchema(version string) ([]byte, error)
- func GetLatestManifestSchema() ([]byte, error)
- func GetLatestManifestVersion() (string, error)
- func GetManifestSchema(version string) ([]byte, error)
- func GetManifestSchemas() (map[string][]byte, error)
- func GetValidManifestVersions() ([]string, error)
- type SchemaType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvironmentsSchema ¶
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 ¶
GetLatestManifestSchema returns the latest manifest schema ([]byte) by version order.
func GetLatestManifestVersion ¶
GetLatestManifestVersion returns the latest manifest schema version (string).
func GetManifestSchema ¶
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 ¶
GetManifestSchemas returns a map of version string to manifest schema []byte.
func GetValidManifestVersions ¶
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.