image

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 9 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// If you change this here -> adjust the `New*` functions.
	ImageService         ImageType = 0
	ImageDBMigration     ImageType = 1
	ImageServiceName               = "service"
	ImageDBMigrationName           = "dbmigration"
)

Variables

This section is empty.

Functions

func GetImageTypesHelp

func GetImageTypesHelp() string

GetImageTypesHelp reports some help string for image types.

Types

type ImageRef

type ImageRef reference.Reference

func NewImageRef

func NewImageRef(
	gitx git.Context,
	baseName string,
	packageName string,
	version *version.Version,
	registryType registry.Type,
	isRelease bool,
) (ImageRef, error)

NewImageRef construct a new image ref. This is the top-level function to generate image references. In the form: - `<base-name>-<registry-type>/<packageName>:<version>` for release image names. - `<base-name>-<registry-type>/<packageName>:<version>-<git-hash>` for non-release image names. - If the `registryType` is `RegistryTempTilt` it will be taken from `EXPECTED_REF` env. variable.

func NewRef

func NewRef(
	name string,
	tag string,
	digest string,
) (ImageRef, error)

NewRef returns a new image reference (tagged or/and with digest).

func NewRefFromString

func NewRefFromString(n string) (ImageRef, error)

NewRefFromString creates an image reference from string `n`.

type ImageRefDigested

type ImageRefDigested reference.Digested

type ImageRefField

type ImageRefField struct {
	Ref ImageRef `yaml:",inline"`
}

Wrapper around ImageRef when working with encoding.

func (ImageRefField) MarshalYAML

func (r ImageRefField) MarshalYAML() (any, error)

MarshalYAML marshals the image ref. to YAML.

func (*ImageRefField) UnmarshalYAML

func (r *ImageRefField) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML unmarshals the image ref.

type ImageRefNamed

type ImageRefNamed reference.Named

type ImageRefTagged

type ImageRefTagged reference.NamedTagged

type ImageType

type ImageType int

func GetAllImageTypes

func GetAllImageTypes() []ImageType

GetAllImageTypes returns all possible image types.

func NewImageType

func NewImageType(s string) (ImageType, error)

func (ImageType) MarshalYAML

func (v ImageType) MarshalYAML() (any, error)

MarshalYAML marshals to YAML. Note: needs to be value-receiver to be called!

func (*ImageType) Set

func (v *ImageType) Set(s string) (err error)

Implement the pflags Value interface.

func (ImageType) String

func (v ImageType) String() string

Implement the pflags Value interface.

func (*ImageType) Type

func (v *ImageType) Type() string

Implement the pflags Value interface.

func (*ImageType) UnmarshalYAML

func (v *ImageType) UnmarshalYAML(unmarshal func(any) error) (err error)

UnmarshalYAML unmarshals from YAML.

Jump to

Keyboard shortcuts

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