Documentation ¶
Index ¶
- Constants
- Variables
- func ProvideConfigKey(client *http.Client, image string) credentialconfig.RegistryConfig
- func ProvideContainerRegistry(client *http.Client, image string) credentialconfig.RegistryConfig
- func ProvideURLKey(client *http.Client, image string) credentialconfig.RegistryConfig
- func ReadDockerConfigFileFromBytes(contents []byte) (cfg credentialconfig.RegistryConfig, err error)
- func ReadDockerConfigFileFromURL(url string, client *http.Client, header *http.Header) (cfg credentialconfig.RegistryConfig, err error)
- func ReadURL(url string, client *http.Client, header *http.Header) (body []byte, err error)
- type HTTPError
- type RegistryConfigEntry
- type TokenBlob
Constants ¶
const ( // DockerConfigKey is the URL of the dockercfg metadata key used by DockerConfigKeyProvider. DockerConfigKey = metadataAttributes + "google-dockercfg" // DockerConfigURLKey is the URL of the dockercfg metadata key used by DockerConfigURLKeyProvider. DockerConfigURLKey = metadataAttributes + "google-dockercfg-url" // StorageScopePrefix is the prefix checked by ContainerRegistryProvider.Enabled. StorageScopePrefix = "https://www.googleapis.com/auth/devstorage" )
Variables ¶
var GCEProductNameFile = "/sys/class/dmi/id/product_name"
GCEProductNameFile is the product file path that contains the cloud service name. This is a variable instead of a const to enable testing.
Functions ¶
func ProvideConfigKey ¶
func ProvideConfigKey(client *http.Client, image string) credentialconfig.RegistryConfig
ProvideConfigKey implements a dockercfg-based authentication flow.
func ProvideContainerRegistry ¶
func ProvideContainerRegistry(client *http.Client, image string) credentialconfig.RegistryConfig
ProvideContainerRegistry implements a gcr.io-based authentication flow.
func ProvideURLKey ¶
func ProvideURLKey(client *http.Client, image string) credentialconfig.RegistryConfig
ProvideURLKey implements a dockercfg-url-based authentication flow.
func ReadDockerConfigFileFromBytes ¶
func ReadDockerConfigFileFromBytes(contents []byte) (cfg credentialconfig.RegistryConfig, err error)
ReadDockerConfigFileFromBytes read a docker config file from the given bytes
func ReadDockerConfigFileFromURL ¶
func ReadDockerConfigFileFromURL(url string, client *http.Client, header *http.Header) (cfg credentialconfig.RegistryConfig, err error)
ReadDockerConfigFileFromURL read a docker config file from the given url
Types ¶
type RegistryConfigEntry ¶
type RegistryConfigEntry struct {
credentialconfig.RegistryConfigEntry
}
RegistryConfigEntry is a serializable wrapper around credentialconfig.RegistryConfigEntry.
func (RegistryConfigEntry) MarshalJSON ¶
func (ident RegistryConfigEntry) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*RegistryConfigEntry) UnmarshalJSON ¶
func (ident *RegistryConfigEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.