reference

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDomain The default domain, if none was specified.
	DefaultDomain = "docker.io"
)

Variables

View Source
var (
	// ErrDoesNotExist is returned if a reference is not found in the
	// store.
	ErrDoesNotExist notFoundError = "reference does not exist"
)

Functions

This section is empty.

Types

type Association

type Association struct {
	ID  string
	Ref ImageRef
}

Association An association between an id and an image.

type ImageRef

type ImageRef interface {
	Tag() string
	Name() string
	Domain() string
	FullName() string
	WithTag(tag string) (ImageRef, error)
	WithName(name string) (ImageRef, error)
	WithDomain(domain string) (ImageRef, error)
}

ImageRef An image reference.

func ParseImage

func ParseImage(val string) (ImageRef, error)

ParseImage Parses a string for image:tag.

func ParseImageWithDefaultTag

func ParseImageWithDefaultTag(val, optionalTag string) (ImageRef, error)

ParseImageWithDefaultTag Parse an image name. If not tag is given in the image name, use the optionalTag as the tag.

type Store

type Store interface {
	References(id string) ([]ImageRef, error)
	AddTag(ref ImageRef, id string, force bool) error
	Delete(ref ImageRef) (bool, error)
	Get(ref ImageRef) (Association, error)
	AllImages() ([]Association, error)
}

Store The store holding info about the live images.

func NewReferenceStore

func NewReferenceStore(jsonPath string) (Store, error)

NewReferenceStore Create a new store.

Jump to

Keyboard shortcuts

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