registry

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImageTagOrDigest added in v0.7.0

func GetImageTagOrDigest(image string) (string, error)

func GetRegistry

func GetRegistry(image string) (string, error)

func ResolveAuth

func ResolveAuth(auths map[string]types.DockerRegistryAuth, regname string) (string, string, error)

ResolveAuth resolves the auth username and password for the provided registry name

Types

type DockerConfig

type DockerConfig struct {
	Auths map[string]DockerConfigAuth `json:"auths,omitempty"`
}

Docker config represents the docker config.json format. We only consider the "auths" part

func GenDockerConfig

func GenDockerConfig(auths map[string]types.DockerRegistryAuth, images []string) (*DockerConfig, error)

type DockerConfigAuth

type DockerConfigAuth struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Auth     string `json:"auth,omitempty"`
}

Docker config represents the docker config.json auth part. We only consider the "auth" token part

Jump to

Keyboard shortcuts

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