images

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

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