common

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package common provides misc types and variables.

Index

Constants

View Source
const (
	NoCompression = iota
	GzipCompression
)
View Source
const (
	// AppcDockerOriginalName is the unmodified name this image was originally
	// referenced by for fetching, e.g. something like "nginx:tag" or
	// "quay.io/user/image:latest" This is identical in most cases to
	// 'registryurl/repository:tag' but may differ for the default Dockerhub
	// registry or if the tag was inferred as latest.
	AppcDockerOriginalName  = "appc.io/docker/originalname"
	AppcDockerRegistryURL   = "appc.io/docker/registryurl"
	AppcDockerRepository    = "appc.io/docker/repository"
	AppcDockerTag           = "appc.io/docker/tag"
	AppcDockerImageID       = "appc.io/docker/imageid"
	AppcDockerParentImageID = "appc.io/docker/parentimageid"
	AppcDockerEntrypoint    = "appc.io/docker/entrypoint"
	AppcDockerCmd           = "appc.io/docker/cmd"
	AppcDockerManifestHash  = "appc.io/docker/manifesthash"
)
View Source
const (
	MediaTypeDockerV21Manifest       = "application/vnd.docker.distribution.manifest.v1+json"
	MediaTypeDockerV21SignedManifest = "application/vnd.docker.distribution.manifest.v1+prettyjws"
	MediaTypeDockerV21ManifestLayer  = "application/vnd.docker.container.image.rootfs.diff+x-gtar"

	MediaTypeDockerV22Manifest     = "application/vnd.docker.distribution.manifest.v2+json"
	MediaTypeDockerV22ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json"
	MediaTypeDockerV22Config       = "application/vnd.docker.container.image.v1+json"
	MediaTypeDockerV22RootFS       = "application/vnd.docker.image.rootfs.diff.tar.gzip"

	MediaTypeOCIV1Manifest     = spec.MediaTypeImageManifest
	MediaTypeOCIV1ManifestList = spec.MediaTypeImageManifestList
	MediaTypeOCIV1Config       = spec.MediaTypeImageConfig
	MediaTypeOCIV1Layer        = spec.MediaTypeImageLayer
)
View Source
const (
	MediaTypeOptionDockerV21 = iota
	MediaTypeOptionDockerV22
	MediaTypeOptionOCIV1Pre
)
View Source
const (
	RegistryOptionV1 = iota
	RegistryOptionV2
)

Variables

This section is empty.

Functions

func ValidateLayerId added in v0.13.0

func ValidateLayerId(id string) error

ValidateLayerId validates a layer ID

Types

type Compression

type Compression int

type ErrSeveralImages

type ErrSeveralImages struct {
	Msg    string
	Images []string
}

func (*ErrSeveralImages) Error

func (e *ErrSeveralImages) Error() string

type InsecureConfig added in v0.11.0

type InsecureConfig struct {
	SkipVerify bool
	AllowHTTP  bool
}

InsecureConfig represents the different insecure options available

type MediaTypeOption added in v0.16.0

type MediaTypeOption int

MediaTypeOption represents the media types for a given docker image (or oci) spec.

type MediaTypeSet added in v0.16.0

type MediaTypeSet []MediaTypeOption

MediaTypeSet represents a set of media types which docker2aci is to use when fetchimg images. As an example if a MediaTypeSet is equal to {MediaTypeOptionDockerV22, MediaTypeOptionOCIV1Pre}, then when an image pull is made V2.1 images will not be fetched. This doesn't apply to V1 pulls. As an edge case if a MedaTypeSet is nil or empty, that means that _every_ type of media type is enabled. This type is intended to be a set, and putting duplicates in this set is generally unadvised.

func (MediaTypeSet) ConfigMediaTypes added in v0.16.0

func (m MediaTypeSet) ConfigMediaTypes() []string

func (MediaTypeSet) LayerMediaTypes added in v0.16.0

func (m MediaTypeSet) LayerMediaTypes() []string

func (MediaTypeSet) ManifestMediaTypes added in v0.16.0

func (m MediaTypeSet) ManifestMediaTypes() []string

type ParsedDockerURL added in v0.9.1

type ParsedDockerURL struct {
	OriginalName string
	IndexURL     string
	ImageName    string
	Tag          string
	Digest       string
}

ParsedDockerURL represents a parsed Docker URL.

func ParseDockerURL added in v0.9.1

func ParseDockerURL(arg string) (*ParsedDockerURL, error)

ParseDockerURL takes a Docker URL and returns a ParsedDockerURL with its index URL, image name, and tag.

type RegistryOption added in v0.16.0

type RegistryOption int

RegistryOption represents a type of a registry, based on the version of the docker http API.

type RegistryOptionSet added in v0.16.0

type RegistryOptionSet []RegistryOption

RegistryOptionSet represents a set of registry types which docker2aci is to use when fetching images. As an example if a RegistryOptionSet is equal to {RegistryOptionV2}, then v1 pulls are disabled. As an edge case if a RegistryOptionSet is nil or empty, that means that _every_ type of registry is enabled. This type is intended to be a set, and putting duplicates in this set is generally unadvised.

func (RegistryOptionSet) AllowsV1 added in v0.16.0

func (r RegistryOptionSet) AllowsV1() bool

func (RegistryOptionSet) AllowsV2 added in v0.16.0

func (r RegistryOptionSet) AllowsV2() bool

Jump to

Keyboard shortcuts

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