newNotaryClient provides a Notary Repository to interact with signed metadata for an image.
(cli command.Streams, imgRefAndAuth trust.ImageRefAndAuth, actions []string)
| 58 | |
| 59 | // newNotaryClient provides a Notary Repository to interact with signed metadata for an image. |
| 60 | func 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. |
no test coverage detected
searching dependent graphs…