registryauth

package
v0.0.1-dev.12 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicTokenConfig

type BasicTokenConfig struct {
	Registry string
	Username string
	Password string
	Token    string
}

type BasicTokenProvider

type BasicTokenProvider struct {
	// contains filtered or unexported fields
}

func NewBasicTokenProvider

func NewBasicTokenProvider(cfg BasicTokenConfig) *BasicTokenProvider

func (*BasicTokenProvider) Match

func (p *BasicTokenProvider) Match(host string) bool

func (*BasicTokenProvider) Resolve

func (p *BasicTokenProvider) Resolve(ctx context.Context, host, imageRef string) (string, error)

type DockerConfigJSONProvider

type DockerConfigJSONProvider struct {
	// contains filtered or unexported fields
}

DockerConfigJSONProvider resolves credentials from a .dockerconfigjson blob

func NewDockerConfigJSONProvider

func NewDockerConfigJSONProvider(registryPattern, raw string) *DockerConfigJSONProvider

func (*DockerConfigJSONProvider) Match

func (p *DockerConfigJSONProvider) Match(host string) bool

func (*DockerConfigJSONProvider) Resolve

func (p *DockerConfigJSONProvider) Resolve(ctx context.Context, host, imageRef string) (string, error)

type ECRConfig

type ECRConfig struct {
	Registry string // pattern, e.g., *.dkr.ecr.us-east-1.amazonaws.com
	Region   string // optional override
}

type ECRProvider

type ECRProvider struct {
	// contains filtered or unexported fields
}

func NewECRProvider

func NewECRProvider(cfg ECRConfig) *ECRProvider

func (*ECRProvider) Match

func (p *ECRProvider) Match(host string) bool

func (*ECRProvider) Resolve

func (p *ECRProvider) Resolve(ctx context.Context, host, imageRef string) (string, error)

type Provider

type Provider interface {
	Match(host string) bool
	Resolve(ctx context.Context, host string, imageRef string) (string, error)
}

Provider supplies Docker RegistryAuth for a given image host

func BuildProviders

func BuildProviders(ctx context.Context, regs []map[string]any) []Provider

BuildProviders constructs providers from normalized registries configuration. Each entry is expected to contain keys: name, registry, auth{type, username, password, token, region, dockerconfigjson}

Jump to

Keyboard shortcuts

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