registry

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRegistryEndpoint

func AddRegistryEndpoint(prefix, name, apiUrl, username, password, credentials string) error

AddRegistryEndpoint adds registry endpoint information with the given details

func LoadRegistryConfiguration

func LoadRegistryConfiguration(path string) error

LoadRegistryConfiguration loads a YAML-formatted registry configuration from a given file at path.

func SetRegistryEndpointCredentials

func SetRegistryEndpointCredentials(prefix, username, password string) error

SetRegistryEndpointCredentials allows to change the credentials used for endpoint access for existing RegistryEndpoint configuration

Types

type RegistryConfiguration

type RegistryConfiguration struct {
	Name        string `yaml:"name"`
	ApiURL      string `yaml:"api_url"`
	Ping        bool   `yaml:"ping,omitempty"`
	Credentials string `yaml:"credentials,omitempty"`
	Prefix      string `yaml:"prefix,omitempty"`
}

RegistryConfiguration represents a single repository configuration for being unmarshaled from YAML.

type RegistryEndpoint

type RegistryEndpoint struct {
	RegistryName   string
	RegistryPrefix string
	RegistryAPI    string
	Username       string
	Password       string
	Ping           bool
	Credentials    string
	// contains filtered or unexported fields
}

RegistryEndpoint holds information on how to access any specific registry API endpoint.

func GetRegistryEndpoint

func GetRegistryEndpoint(prefix string) (*RegistryEndpoint, error)

GetRegistryEndpoint retrieves the endpoint information for the given prefix

func (*RegistryEndpoint) GetTags

func (clientInfo *RegistryEndpoint) GetTags(img *image.ContainerImage, kubeClient *client.KubernetesClient) ([]string, error)

GetTags returns a list of available tags for the given image

type RegistryList

type RegistryList struct {
	Items []RegistryConfiguration `yaml:"registries"`
}

RegistryList contains multiple RegistryConfiguration items

func ParseRegistryConfiguration

func ParseRegistryConfiguration(yamlSource string) (RegistryList, error)

Parses a registry configuration from a YAML input string and returns a list of registries.

Jump to

Keyboard shortcuts

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