schema

package
Version: v0.0.0-...-d946818 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MediaTypeManifestList = "application/vnd.oci.image.manifest.list.v1+json"
	MediaTypeManifest     = "application/vnd.oci.image.manifest.v1+json"
	MediaTypeRootFS       = "application/vnd.oci.image.serialization.rootfs.tar.gzip"
	MediaTypeConfig       = "application/vnd.oci.image.serialization.config.v1+json"
	MediaTypeCombined     = "application/vnd.oci.image.serialization.combined.v1+json"
)

Variables

View Source
var (
	ErrIncorrectMediaType = errors.New("incorrect mediaType")
	ErrMissingConfig      = errors.New("the config field is empty")
	ErrMissingLayers      = errors.New("the layers field is empty")
)
View Source
var DefaultOCILayout = OCILayout{"1.0.0"}

Functions

This section is empty.

Types

type ImageConfig

type ImageConfig struct {
	Created      string                `json:"created"`
	Author       string                `json:"author"`
	Architecture string                `json:"architecture"`
	OS           string                `json:"os"`
	Config       *ImageConfigConfig    `json:"config"`
	RootFS       *ImageConfigRootFS    `json:"rootfs"`
	History      []*ImageConfigHistory `json:"history"`
}

func (*ImageConfig) PrettyString

func (ic *ImageConfig) PrettyString() string

func (*ImageConfig) String

func (ic *ImageConfig) String() string

type ImageConfigConfig

type ImageConfigConfig struct {
	User         string              `json:"User"`
	Memory       int                 `json:"Memory"`
	MemorySwap   int                 `json:"MemorySwap"`
	CpuShares    int                 `json:"CpuShares"`
	ExposedPorts map[string]struct{} `json:"ExposedPorts"`
	Env          []string            `json:"Env"`
	Entrypoint   []string            `json:"Entrypoint"`
	Cmd          []string            `json:"Cmd"`
	Volumes      map[string]struct{} `json:"Volumes"`
	WorkingDir   string              `json:"WorkingDir"`
}

type ImageConfigHistory

type ImageConfigHistory struct {
	Created    string `json:"created,omitempty"`
	Author     string `json:"author,omitempty"`
	CreatedBy  string `json:"created_by,omitempty"`
	Comment    string `json:"comment,omitempty"`
	EmptyLayer bool   `json:"empty_layer,omitempty"`
}

type ImageConfigRootFS

type ImageConfigRootFS struct {
	DiffIDs []string `json:"diff_ids"`
	Type    string   `json:"type"`
}

type ImageManifest

type ImageManifest struct {
	SchemaVersion int                    `json:"schemaVersion"`
	MediaType     string                 `json:"mediaType"`
	Config        *ImageManifestDigest   `json:"config"`
	Layers        []*ImageManifestDigest `json:"layers"`
	Annotations   map[string]string      `json:"annotations"`
}

func (*ImageManifest) PrettyString

func (im *ImageManifest) PrettyString() string

func (*ImageManifest) String

func (im *ImageManifest) String() string

func (*ImageManifest) Validate

func (im *ImageManifest) Validate() error

type ImageManifestDigest

type ImageManifestDigest struct {
	MediaType string `json:"mediaType"`
	Size      int    `json:"size"`
	Digest    string `json:"digest"`
}

type OCILayout

type OCILayout struct {
	ImageLayoutVersion string `json:"imageLayoutVersion"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL