Versions in this module Expand all Collapse all v1 v1.13.1 Feb 8, 2017 Changes in this version + const AuthClientID + const DefaultSearchLimit + var CertsDir = "/etc/docker/certs.d" — darwin/amd64, js/wasm, linux/amd64 + var CertsDir = os.Getenv("programdata") + `\docker\certs.d` — windows/amd64 + var DefaultNamespace = "docker.io" + var DefaultRegistryVersionHeader = "Docker-Distribution-Api-Version" + var DefaultV2Registry = &url.URL + var ErrAlreadyExists = errors.New("Image already exists") + var ErrInvalidRepositoryName = errors.New("Invalid repository name (ex: \"registry.domain.tld/myrepos\")") + var ErrRepoNotFound = errors.New("Repository not found") + var IndexHostname = "index.docker.io" + var IndexName = "docker.io" + var IndexServer = "https://" + IndexHostname + "/v1/" + var NotaryServer = "https://notary.docker.io" + func AuthTransport(base http.RoundTripper, authConfig *types.AuthConfig, alwaysSetBasicAuth bool) http.RoundTripper + func ConvertToHostname(url string) string + func DockerHeaders(userAgent string, metaHeaders http.Header) []transport.RequestModifier + func GetAuthConfigKey(index *registrytypes.IndexInfo) string + func HTTPClient(transport http.RoundTripper) *http.Client + func NewStaticCredentialStore(auth *types.AuthConfig) auth.CredentialStore + func NewTransport(tlsConfig *tls.Config) *http.Transport + func ParseSearchIndexInfo(reposName string) (*registrytypes.IndexInfo, error) + func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, bool, error) + func ReadCertsDirectory(tlsConfig *tls.Config, directory string) error + func ResolveAuthConfig(authConfigs map[string]types.AuthConfig, index *registrytypes.IndexInfo) types.AuthConfig + func ValidateIndexName(val string) (string, error) + func ValidateMirror(val string) (string, error) + type APIEndpoint struct + Mirror bool + Official bool + TLSConfig *tls.Config + TrimHostname bool + URL *url.URL + Version APIVersion + func (e APIEndpoint) ToV1Endpoint(userAgent string, metaHeaders http.Header) (*V1Endpoint, error) + type APIVersion int + const APIVersion1 + const APIVersion2 + func (av APIVersion) String() string + type DefaultService struct + func NewService(options ServiceOptions) *DefaultService + func (s *DefaultService) Auth(ctx context.Context, authConfig *types.AuthConfig, userAgent string) (status, token string, err error) + func (s *DefaultService) LoadInsecureRegistries(registries []string) error + func (s *DefaultService) LookupPullEndpoints(hostname string) (endpoints []APIEndpoint, err error) + func (s *DefaultService) LookupPushEndpoints(hostname string) (endpoints []APIEndpoint, err error) + func (s *DefaultService) ResolveRepository(name reference.Named) (*RepositoryInfo, error) + func (s *DefaultService) Search(ctx context.Context, term string, limit int, authConfig *types.AuthConfig, ...) (*registrytypes.SearchResults, error) + func (s *DefaultService) ServiceConfig() *registrytypes.ServiceConfig + func (s *DefaultService) TLSConfig(hostname string) (*tls.Config, error) + type ImgData struct + Checksum string + ChecksumPayload string + ID string + Tag string + type PingResponseError struct + Err error + func (err PingResponseError) Error() string + type PingResult struct + Standalone bool + Version string + type RepositoryData struct + Endpoints []string + ImgList map[string]*ImgData + Tokens []string + type RepositoryInfo struct + Class string + Index *registrytypes.IndexInfo + Official bool + func ParseRepositoryInfo(reposName reference.Named) (*RepositoryInfo, error) + type Service interface + Auth func(ctx context.Context, authConfig *types.AuthConfig, userAgent string) (status, token string, err error) + LoadInsecureRegistries func([]string) error + LookupPullEndpoints func(hostname string) (endpoints []APIEndpoint, err error) + LookupPushEndpoints func(hostname string) (endpoints []APIEndpoint, err error) + ResolveRepository func(name reference.Named) (*RepositoryInfo, error) + Search func(ctx context.Context, term string, limit int, authConfig *types.AuthConfig, ...) (*registrytypes.SearchResults, error) + ServiceConfig func() *registrytypes.ServiceConfig + TLSConfig func(hostname string) (*tls.Config, error) + type ServiceOptions struct + InsecureRegistries []string + Mirrors []string + V2Only bool + func (options *ServiceOptions) InstallCliFlags(flags *pflag.FlagSet) + type Session struct + func NewSession(client *http.Client, authConfig *types.AuthConfig, endpoint *V1Endpoint) (*Session, error) + func (r *Session) GetAuthConfig(withPasswd bool) *types.AuthConfig + func (r *Session) GetRemoteHistory(imgID, registry string) ([]string, error) + func (r *Session) GetRemoteImageJSON(imgID, registry string) ([]byte, int64, error) + func (r *Session) GetRemoteImageLayer(imgID, registry string, imgSize int64) (io.ReadCloser, error) + func (r *Session) GetRemoteTag(registries []string, repositoryRef reference.Named, askedTag string) (string, error) + func (r *Session) GetRemoteTags(registries []string, repositoryRef reference.Named) (map[string]string, error) + func (r *Session) GetRepositoryData(name reference.Named) (*RepositoryData, error) + func (r *Session) ID() string + func (r *Session) LookupRemoteImage(imgID, registry string) error + func (r *Session) PushImageChecksumRegistry(imgData *ImgData, registry string) error + func (r *Session) PushImageJSONIndex(remote reference.Named, imgList []*ImgData, validate bool, regs []string) (*RepositoryData, error) + func (r *Session) PushImageJSONRegistry(imgData *ImgData, jsonRaw []byte, registry string) error + func (r *Session) PushImageLayerRegistry(imgID string, layer io.Reader, registry string, jsonRaw []byte) (checksum string, checksumPayload string, err error) + func (r *Session) PushRegistryTag(remote reference.Named, revision, tag, registry string) error + func (r *Session) SearchRepositories(term string, limit int) (*registrytypes.SearchResults, error) + type V1Endpoint struct + IsSecure bool + URL *url.URL + func NewV1Endpoint(index *registrytypes.IndexInfo, userAgent string, metaHeaders http.Header) (*V1Endpoint, error) + func (e *V1Endpoint) Path(path string) string + func (e *V1Endpoint) Ping() (PingResult, error) + func (e *V1Endpoint) String() string