MCPcopy Create free account
hub / github.com/docker/cli / newNotaryClient

Function newNotaryClient

cmd/docker-trust/trust/common.go:60–66  ·  view source on GitHub ↗

newNotaryClient provides a Notary Repository to interact with signed metadata for an image.

(cli command.Streams, imgRefAndAuth trust.ImageRefAndAuth, actions []string)

Source from the content-addressed store, hash-verified

58
59// newNotaryClient provides a Notary Repository to interact with signed metadata for an image.
60func newNotaryClient(cli command.Streams, imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error) {
61 if ncp, ok := cli.(notaryClientProvider); ok {
62 // notaryClientProvider is used in tests to provide a dummy notary client.
63 return ncp.NotaryClient()
64 }
65 return trust.GetNotaryRepository(cli.In(), cli.Out(), command.UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), actions...)
66}
67
68// lookupTrustInfo returns processed signature and role information about a notary repository.
69// This information is to be pretty printed or serialized into a machine-readable format.

Callers 5

revokeTrustFunction · 0.85
runSignImageFunction · 0.85
lookupTrustInfoFunction · 0.85
addSignerToRepoFunction · 0.85
removeSingleSignerFunction · 0.85

Calls 5

RepoInfoMethod · 0.80
AuthConfigMethod · 0.80
NotaryClientMethod · 0.65
InMethod · 0.65
OutMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…