images

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLISaver

type CLISaver struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

CLISaver implements ImageSaver via a docker client

func (*CLISaver) SaveImage

func (s *CLISaver) SaveImage(ctx context.Context, saveOpts SaveOpts) chan interface{}

type DestinationParams

type DestinationParams struct {
	AuthConfig           types.AuthConfig
	DestinationImageName string
}

type ImageManager

type ImageManager interface {
	ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error)
	ImageTag(ctx context.Context, source, target string) error
	ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error)
	ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error)
}

ImageManager represents a subset of the docker client interface

type ImageSaver

type ImageSaver interface {
	SaveImage(ctx context.Context, opts SaveOpts) chan interface{}
}

ImageSaver saves an image

func NewImageSaver

func NewImageSaver(logger log.Logger, client *docker.Client) ImageSaver

type Progress

type Progress struct {
	ID             string      `json:"id"` // this will be layer ID
	Status         string      `json:"status"`
	Image          string      `json:"image"`
	ProgressDetail interface{} `json:"progressDetail"`
}

type PullURLResolver

type PullURLResolver interface {
	ResolvePullURL(asset api.DockerAsset, meta api.ReleaseMetadata) (string, error)
}

func URLResolverFromViper

func URLResolverFromViper(logger log.Logger) PullURLResolver

type SaveOpts

type SaveOpts struct {
	PullURL        string
	SaveURL        string
	IsPrivate      bool
	Filename       string
	DestinationURL *url.URL
	Username       string
	Password       string
}

type URLResolver

type URLResolver struct {
	Logger log.Logger
}

func (*URLResolver) ResolvePullURL

func (r *URLResolver) ResolvePullURL(asset api.DockerAsset, meta api.ReleaseMetadata) (string, error)

Jump to

Keyboard shortcuts

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