package registry
import "github.com/docker/cli/internal/registry"
Package registry is a fork of github.com/docker/docker/registry, taken at commit moby@49306c6. Git history was not preserved in this fork, but can be found using the URLs provided.
This fork was created to remove the dependency on the "Moby" codebase, and because the CLI only needs a subset of its features. The original package was written specifically for use in the daemon code, and includes functionality that cannot be used in the CLI.
Package registry contains client primitives to interact with a remote Docker registry.
Index ¶
- Constants
- func Headers(userAgent string, metaHeaders http.Header) []transport.RequestModifier
- func PingV2Registry(endpoint *url.URL, authTransport http.RoundTripper) (challenge.Manager, error)
- type APIEndpoint
- type Service
Constants ¶
const AuthClientID = "docker"
AuthClientID is used the ClientID used for the token server
Functions ¶
func Headers ¶
func Headers(userAgent string, metaHeaders http.Header) []transport.RequestModifier
Headers returns request modifiers with a User-Agent and metaHeaders
func PingV2Registry ¶
PingV2Registry attempts to ping a v2 registry and on success return a challenge manager for the supported authentication types. If a response is received but cannot be interpreted, a PingResponseError will be returned.
Types ¶
type APIEndpoint ¶
APIEndpoint represents a remote API endpoint
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a registry service. It tracks configuration data such as a list of mirrors.
func NewService ¶
NewService returns a new instance of Service ready to be installed into an engine.
func (*Service) Auth ¶
func (s *Service) Auth(ctx context.Context, authConfig *registry.AuthConfig, userAgent string) (token string, _ error)
Auth contacts the public registry with the provided credentials, and returns OK if authentication was successful. It can be used to verify the validity of a client's credentials.
func (*Service) Endpoints ¶
Source Files ¶
auth.go doc.go registry.go service.go service_v2.go
- Version
- v29.4.2+incompatible (latest)
- Published
- Apr 20, 2026
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 7 hours ago –
Tools for package owners.