Documentation ¶
Index ¶
- type FormatOption
- type ImageName
- func (imageName *ImageName) Enclose(organization string)
- func (imageName *ImageName) GetRepo(option FormatOption) string
- func (imageName *ImageName) HasDigest() bool
- func (name ImageName) MarshalText() ([]byte, error)
- func (imageName *ImageName) String() string
- func (imageName *ImageName) ToString(optionSet FormatOption) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormatOption ¶
type FormatOption byte
FormatOption is a the byte switch that sets the format for the image ToString func
const ( // Registry output option includes the registry in the string. Registry FormatOption = 1 << iota // Tag includes the tag in the output string. Tag // ExplicitTag forces a tag in the string, will use latest if no tag is avail. ExplicitTag // ExplicitNamespace forces a namespace in the repo, will use "library" if no namespace ExplicitNamespace )
var ( // DefaultGetStringOptions is the default set of options DefaultGetStringOptions FormatOption = Registry | Tag // ErrNoImageRepository returns when there is there is no image repository ErrNoImageRepository = errors.New("No image repository specified") )
func (FormatOption) Clear ¶
func (b FormatOption) Clear(flag FormatOption) FormatOption
Clear clears the binary flag
func (FormatOption) Has ¶
func (b FormatOption) Has(flag FormatOption) bool
Has checks if the flag is set.
func (FormatOption) Set ¶
func (b FormatOption) Set(flag FormatOption) FormatOption
Set sets the binary flag
func (FormatOption) Toggle ¶
func (b FormatOption) Toggle(flag FormatOption) FormatOption
Toggle toggles the flag
type ImageName ¶
ImageName represents the parts of an image reference.
func (*ImageName) GetRepo ¶
func (imageName *ImageName) GetRepo(option FormatOption) string
GetRepo returns the repository of the image.
func (ImageName) MarshalText ¶ added in v0.2.0
MarshalText marhsals the image name into a byte string so it can be used as a JSON map key
Click to show internal directories.
Click to hide internal directories.