Documentation
¶
Overview ¶
Package config is used for all regclient configuration settings.
Index ¶
Constants ¶
View Source
const ( // DockerRegistry is the name resolved in docker images on Hub. DockerRegistry = "docker.io" // DockerRegistryAuth is the name provided in docker's config for Hub. DockerRegistryAuth = "https://index.docker.io/v1/" // DockerRegistryDNS is the host to connect to for Hub. DockerRegistryDNS = "registry-1.docker.io" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cred ¶ added in v0.4.3
type Cred struct {
User, Password, Token string
}
Cred defines a user credential for accessing a registry.
type Host ¶
type Host struct { Name string `json:"-" yaml:"registry,omitempty"` // Name of the registry (required) (yaml configs pass this as a field, json provides this from the object key) TLS TLSConf `json:"tls,omitempty" yaml:"tls"` // TLS setting: enabled (default), disabled, insecure RegCert string `json:"regcert,omitempty" yaml:"regcert"` // public pem cert of registry ClientCert string `json:"clientCert,omitempty" yaml:"clientCert"` // public pem cert for client (mTLS) ClientKey string `json:"clientKey,omitempty" yaml:"clientKey"` // private pem cert for client (mTLS) Hostname string `json:"hostname,omitempty" yaml:"hostname"` // hostname of registry, default is the registry name User string `json:"user,omitempty" yaml:"user"` // username, not used with credHelper Pass string `json:"pass,omitempty" yaml:"pass"` // password, not used with credHelper Token string `json:"token,omitempty" yaml:"token"` // token, experimental for specific APIs CredHelper string `json:"credHelper,omitempty" yaml:"credHelper"` // credential helper command for requesting logins CredExpire timejson.Duration `json:"credExpire,omitempty" yaml:"credExpire"` // time until credential expires CredHost string `json:"credHost" yaml:"credHost"` // used when a helper hostname doesn't match Hostname PathPrefix string `json:"pathPrefix,omitempty" yaml:"pathPrefix"` // used for mirrors defined within a repository namespace Mirrors []string `json:"mirrors,omitempty" yaml:"mirrors"` // list of other Host Names to use as mirrors Priority uint `json:"priority,omitempty" yaml:"priority"` // priority when sorting mirrors, higher priority attempted first RepoAuth bool `json:"repoAuth,omitempty" yaml:"repoAuth"` // tracks a separate auth per repo API string `json:"api,omitempty" yaml:"api"` // experimental: registry API to use APIOpts map[string]string `json:"apiOpts,omitempty" yaml:"apiOpts"` // options for APIs BlobChunk int64 `json:"blobChunk,omitempty" yaml:"blobChunk"` // size of each blob chunk BlobMax int64 `json:"blobMax,omitempty" yaml:"blobMax"` // threshold to switch to chunked upload, -1 to disable, 0 for regclient.blobMaxPut ReqPerSec float64 `json:"reqPerSec,omitempty" yaml:"reqPerSec"` // requests per second, default is defaultReqPerSec(10) ReqConcurrent int64 `json:"reqConcurrent,omitempty" yaml:"reqConcurrent"` // concurrent requests, default is defaultConcurrent(3) Scheme string `json:"scheme,omitempty" yaml:"scheme"` // Deprecated: use TLS instead // contains filtered or unexported fields }
Host defines settings for connecting to a registry.
func DockerLoad ¶ added in v0.4.3
DockerLoad returns a slice of hosts from the users docker config.
func HostNewName ¶
HostNewName creates a default Host with a hostname.
func (*Host) GetCred ¶ added in v0.4.3
GetCred returns the credential, fetching from a credential helper if needed.
type TLSConf ¶
type TLSConf int
TLSConf specifies whether TLS is enabled and verified for a host.
func (TLSConf) MarshalJSON ¶
MarshalJSON converts TLSConf to a json string using MarshalText.
func (TLSConf) MarshalText ¶
MarshalText converts TLSConf to a string.
func (*TLSConf) UnmarshalJSON ¶
UnmarshalJSON converts TLSConf from a json string.
func (*TLSConf) UnmarshalText ¶
UnmarshalText converts TLSConf from a string.
Click to show internal directories.
Click to hide internal directories.