dockercfg

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthEntry

type AuthEntry struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

AuthEntry contains username and password for a docker registry

type AuthMap

type AuthMap map[string]AuthEntry

AuthMap defines a map of registry names and authentication information

type Config

type Config struct {
	Auths AuthMap `json:"auths"`
}

func NewFromBytes

func NewFromBytes(contents []byte) (*Config, error)

NewFromBytes attempts to unmarshal a slice of bytes to a Config.

func NewFromFile

func NewFromFile(filePath string) (cfg *Config, err error)

NewFromFile attempts to read docker configJSON from a given file path.

func (Config) GetAuth

func (c Config) GetAuth(ctx context.Context, image string) (*registry.Auth, error)

Jump to

Keyboard shortcuts

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