MCPcopy Index your code
hub / github.com/devspace-sh/devspace / GetRegistryEndpoint

Method GetRegistryEndpoint

pkg/devspace/docker/auth.go:15–22  ·  view source on GitHub ↗

GetRegistryEndpoint retrieves the correct registry url

(ctx context.Context, registryURL string)

Source from the content-addressed store, hash-verified

13
14// GetRegistryEndpoint retrieves the correct registry url
15func (c *client) GetRegistryEndpoint(ctx context.Context, registryURL string) (bool, string, error) {
16 authServer := c.getOfficialServer(ctx)
17 if registryURL == "" || registryURL == "hub.docker.com" {
18 registryURL = authServer
19 }
20
21 return registryURL == authServer, registryURL, nil
22}
23
24// GetAuthConfig returns the AuthConfig for a Docker registry from the Docker credential helper
25func (c *client) GetAuthConfig(ctx context.Context, registryURL string, checkCredentialsStore bool) (*dockerregistry.AuthConfig, error) {

Callers 3

GetAuthConfigMethod · 0.95
LoginMethod · 0.95
TestGetRegistryEndpointFunction · 0.95

Calls 1

getOfficialServerMethod · 0.95

Tested by 1

TestGetRegistryEndpointFunction · 0.76