tag

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEnvVarMap added in v0.8.0

func CreateEnvVarMap(imageName string, digest string) map[string]string

CreateEnvVarMap creates a set of environment variables for use in Templates from the given image name and digest

Types

type ChecksumTagger

type ChecksumTagger struct {
}

ChecksumTagger tags an image by the sha256 of the image tarball

func (*ChecksumTagger) GenerateFullyQualifiedImageName

func (c *ChecksumTagger) GenerateFullyQualifiedImageName(workingDir string, opts *Options) (string, error)

GenerateFullyQualifiedImageName tags an image with the supplied image name and the sha256 checksum of the image

func (*ChecksumTagger) Labels added in v0.8.0

func (c *ChecksumTagger) Labels() map[string]string

type CustomTag added in v0.2.0

type CustomTag struct {
	Tag string
}

func (*CustomTag) GenerateFullyQualifiedImageName added in v0.2.0

func (c *CustomTag) GenerateFullyQualifiedImageName(workingDir string, opts *Options) (string, error)

GenerateFullyQualifiedImageName tags an image with the custom tag

func (*CustomTag) Labels added in v0.8.0

func (c *CustomTag) Labels() map[string]string

type GitCommit

type GitCommit struct{}

GitCommit tags an image by the git commit it was built at.

func (*GitCommit) GenerateFullyQualifiedImageName

func (c *GitCommit) GenerateFullyQualifiedImageName(workingDir string, opts *Options) (string, error)

GenerateFullyQualifiedImageName tags an image with the supplied image name and the git commit.

func (*GitCommit) Labels added in v0.8.0

func (c *GitCommit) Labels() map[string]string

type Options added in v0.8.0

type Options struct {
	ImageName string
	Digest    string
}

type Tagger

type Tagger interface {
	Labels() map[string]string

	GenerateFullyQualifiedImageName(workingDir string, tagOpts *Options) (string, error)
}

Tagger is an interface for tag strategies to be implemented against

func NewDateTimeTagger added in v0.7.0

func NewDateTimeTagger(format, timezone string) Tagger

NewDateTimeTagger creates a tagger from a date format and timezone.

func NewEnvTemplateTagger added in v0.4.0

func NewEnvTemplateTagger(t string) (Tagger, error)

NewEnvTemplateTagger creates a new envTemplateTagger

Jump to

Keyboard shortcuts

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