MCPcopy Create free account
hub / github.com/containers/image / SignatureStorageBaseURL

Function SignatureStorageBaseURL

docker/registries_d.go:66–77  ·  view source on GitHub ↗

SignatureStorageBaseURL reads configuration to find an appropriate lookaside storage URL for ref, for write access if “write”. the usage of the BaseURL is defined under docker/distribution registries—separate storage of docs/signature-protocols.md Warning: This function only exposes configuration in

(sys *types.SystemContext, ref types.ImageReference, write bool)

Source from the content-addressed store, hash-verified

64// Warning: This function only exposes configuration in registries.d;
65// just because this function returns an URL does not mean that the URL will be used by c/image/docker (e.g. if the registry natively supports X-R-S-S).
66func SignatureStorageBaseURL(sys *types.SystemContext, ref types.ImageReference, write bool) (*url.URL, error) {
67 dr, ok := ref.(dockerReference)
68 if !ok {
69 return nil, errors.New("ref must be a dockerReference")
70 }
71 config, err := loadRegistryConfiguration(sys)
72 if err != nil {
73 return nil, err
74 }
75
76 return config.lookasideStorageBaseURL(dr, write)
77}
78
79// loadRegistryConfiguration returns a registryConfiguration appropriate for sys.
80func loadRegistryConfiguration(sys *types.SystemContext) (*registryConfiguration, error) {

Callers 1

Calls 2

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…