{"modulePath":"github.com/telecomposeio/docker-cli","version":"v0.0.0-20230330191823-de0d30ff24fa","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package trust\n\n## Variables\n\n```go\nvar (\n\t// ReleasesRole is the role named \"releases\"\n\tReleasesRole = data.RoleName(path.Join(data.CanonicalTargetsRole.String(), \"releases\"))\n\t// ActionsPullOnly defines the actions for read-only interactions with a Notary Repository\n\tActionsPullOnly = []string{\"pull\"}\n\t// ActionsPushAndPull defines the actions for read-write interactions with a Notary Repository\n\tActionsPushAndPull = []string{\"pull\", \"push\"}\n\t// NotaryServer is the endpoint serving the Notary trust server\n\tNotaryServer = \"https://notary.docker.io\"\n)\n```\n\n## Functions\n\n```go\nfunc GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo *registry.RepositoryInfo, authConfig *registrytypes.AuthConfig, actions ...string) (client.Repository, error)\n```\nGetNotaryRepository returns a NotaryRepository which stores all the information needed to operate on a notary repository. It creates an HTTP transport providing authentication support.\n\n```go\nfunc GetPassphraseRetriever(in io.Reader, out io.Writer) notary.PassRetriever\n```\nGetPassphraseRetriever returns a passphrase retriever that utilizes Content Trust env vars\n\n```go\nfunc GetSignableRoles(repo client.Repository, target *client.Target) ([]data.RoleName, error)\n```\nGetSignableRoles returns a list of roles for which we have valid signing keys, given a notary repository and a target\n\n```go\nfunc GetTrustDirectory() string\n```\nGetTrustDirectory returns the base trust directory name\n\n```go\nfunc NotaryError(repoName string, err error) error\n```\nNotaryError formats an error message received from the notary service\n\n```go\nfunc Server(index *registrytypes.IndexInfo) (string, error)\n```\nServer returns the base URL for the trust server.\n\n## Types\n\n```go\ntype ImageRefAndAuth struct {\n\t// contains filtered or unexported fields\n}\n```\nImageRefAndAuth contains all reference information and the auth config for an image request\n\n```go\nfunc GetImageReferencesAndAuth(ctx context.Context,\n\tauthResolver func(ctx context.Context, index *registrytypes.IndexInfo) registrytypes.AuthConfig,\n\timgName string,\n) (ImageRefAndAuth, error)\n```\nGetImageReferencesAndAuth retrieves the necessary reference and auth information for an image name as an ImageRefAndAuth struct\n\n```go\nfunc (imgRefAuth *ImageRefAndAuth) AuthConfig() *registrytypes.AuthConfig\n```\nAuthConfig returns the auth information (username, etc) for a given ImageRefAndAuth\n\n```go\nfunc (imgRefAuth *ImageRefAndAuth) Digest() digest.Digest\n```\nDigest returns the Image digest for a given ImageRefAndAuth\n\n```go\nfunc (imgRefAuth *ImageRefAndAuth) Name() string\n```\nName returns the image name used to initialize the ImageRefAndAuth\n\n```go\nfunc (imgRefAuth *ImageRefAndAuth) Reference() reference.Named\n```\nReference returns the Image reference for a given ImageRefAndAuth\n\n```go\nfunc (imgRefAuth *ImageRefAndAuth) RepoInfo() *registry.RepositoryInfo\n```\nRepoInfo returns the repository information for a given ImageRefAndAuth\n\n```go\nfunc (imgRefAuth *ImageRefAndAuth) Tag() string\n```\nTag returns the Image tag for a given ImageRefAndAuth\n\n","path":"github.com/telecomposeio/docker-cli/cli/trust","name":"trust","synopsis":"","isRedistributable":true}
