registries

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DockerHub is the default name for the DockerHub registry
	DockerHub = "DockerHub"
	// Quay is the default name for the Quay registry
	Quay = "Quay"
	// Gcr is the default name for the Gcr registry
	Gcr = "Gcr"
	// GcrK8s is the default name for the GcrK8s registry
	GcrK8s = "GcrK8s"
	// Zalando is the default name for the Zalando registry
	Zalando = "Zalando"
	// Gitlab is the default name for the Gitlab registry
	Gitlab = "Gitlab"
	// AuthTypeBasic is the basic auth type
	AuthTypeBasic = "basic"
	// AuthTypeToken is the token auth type
	AuthTypeToken = "token"
	// AuthTypeNone is no auth
	AuthTypeNone = "none"
)

Variables

View Source
var ErrNoMorePages = errors.New("no more pages")

ErrNoMorePages defines that there are no more pages

Functions

This section is empty.

Types

type ImageRegistries

type ImageRegistries struct {
	DockerHub          ImageRegistry      `koanf:"dockerHub"`
	Quay               ImageRegistry      `koanf:"quay"`
	Gcr                ImageRegistry      `koanf:"gcr"`
	GcrK8s             ImageRegistry      `koanf:"gcrK8s"`
	Zalando            ImageRegistry      `koanf:"zalando"`
	Gitlab             ImageRegistry      `koanf:"gitlab"`
	OverrideImages     []OverrideImage    `koanf:"override"`
	OverrideRegistries []OverrideRegistry `koanf:"overrideRegistries"`
	OverrideImageNames map[string]string  `koanf:"overrideImageNames"`
}

ImageRegistries contains all the information regarding image registries

func (*ImageRegistries) DefaultRegistries

func (i *ImageRegistries) DefaultRegistries()

DefaultRegistries sets default values for registries

func (ImageRegistries) FindRegistryByName

func (i ImageRegistries) FindRegistryByName(name string) ImageRegistry

FindRegistryByName finds the configured registry by name, default is DockerHub

func (ImageRegistries) FindRegistryByOverrideByImage

func (i ImageRegistries) FindRegistryByOverrideByImage(name string) (ImageRegistry, bool)

FindRegistryByOverrideByImage finds if the image has a registry override

func (ImageRegistries) FindRegistryByOverrideByURL

func (i ImageRegistries) FindRegistryByOverrideByURL(url string) (ImageRegistry, bool)

FindRegistryByOverrideByURL finds if the URL has a registry override

func (ImageRegistries) FindRegistryByURL

func (i ImageRegistries) FindRegistryByURL(url string) ImageRegistry

FindRegistryByURL finds the configured registry by URL, default is DockerHub

func (ImageRegistries) GetDefaultRegistry

func (i ImageRegistries) GetDefaultRegistry() (ImageRegistry, bool)

GetDefaultRegistry finds the default configured registry

func (ImageRegistries) GetLatestVersionForImage

func (i ImageRegistries) GetLatestVersionForImage(name, url string) string

GetLatestVersionForImage gets the latest version for image

type ImageRegistry

type ImageRegistry struct {
	Name             string `koanf:"name"`
	URL              string `koanf:"url"`
	AuthType         string `koanf:"authType"`
	Username         string `koanf:"username"`
	Password         string `koanf:"password"`
	Default          bool   `koanf:"default"`
	AllowAllReleases bool
}

ImageRegistry contains all the information about the registry

func (ImageRegistry) GetLatestVersion

func (r ImageRegistry) GetLatestVersion(name string) string

GetLatestVersion fetches the latest version of the docker image from Docker registry

type OverrideImage

type OverrideImage struct {
	Images           []string      `koanf:"images"`
	Registry         ImageRegistry `koanf:"registry"`
	RegistryName     string        `koanf:"registryName"`
	AllowAllReleases bool          `koanf:"allowAllReleases"`
}

OverrideImage contains information about which registry to use, it overrides the URL used in kubernetes

type OverrideRegistry

type OverrideRegistry struct {
	Urls             []string      `koanf:"urls"`
	Registry         ImageRegistry `koanf:"registry"`
	RegistryName     string        `koanf:"registryName"`
	AllowAllReleases bool          `koanf:"allowAllReleases"`
}

OverrideRegistry contains information about which registry to use, it overrides the URL used in kubernetes

Jump to

Keyboard shortcuts

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