dockermobyutil

package
v0.0.0-...-b7a57f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrImageNotFound    = fmt.Errorf("image not found")
	ErrConnectionFailed = errors.New("connection to docker daemon failed")
)

Functions

This section is empty.

Types

type R

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

func (*R) ImageExists

func (r *R) ImageExists(image string) (bool, error)

func (*R) ImageHash

func (r *R) ImageHash(image string) (string, error)

func (*R) ImageLoad

func (r *R) ImageLoad(imgpath string) error

ImageLoad from tar archive

func (*R) ImageRemove

func (r *R) ImageRemove(imageID string) error

ImageRemove from registry

func (*R) ImageSave

func (r *R) ImageSave(image string) (pathToArchive string, _ error)

ImageSave wraps for `docker save` with the addition to add a random string to archive name.

func (*R) ImageTag

func (r *R) ImageTag(src string, target string) error

ImageLoad from tar archive

type RegistryClient

type RegistryClient interface {
	ImageExists(image string) (bool, error)
	ImageHash(image string) (string, error)
	ImageSave(image string) (pathToArchive string, _ error)
	ImageRemove(image string) error
	ImageTag(src string, target string) error

	ImageLoad(pathToArchive string) error
}

func NewRegistryClient

func NewRegistryClient() (RegistryClient, error)

Jump to

Keyboard shortcuts

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