Documentation ¶
Index ¶
- Variables
- func CopyStringStringMap(m map[string]string) map[string]string
- func GetCopyOptions(reportWriter io.Writer, signaturePolicyPath string, ...) *cp.Options
- func GetPolicyContext(path string) (*signature.PolicyContext, error)
- func GetSystemContext(signaturePolicyPath string) *types.SystemContext
- func IsFalse(str string) bool
- func IsTrue(str string) bool
- func IsValidBool(str string) bool
- func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error)
- type DockerRegistryOptions
- type SigningOptions
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoPassword is returned if the user did not supply a password ErrNoPassword = errors.Wrapf(syscall.EINVAL, "password was not supplied") )
Functions ¶
func CopyStringStringMap ¶
CopyStringStringMap deep copies a map[string]string and returns the result
func GetCopyOptions ¶
func GetCopyOptions(reportWriter io.Writer, signaturePolicyPath string, srcDockerRegistry, destDockerRegistry *DockerRegistryOptions, signing SigningOptions) *cp.Options
GetCopyOptions constructs a new containers/image/copy.Options{} struct from the given parameters
func GetPolicyContext ¶
func GetPolicyContext(path string) (*signature.PolicyContext, error)
GetPolicyContext creates a signature policy context for the given signature policy path
func GetSystemContext ¶
func GetSystemContext(signaturePolicyPath string) *types.SystemContext
GetSystemContext Constructs a new containers/image/types.SystemContext{} struct from the given signaturePolicy path
func IsValidBool ¶
IsValidBool determines whether the given string equals "true" or "false"
func ParseRegistryCreds ¶
func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error)
ParseRegistryCreds takes a credentials string in the form USERNAME:PASSWORD and returns a DockerAuthConfig
Types ¶
type DockerRegistryOptions ¶
type DockerRegistryOptions struct { // DockerRegistryCreds is the user name and password to supply in case // we need to pull an image from a registry, and it requires us to // authenticate. DockerRegistryCreds *types.DockerAuthConfig // DockerCertPath is the location of a directory containing CA // certificates which will be used to verify the registry's certificate // (all files with names ending in ".crt"), and possibly client // certificates and private keys (pairs of files with the same name, // except for ".cert" and ".key" suffixes). DockerCertPath string // DockerInsecureSkipTLSVerify turns off verification of TLS // certificates and allows connecting to registries without encryption. DockerInsecureSkipTLSVerify bool }
DockerRegistryOptions encapsulates settings that affect how we connect or authenticate to a remote registry.
func (DockerRegistryOptions) GetSystemContext ¶
func (o DockerRegistryOptions) GetSystemContext(signaturePolicyPath string) *types.SystemContext
GetSystemContext constructs a new system context from the given signaturePolicy path and the values in the DockerRegistryOptions
type SigningOptions ¶
type SigningOptions struct { // RemoveSignatures directs us to remove any signatures which are already present. RemoveSignatures bool // SignBy is a key identifier of some kind, indicating that a signature should be generated using the specified private key and stored with the image. SignBy string }
SigningOptions encapsulates settings that control whether or not we strip or add signatures to images when writing them.