Documentation ¶
Index ¶
- Variables
- func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, ...) (client.Repository, error)
- func GetPassphraseRetriever(in io.Reader, out io.Writer) notary.PassRetriever
- func GetSignableRoles(repo client.Repository, target *client.Target) ([]data.RoleName, error)
- func GetTrustDirectory() string
- func NotaryError(repoName string, err error) error
- func Server(index *registrytypes.IndexInfo) (string, error)
- type ImageRefAndAuth
- func (imgRefAuth *ImageRefAndAuth) AuthConfig() *types.AuthConfig
- func (imgRefAuth *ImageRefAndAuth) Digest() digest.Digest
- func (imgRefAuth *ImageRefAndAuth) Name() string
- func (imgRefAuth *ImageRefAndAuth) Reference() reference.Named
- func (imgRefAuth *ImageRefAndAuth) RepoInfo() *registry.RepositoryInfo
- func (imgRefAuth *ImageRefAndAuth) Tag() string
Constants ¶
This section is empty.
Variables ¶
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"} )
Functions ¶
func GetNotaryRepository ¶
func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo *registry.RepositoryInfo, authConfig *types.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 ¶
GetPassphraseRetriever returns a passphrase retriever that utilizes Content Trust env vars
func GetSignableRoles ¶
GetSignableRoles returns a list of roles for which we have valid signing keys, given a notary repository and a target
func GetTrustDirectory ¶
func GetTrustDirectory() string
GetTrustDirectory returns the base trust directory name
func NotaryError ¶
NotaryError formats an error message received from the notary service
Types ¶
type ImageRefAndAuth ¶
type ImageRefAndAuth struct {
// contains filtered or unexported fields
}
ImageRefAndAuth contains all reference information and the auth config for an image request
func GetImageReferencesAndAuth ¶
func GetImageReferencesAndAuth(ctx context.Context, authResolver func(ctx context.Context, index *registrytypes.IndexInfo) types.AuthConfig, imgName string) (ImageRefAndAuth, error)
GetImageReferencesAndAuth retrieves the necessary reference and auth information for an image name as an ImageRefAndAuth struct
func (*ImageRefAndAuth) AuthConfig ¶
func (imgRefAuth *ImageRefAndAuth) AuthConfig() *types.AuthConfig
AuthConfig returns the auth information (username, etc) for a given ImageRefAndAuth
func (*ImageRefAndAuth) Digest ¶
func (imgRefAuth *ImageRefAndAuth) Digest() digest.Digest
Digest returns the Image digest for a given ImageRefAndAuth
func (*ImageRefAndAuth) Name ¶
func (imgRefAuth *ImageRefAndAuth) Name() string
Name returns the image name used to initialize the ImageRefAndAuth
func (*ImageRefAndAuth) Reference ¶
func (imgRefAuth *ImageRefAndAuth) Reference() reference.Named
Reference returns the Image reference for a given ImageRefAndAuth
func (*ImageRefAndAuth) RepoInfo ¶
func (imgRefAuth *ImageRefAndAuth) RepoInfo() *registry.RepositoryInfo
RepoInfo returns the repository information for a given ImageRefAndAuth
func (*ImageRefAndAuth) Tag ¶
func (imgRefAuth *ImageRefAndAuth) Tag() string
Tag returns the Image tag for a given ImageRefAndAuth