Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProgressMessage ¶
ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature. Alternatively, should SignImageManifest be provided a logging writer of some kind?
func SignImageManifest ¶
func SignImageManifest(ctx context.Context, signer *Signer, manifest []byte, dockerReference reference.Named) (signature.Signature, error)
SignImageManifest invokes a SignerImplementation. This is a function, not a method, so that it can only be called by code that is allowed to import this internal subpackage.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer is an object, possibly carrying state, that can be used by copy.Image to sign one or more container images. This type is visible to external callers, so it has no public fields or methods apart from Close().
The owner of a Signer must call Close() when done.
func NewSigner ¶
func NewSigner(impl SignerImplementation) *Signer
NewSigner creates a public Signer from a SignerImplementation
type SignerImplementation ¶
type SignerImplementation interface { // ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature. ProgressMessage() string // SignImageManifest creates a new signature for manifest m as dockerReference. SignImageManifest(ctx context.Context, m []byte, dockerReference reference.Named) (signature.Signature, error) Close() error }
SignerImplementation is an object, possibly carrying state, that can be used by copy.Image to sign one or more container images. This interface is distinct from Signer so that implementations can be created outside of this package.