var ( // ReleasesRole is the role named "releases" ReleasesRole = data.RoleName(path.Join(data.CanonicalTargetsRole.String(), "releases")) // ActionsPullOnly defines the actions for read-only interactions with a Notary Repository ActionsPullOnly = []string{"pull"} // ActionsPushAndPull defines the actions for read-write interactions with a Notary Repository ActionsPushAndPull = []string{"pull", "push"} // NotaryServer is the endpoint serving the Notary trust server NotaryServer = "https://notary.docker.io" )
func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo *registry.RepositoryInfo, authConfig *registrytypes.AuthConfig, actions ...string) (client.Repository, error)
GetNotaryRepository returns a NotaryRepository which stores all the information needed to operate on a notary repository. It creates an HTTP transport providing authentication support.
func GetPassphraseRetriever(in io.Reader, out io.Writer) notary.PassRetriever
GetPassphraseRetriever returns a passphrase retriever that utilizes Content Trust env vars
func GetSignableRoles(repo client.Repository, target *client.Target) ([]data.RoleName, error)
GetSignableRoles returns a list of roles for which we have valid signing keys, given a notary repository and a target
func GetTrustDirectory() string
GetTrustDirectory returns the base trust directory name
func NotaryError(repoName string, err error) error
NotaryError formats an error message received from the notary service
func Server(index *registrytypes.IndexInfo) (string, error)
Server returns the base URL for the trust server.
ImageRefAndAuth contains all reference information and the auth config for an image request
type ImageRefAndAuth struct {
// contains filtered or unexported fields
}
func GetImageReferencesAndAuth(ctx context.Context, authResolver func(ctx context.Context, index *registrytypes.IndexInfo) registrytypes.AuthConfig, imgName string, ) (ImageRefAndAuth, error)
GetImageReferencesAndAuth retrieves the necessary reference and auth information for an image name as an ImageRefAndAuth struct
func (imgRefAuth *ImageRefAndAuth) AuthConfig() *registrytypes.AuthConfig
AuthConfig returns the auth information (username, etc) for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Digest() digest.Digest
Digest returns the Image digest for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Name() string
Name returns the image name used to initialize the ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Reference() reference.Named
Reference returns the Image reference for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) RepoInfo() *registry.RepositoryInfo
RepoInfo returns the repository information for a given ImageRefAndAuth
func (imgRefAuth *ImageRefAndAuth) Tag() string
Tag returns the Image tag for a given ImageRefAndAuth