registry

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 5 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]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]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

type DockerRegistryAuth added in v0.8.0

type DockerRegistryAuth struct {
	Type     DockerRegistryAuthType
	Username string
	Password string
	Auth     string
}

type DockerRegistryAuthType added in v0.8.0

type DockerRegistryAuthType string
const (
	DockerRegistryAuthTypeBasic       DockerRegistryAuthType = "basic"
	DockerRegistryAuthTypeEncodedAuth DockerRegistryAuthType = "encodedauth"
)

Jump to

Keyboard shortcuts

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