Documentation
¶
Overview ¶
Package schema embeds versioned JSON schemas for manifest, environment, and platform 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 GetPlatformSchema(version 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.2", "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.2", "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. It skips the platform/ subdirectory.
func GetPlatformSchema ¶ added in v0.4.0
GetPlatformSchema retrieves the JSON schema for validating platform configs at a specific version. Version strings should follow the format "v1-alpha.2", "v1-beta.2", etc. The schema file must be named "platform.json" within the platform/VERSION directory.
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" // SchemaTypePlatform is the type of schema for validating platform configs. SchemaTypePlatform SchemaType = "platform" )
func (SchemaType) String ¶
func (s SchemaType) String() string
String returns the string representation of the schema type.