lookasideStorageURL returns an URL usable for accessing signature index in base with known manifestDigest. base is not nil from the caller NOTE: Keep this in sync with docs/signature-protocols.md!
(base lookasideStorageBase, manifestDigest digest.Digest, index int)
| 294 | // base is not nil from the caller |
| 295 | // NOTE: Keep this in sync with docs/signature-protocols.md! |
| 296 | func lookasideStorageURL(base lookasideStorageBase, manifestDigest digest.Digest, index int) (*url.URL, error) { |
| 297 | if err := manifestDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in a path with ../, so validate explicitly. |
| 298 | return nil, err |
| 299 | } |
| 300 | sigURL := *base |
| 301 | sigURL.Path = fmt.Sprintf("%s@%s=%s/signature-%d", sigURL.Path, manifestDigest.Algorithm(), manifestDigest.Encoded(), index+1) |
| 302 | return &sigURL, nil |
| 303 | } |
no outgoing calls
searching dependent graphs…