Documentation ¶
Overview ¶
Package schema defines the OCI image media types, schema definitions and validation functions.
Index ¶
Constants ¶
const ( MediaTypeDescriptor Validator = v1.MediaTypeDescriptor MediaTypeManifest Validator = v1.MediaTypeImageManifest MediaTypeManifestList Validator = v1.MediaTypeImageManifestList MediaTypeImageConfig Validator = v1.MediaTypeImageConfig MediaTypeImageLayer unimplemented = v1.MediaTypeImageLayer )
Media types for the OCI image formats
Variables ¶
This section is empty.
Functions ¶
func FileSystem ¶
func FileSystem() http.FileSystem
FileSystem returns an in-memory file system including the schema files. The schema files are located at the root directory.
func WrapSyntaxError ¶ added in v0.3.0
WrapSyntaxError checks whether the given error is a *json.SyntaxError and converts it into a *schema.SyntaxError containing line/col information using the given reader. If the given error is not a *json.SyntaxError it is returned unchanged.
Types ¶
type SyntaxError ¶ added in v0.3.0
A SyntaxError is a description of a JSON syntax error including line, column and offset in the JSON file.
func (*SyntaxError) Error ¶ added in v0.3.0
func (e *SyntaxError) Error() string
type ValidationError ¶
type ValidationError struct {
Errs []error
}
ValidationError contains all the errors that happened during validation.
func (ValidationError) Error ¶
func (e ValidationError) Error() string