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 Host ¶
type Host struct {
Name string `json:"-" yaml:"registry,omitempty"` // name of the host, read from yaml, not written in json
Scheme string `json:"scheme,omitempty" yaml:"scheme"` // TODO: deprecate, delete
TLS TLSConf `json:"tls,omitempty" yaml:"tls"` // enabled, 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)
DNS []string `json:"dns,omitempty" yaml:"dns"` // TODO: remove slice, single string, or remove entirely?
Hostname string `json:"hostname,omitempty" yaml:"hostname"` // replaces DNS array with single string
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
// contains filtered or unexported fields
}
Host struct contains host specific settings
func DockerLoad ¶ added in v0.4.3
func HostNewName ¶
HostNewName creates a default Host with a hostname
type TLSConf ¶
type TLSConf int
TLSConf specifies whether TLS is enabled for a host
func (TLSConf) MarshalJSON ¶
MarshalJSON converts 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.