auth

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthToBase64

func AuthToBase64(auth Auth) (string, error)

AuthToBase64 converts auth credentials to base64 encoded auth string

Types

type Auth

type Auth struct {
	Username      string `json:"username"`
	Password      string `json:"password"`
	ServerAddress string `json:"serveraddress"`
}

Auth represents registry authentication credentials

type SetRegistryAuthConfigOption

type SetRegistryAuthConfigOption func(*registry.AuthConfig) error

SetAuthConfigOption is a function that sets a parameter for the registry auth config.

func WithAuth

func WithAuth(creds Auth) SetRegistryAuthConfigOption

WithAuth is the base64 encoded auth string.

func WithEmail deprecated

func WithEmail(email string) SetRegistryAuthConfigOption

WithEmail is an optional setter associated with the username.

Deprecated: will be removed in a later version of docker.

func WithIdentityToken

func WithIdentityToken(identityToken string) SetRegistryAuthConfigOption

WithIdentityToken is used to authenticate the user and get an access token for the registry.

func WithPassword

func WithPassword(password string) SetRegistryAuthConfigOption

WithPassword is the password for the registry.

func WithRegistryToken

func WithRegistryToken(registryToken string) SetRegistryAuthConfigOption

WithRegistryToken is a bearer token to be sent to a registry

func WithServerAddress

func WithServerAddress(serverAddress string) SetRegistryAuthConfigOption

WithServerAddress is the address of the registry.

func WithUsername

func WithUsername(username string) SetRegistryAuthConfigOption

WithUsername is the username for the registry.

Jump to

Keyboard shortcuts

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