Documentation ¶
Index ¶
- Variables
- func GetNotaryRepository(ref name.Reference, auth authn.Authenticator, repoInfo *name.Registry, ...) (client.Repository, error)
- func GetPassphraseRetriever(in io.Reader, out io.Writer, rootPassphrase string, repoPassphrase string) notary.PassRetriever
- func GetSignableRoles(repo client.Repository, target *client.Target) ([]data.RoleName, error)
- func NotaryError(repoName string, err error) error
- func Server(serverUrl string, repoInfo *name.Registry) (string, error)
- type Config
- type TrustedRepository
Constants ¶
This section is empty.
Variables ¶
View Source
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" )
Functions ¶
func GetNotaryRepository ¶
func GetNotaryRepository(ref name.Reference, auth authn.Authenticator, repoInfo *name.Registry, config *Config) (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 ¶
func GetPassphraseRetriever(in io.Reader, out io.Writer, rootPassphrase string, repoPassphrase string) notary.PassRetriever
GetPassphraseRetriever returns a passphrase retriever that utilizes configuration
func GetSignableRoles ¶
GetSignableRoles returns a list of roles for which we have valid signing keys, given a notary repository and a target
func NotaryError ¶
NotaryError formats an error message received from the notary service
Types ¶
type Config ¶
type Config struct { RootPath string ServerUrl string `json:"server_url"` RootPassphrase string `json:"root_passphrase"` RepositoryPassphrase string `json:"repository_passphrase"` }
func ParseConfig ¶
ParseConfig read configfile (${configDir}/${configFileName}) returns a Config object and error.
Click to show internal directories.
Click to hide internal directories.