schema

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package schema defines the OCI image media types, schema definitions and validation functions.

Index

Constants

View Source
const (
	MediaTypeManifest                   Validator     = `application/vnd.oci.image.manifest.v1+json`
	MediaTypeManifestList               Validator     = `application/vnd.oci.image.manifest.list.v1+json`
	MediaTypeImageSerialization         unimplemented = `application/vnd.oci.image.serialization.rootfs.tar.gzip`
	MediaTypeImageSerializationConfig   Validator     = `application/vnd.oci.image.serialization.config.v1+json`
	MediaTypeImageSerializationCombined unimplemented = `application/vnd.oci.image.serialization.combined.v1+json`
)

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.

Types

type ValidationError

type ValidationError struct {
	Errs []error
}

ValidationError contains all the errors that happened during validation.

func (ValidationError) Error

func (e ValidationError) Error() string

type Validator

type Validator string

Validator wraps a media type string identifier and implements validation against a JSON schema.

func (Validator) Validate

func (v Validator) Validate(src io.Reader) error

Validate validates the given reader against the schema of the wrapped media type.

Jump to

Keyboard shortcuts

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