registry

package
v0.0.0-...-1a910b2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseImage

func ParseImage(n string) (string, string, string, string, error)

func SetLog

func SetLog(l logger)

Types

type AuthTokenTransport

type AuthTokenTransport struct {
	Transport http.RoundTripper
	// contains filtered or unexported fields
}

AuthTokenTransport defines the data structure for custom http.Request options.

func (*AuthTokenTransport) RoundTrip

func (t *AuthTokenTransport) RoundTrip(request *http.Request) (*http.Response, error)

RoundTrip defines the round tripper for the error transport.

type Config

type Config interface {
	Digest() digest.Digest
	History() ([]dockerImage.History, error)
	MediaType() string
	Size() int
}

type ConfigV1

type ConfigV1 struct {
	// contains filtered or unexported fields
}

func (*ConfigV1) Digest

func (c *ConfigV1) Digest() digest.Digest

func (*ConfigV1) History

func (c *ConfigV1) History() ([]dockerImage.History, error)

func (*ConfigV1) MediaType

func (c *ConfigV1) MediaType() string

func (*ConfigV1) Size

func (c *ConfigV1) Size() int

type ConfigV2

type ConfigV2 struct {
	// contains filtered or unexported fields
}

func (*ConfigV2) Digest

func (c *ConfigV2) Digest() digest.Digest

func (*ConfigV2) History

func (c *ConfigV2) History() ([]dockerImage.History, error)

func (*ConfigV2) MediaType

func (c *ConfigV2) MediaType() string

func (*ConfigV2) Size

func (c *ConfigV2) Size() int

type Image

type Image interface {
	Digest() (string, error)
	Platform(arch string, os string) (Platform, error)
	Platforms() ([]Platform, error)
	Repository() Repository
	SchemaVersion() (int, error)
	Tag() (string, error)
}

func NewImage

func NewImage(image string, o Opts) (Image, error)

type Layer

type Layer interface {
	Digest() (string, error)
	MediaType() string
	Size() int
}

type LayerV1

type LayerV1 struct {
	// contains filtered or unexported fields
}

func (*LayerV1) Digest

func (l *LayerV1) Digest() (string, error)

func (*LayerV1) MediaType

func (l *LayerV1) MediaType() string

func (*LayerV1) Size

func (l *LayerV1) Size() int

type LayerV2

type LayerV2 struct {
	// contains filtered or unexported fields
}

func (*LayerV2) Digest

func (l *LayerV2) Digest() (string, error)

func (*LayerV2) MediaType

func (l *LayerV2) MediaType() string

func (*LayerV2) Size

func (l *LayerV2) Size() int

type Manifest

type Manifest interface {
	Config() (Config, error)
	Layers() []Layer
	MediaType() string
	SchemaVersion() int
}

type ManifestV1

type ManifestV1 struct {
	// contains filtered or unexported fields
}

func NewManifestV1

func NewManifestV1(p *PlatformV1, m *schema1.SignedManifest, manifestDigest digest.Digest) (*ManifestV1, error)

func (*ManifestV1) Config

func (m *ManifestV1) Config() (Config, error)

func (*ManifestV1) Layers

func (m *ManifestV1) Layers() []Layer

func (*ManifestV1) MediaType

func (m *ManifestV1) MediaType() string

func (*ManifestV1) SchemaVersion

func (m *ManifestV1) SchemaVersion() int

type ManifestV2

type ManifestV2 struct {
	// contains filtered or unexported fields
}

func NewManifestV2

func NewManifestV2(m schema2.Manifest, p *PlatformV2) *ManifestV2

func (*ManifestV2) Config

func (m *ManifestV2) Config() (Config, error)

func (*ManifestV2) Layers

func (m *ManifestV2) Layers() []Layer

func (*ManifestV2) MediaType

func (m *ManifestV2) MediaType() string

func (*ManifestV2) SchemaVersion

func (m *ManifestV2) SchemaVersion() int

type Opts

type Opts struct {
	Insecure bool
	Password string
	Username string
}

type Platform

type Platform interface {
	Architecture() string
	Digest() digest.Digest
	Features() []string
	Manifest() (Manifest, error)
	OS() string
	OSFeatures() []string
	OSVersion() string
	Variant() string
}

type PlatformV1

type PlatformV1 struct {
	// contains filtered or unexported fields
}

func (*PlatformV1) Architecture

func (p *PlatformV1) Architecture() string

func (*PlatformV1) Digest

func (p *PlatformV1) Digest() digest.Digest

func (*PlatformV1) Features

func (p *PlatformV1) Features() []string

func (*PlatformV1) Manifest

func (p *PlatformV1) Manifest() (Manifest, error)

func (*PlatformV1) OS

func (p *PlatformV1) OS() string

func (*PlatformV1) OSFeatures

func (p *PlatformV1) OSFeatures() []string

func (*PlatformV1) OSVersion

func (p *PlatformV1) OSVersion() string

func (*PlatformV1) Variant

func (p *PlatformV1) Variant() string

type PlatformV2

type PlatformV2 struct {
	// contains filtered or unexported fields
}

func (*PlatformV2) Architecture

func (p *PlatformV2) Architecture() string

func (*PlatformV2) Digest

func (p *PlatformV2) Digest() digest.Digest

func (*PlatformV2) Features

func (p *PlatformV2) Features() []string

func (*PlatformV2) Manifest

func (p *PlatformV2) Manifest() (Manifest, error)

func (*PlatformV2) OS

func (p *PlatformV2) OS() string

func (*PlatformV2) OSFeatures

func (p *PlatformV2) OSFeatures() []string

func (*PlatformV2) OSVersion

func (p *PlatformV2) OSVersion() string

func (*PlatformV2) Variant

func (p *PlatformV2) Variant() string

type Registry

type Registry interface {
	Address() string
	Repository(imageName string) (Repository, error)
	Image(imageName string) (Image, error)
}

func NewRegistry

func NewRegistry(address string, o Opts) (Registry, error)

type Repository

type Repository interface {
	FullName() string
	Image(digest string, tag string) Image
	Images() ([]Image, error)
}

func NewRepository

func NewRepository(image string, o Opts) (Repository, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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