image

package
v3.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LatestTag describes the tag used to refer to the latest version
	// of an image
	LatestTag = "latest"
)

Variables

View Source
var (
	// ErrNoSuchCtr indicates the requested container does not exist
	ErrNoSuchCtr = define.ErrNoSuchCtr
	// ErrNoSuchPod indicates the requested pod does not exist
	ErrNoSuchPod = define.ErrNoSuchPod
	// ErrNoSuchImage indicates the requested image does not exist
	ErrNoSuchImage = define.ErrNoSuchImage
	// ErrNoSuchTag indicates the requested image tag does not exist
	ErrNoSuchTag = define.ErrNoSuchTag
)
View Source
var (
	// DockerArchive is the transport we prepend to an image name
	// when saving to docker-archive
	DockerArchive = dockerarchive.Transport.Name()
	// OCIArchive is the transport we prepend to an image name
	// when saving to oci-archive
	OCIArchive = ociarchive.Transport.Name()
	// DirTransport is the transport for pushing and pulling
	// images to and from a directory
	DirTransport = directory.Transport.Name()
	// DockerTransport is the transport for docker registries
	DockerTransport = docker.Transport.Name()
	// OCIDirTransport is the transport for pushing and pulling
	// images to and from a directory containing an OCI image
	OCIDirTransport = oci.Transport.Name()
	// AtomicTransport is the transport for atomic registries
	AtomicTransport = "atomic"
	// DefaultTransport is a prefix that we apply to an image name
	// NOTE: This is a string prefix, not actually a transport name usable for transports.Get();
	// and because syntaxes of image names are transport-dependent, the prefix is not really interchangeable;
	// each user implicitly assumes the appended string is a Docker-like reference.
	DefaultTransport = DockerTransport + "://"
	// DefaultLocalRegistry is the default local registry for local image operations
	// Remote pulls will still use defined registries
	DefaultLocalRegistry = "localhost"
)
View Source
var ErrImageIsBareList = stderrors.New("image contains a manifest list or image index, but no runnable image")

ErrImageIsBareList is the error returned when the image is just a list or index

View Source
var ErrRepoTagNotFound = stderrors.New("unable to match user input to any specific repotag")

ErrRepoTagNotFound is the error returned when the image id given doesn't match a rep tag in store

Functions

func BuildImageHierarchyMap

func BuildImageHierarchyMap(imageInfo *InfoImage, layerMap map[string]*LayerInfo, layerID string) error

BuildImageHierarchyMap stores hierarchy of images such that all parent layers using which image is built are stored in imageInfo Layers are added such that (Start)RootLayer->...intermediate Parent Layer(s)-> TopLayer(End)

func CreateManifestList

func CreateManifestList(rt *Runtime, systemContext types.SystemContext, names []string, imgs []string, all bool) (string, error)

CreateManifestList creates a new manifest list and can optionally add given images to the list

func GetAdditionalTags

func GetAdditionalTags(images []string) ([]reference.NamedTagged, error)

GetAdditionalTags returns a list of reference.NamedTagged for the additional tags given in images

func GetImageBaseName

func GetImageBaseName(input string) (string, error)

GetImageBaseName uses decompose and string splits to obtain the base name of an image. Doing this here because it beats changing the imageParts struct names to be exported as well.

func GetLayersMapWithImageInfo

func GetLayersMapWithImageInfo(imageruntime *Runtime) (map[string]*LayerInfo, error)

GetLayersMapWithImageInfo returns map of image-layers, with associated information like RepoTags, parent and list of child layers.

func GetSystemContext

func GetSystemContext(signaturePolicyPath, authFilePath string, forceCompress bool) *types.SystemContext

GetSystemContext Constructs a new containers/image/types.SystemContext{} struct from the given signaturePolicy path

func IsValidImageURI

func IsValidImageURI(imguri string) (bool, error)

IsValidImageURI checks if image name has valid format

func NormalizedTag

func NormalizedTag(tag string) (reference.Named, error)

NormalizedTag returns the canonical version of tag for use in Image.Names()

Types

type DiskUsageStat

type DiskUsageStat struct {
	// ID of the image.
	ID string
	// Repository of the first recorded name of the image.
	Repository string
	// Tag of the first recorded name of the image.
	Tag string
	// Created is the creation time of the image.
	Created time.Time
	// SharedSize is the amount of space shared with another image.
	SharedSize uint64
	// UniqueSize is the amount of space used only by this image.
	UniqueSize uint64
	// Size is the total size of the image (i.e., the sum of the shared and
	// unique size).
	Size uint64
	// Number of containers using the image.
	Containers int
}

DiskUsageStat gives disk-usage statistics for a specific image.

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
	// - or forces it on even if registries.conf has the registry configured as insecure.
	DockerInsecureSkipTLSVerify types.OptionalBool
	// If not "", overrides the use of platform.GOOS when choosing an image or verifying OS match.
	OSChoice string
	// If not "", overrides the use of platform.GOARCH when choosing an image or verifying architecture match.
	ArchitectureChoice string
	// If not "", overrides_VARIANT_ instead of the running architecture variant for choosing images.
	VariantChoice string
	// RegistriesConfPath can be used to override the default path of registries.conf.
	RegistriesConfPath string
}

DockerRegistryOptions encapsulates settings that affect how we connect or authenticate to a remote registry.

func (DockerRegistryOptions) GetSystemContext

func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, additionalDockerArchiveTags []reference.NamedTagged) *types.SystemContext

GetSystemContext constructs a new system context from a parent context. the values in the DockerRegistryOptions, and other parameters.

type Filter

type Filter func(*Image, *inspect.ImageData) bool

Filter is a function to determine whether an image is included in command output. Images to be outputted are tested using the function. A true return will include the image, a false return will exclude it.

type History

type History struct {
	ID        string     `json:"id"`
	Created   *time.Time `json:"created"`
	CreatedBy string     `json:"createdBy"`
	Size      int64      `json:"size"`
	Comment   string     `json:"comment"`
	Tags      []string   `json:"tags"`
}

History contains the history information of an image

type Image

type Image struct {
	inspect.ImageData
	inspect.ImageResult

	InputName string
	// contains filtered or unexported fields
}

Image is the primary struct for dealing with images It is still very much a work in progress

func FilterImages

func FilterImages(images []*Image, filters []ResultFilter) []*Image

FilterImages filters images using a set of predefined filter funcs

func (*Image) AddManifest

func (i *Image) AddManifest(systemContext types.SystemContext, opts ManifestAddOpts) (string, error)

AddManifest adds a manifest to a given manifest list.

func (*Image) AnnotateManifest

func (i *Image) AnnotateManifest(systemContext types.SystemContext, d digest.Digest, opts ManifestAnnotateOpts) (string, error)

AnnotateManifest updates an image configuration of a manifest list.

func (*Image) Annotations

func (i *Image) Annotations(ctx context.Context) (map[string]string, error)

Annotations returns the annotations of an image

func (*Image) Cmd

func (i *Image) Cmd(ctx context.Context) ([]string, error)

Cmd returns the image's cmd

func (*Image) Comment

func (i *Image) Comment(ctx context.Context, manifestType string) (string, error)

Comment returns the Comment for an image depending on its ManifestType

func (*Image) Containers

func (i *Image) Containers() ([]string, error)

Containers a list of container IDs associated with the image

func (*Image) Created

func (i *Image) Created() time.Time

Created returns the time the image was created

func (*Image) Dangling

func (i *Image) Dangling() bool

Dangling returns a bool if the image is "dangling"

func (*Image) Digest

func (i *Image) Digest() digest.Digest

Digest returns the image's digest

func (*Image) Digests

func (i *Image) Digests() []digest.Digest

Digests returns the image's digests

func (*Image) DriverData

func (i *Image) DriverData() (*define.DriverData, error)

DriverData gets the driver data from the store on a layer

func (*Image) Entrypoint

func (i *Image) Entrypoint(ctx context.Context) ([]string, error)

Entrypoint returns the image's entrypoint

func (*Image) Env

func (i *Image) Env(ctx context.Context) ([]string, error)

Env returns the image's env

func (*Image) GenerateTree

func (i *Image) GenerateTree(whatRequires bool) (string, error)

GenerateTree creates an image tree string representation for displaying it to the user.

func (*Image) GetChildren

func (i *Image) GetChildren(ctx context.Context) ([]string, error)

GetChildren returns a list of the imageIDs that depend on the image

func (*Image) GetConfigBlob

func (i *Image) GetConfigBlob(ctx context.Context) (*manifest.Schema2Image, error)

GetConfigBlob returns a schema2image. If the image is not a schema2, then it will return an error

func (*Image) GetHealthCheck

func (i *Image) GetHealthCheck(ctx context.Context) (*manifest.Schema2HealthConfig, error)

GetHealthCheck returns a HealthConfig for an image. This function only works with schema2 images.

func (*Image) GetLabel

func (i *Image) GetLabel(ctx context.Context, label string) (string, error)

GetLabel Returns a case-insensitive match of a given label

func (*Image) GetManifest

func (i *Image) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error)

GetManifest returns the image's manifest as a byte array and manifest type as a string.

func (*Image) GetParent

func (i *Image) GetParent(ctx context.Context) (*Image, error)

GetParent returns the image ID of the parent. Return nil if a parent is not found.

func (*Image) History

func (i *Image) History(ctx context.Context) ([]*History, error)

History gets the history of an image and the IDs of images that are part of its history

func (*Image) ID

func (i *Image) ID() string

ID returns the image ID as a string

func (*Image) InputIsID

func (i *Image) InputIsID() bool

InputIsID returns a bool if the user input for an image is the image's partial or full id

func (*Image) Inspect

func (i *Image) Inspect(ctx context.Context) (*inspect.ImageData, error)

Inspect returns an image's inspect data

func (*Image) InspectManifest

func (i *Image) InspectManifest() (*manifest.Schema2List, error)

InspectManifest returns a dockerized version of the manifest list

func (*Image) InspectNoSize

func (i *Image) InspectNoSize(ctx context.Context) (*inspect.ImageData, error)

InspectNoSize returns an image's inspect data without calculating the size for the image

func (*Image) IsParent

func (i *Image) IsParent(ctx context.Context) (bool, error)

IsParent goes through the layers in the store and checks if i.TopLayer is the parent of any other layer in store. Double check that image with that layer exists as well.

func (*Image) IsReadOnly

func (i *Image) IsReadOnly() bool

IsReadOnly returns whether the image ID comes from a local store

func (*Image) Labels

func (i *Image) Labels(ctx context.Context) (map[string]string, error)

Labels returns the image's labels

func (*Image) Layer

func (i *Image) Layer() (*storage.Layer, error)

Layer returns the image's top layer

func (*Image) Manifest

func (i *Image) Manifest(ctx context.Context) ([]byte, string, error)

Manifest returns the image's manifest as a byte array and manifest type as a string.

func (*Image) MatchRepoTag

func (i *Image) MatchRepoTag(input string) (string, error)

MatchRepoTag takes a string and tries to match it against an image's repotags

func (*Image) MatchesID

func (i *Image) MatchesID(id string) bool

MatchesID returns a bool based on if the input id matches the image's id TODO: This isn't used anywhere, so remove it

func (*Image) Mount

func (i *Image) Mount(options []string, mountLabel string) (string, error)

Mount mounts a image's filesystem on the host The path where the image has been mounted is returned

func (*Image) Mounted

func (i *Image) Mounted() (bool, string, error)

Mounted returns whether the image is mounted and the path it is mounted at (if it is mounted). If the image is not mounted, no error is returned, and the mountpoint will be set to "".

func (*Image) Names

func (i *Image) Names() []string

Names returns a string array of names associated with the image, which may be a mixture of tags and digests

func (*Image) NamesHistory

func (i *Image) NamesHistory() []string

NamesHistory returns a string array of names previously associated with the image, which may be a mixture of tags and digests

func (*Image) ParentID

func (i *Image) ParentID(ctx context.Context) (string, error)

ParentID returns the image ID of the parent. Return empty string if a parent is not found.

func (*Image) PushImageToHeuristicDestination

func (i *Image) PushImageToHeuristicDestination(ctx context.Context, destination, manifestMIMEType, authFile, digestFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions, additionalDockerArchiveTags []reference.NamedTagged) error

PushImageToHeuristicDestination pushes the given image to "destination", which is heuristically parsed. Use PushImageToReference if the destination is known precisely.

func (*Image) PushImageToReference

func (i *Image) PushImageToReference(ctx context.Context, dest types.ImageReference, manifestMIMEType, authFile, digestFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions, additionalDockerArchiveTags []reference.NamedTagged) error

PushImageToReference pushes the given image to a location described by the given path

func (*Image) PushManifest

func (i *Image) PushManifest(dest types.ImageReference, opts manifests.PushOptions) (digest.Digest, error)

PushManifest pushes a manifest to a destination

func (*Image) Remove

func (i *Image) Remove(ctx context.Context, force bool) error

Remove an image; container removal for the image must be done outside the context of images TODO: the force param does nothing as of now. Need to move container handling logic here eventually.

func (*Image) RemoveManifest

func (i *Image) RemoveManifest(d digest.Digest) (string, error)

RemoveManifest removes the given digest from the manifest list.

func (*Image) RepoDigests

func (i *Image) RepoDigests() ([]string, error)

RepoDigests returns a string array of repodigests associated with the image

func (*Image) RepoTags

func (i *Image) RepoTags() ([]string, error)

RepoTags returns a string array of repotags associated with the image

func (*Image) Save

func (i *Image) Save(ctx context.Context, source, format, output string, moreTags []string, quiet, compress, removeSignatures bool) error

Save writes a container image to the filesystem

func (*Image) Size

func (i *Image) Size(ctx context.Context) (*uint64, error)

Size returns the size of the image

func (*Image) StopSignal

func (i *Image) StopSignal(ctx context.Context) (string, error)

StopSignal returns the image's StopSignal

func (*Image) TagImage

func (i *Image) TagImage(tag string) error

TagImage adds a tag to the given image

func (*Image) ToImageRef

func (i *Image) ToImageRef(ctx context.Context) (types.Image, error)

ToImageRef returns an image reference type from an image TODO: Hopefully we can remove this exported function for mheon

func (*Image) TopLayer

func (i *Image) TopLayer() string

TopLayer returns the top layer id as a string

func (*Image) Unmount

func (i *Image) Unmount(force bool) error

Unmount unmounts a image's filesystem on the host

func (*Image) UntagImage

func (i *Image) UntagImage(tag string) error

UntagImage removes the specified tag from the image. If the tag does not exist, ErrNoSuchTag is returned.

func (*Image) User

func (i *Image) User(ctx context.Context) (string, error)

User returns the image's user

func (*Image) WorkingDir

func (i *Image) WorkingDir(ctx context.Context) (string, error)

WorkingDir returns the image's WorkingDir

type ImageDeleteResponse

type ImageDeleteResponse struct {
	Untagged []string `json:"untagged"`
	Deleted  string   `json:"deleted"`
}

ImageDeleteResponse is the response for removing an image from storage and containers what was untagged vs actually removed

type ImageFilter

type ImageFilter func(*Image) bool //nolint

ImageFilter is a function to determine whether a image is included in command output. Images to be outputted are tested using the function. A true return will include the image, a false return will exclude it.

type InfoImage

type InfoImage struct {
	// ID of image
	ID string
	// Tags of image
	Tags []string
	// Layers stores all layers of image.
	Layers []LayerInfo
}

InfoImage keep information of Image along with all associated layers

type LayerInfo

type LayerInfo struct {
	// Layer ID
	ID string
	// Parent ID of current layer.
	ParentID string
	// ChildID of current layer.
	// there can be multiple children in case of fork
	ChildID []string
	// RepoTag will have image repo names, if layer is top layer of image
	RepoTags []string
	// Size stores Uncompressed size of layer.
	Size int64
}

LayerInfo keeps information of single layer

type ManifestAddOpts

type ManifestAddOpts struct {
	All        bool              `json:"all"`
	Annotation map[string]string `json:"annotation"`
	Arch       string            `json:"arch"`
	Features   []string          `json:"features"`
	Images     []string          `json:"images"`
	OS         string            `json:"os"`
	OSVersion  string            `json:"os_version"`
	Variant    string            `json:"variant"`
}

Options for adding a manifest swagger:model ManifestAddOpts

type ManifestAnnotateOpts

type ManifestAnnotateOpts struct {
	Annotation map[string]string `json:"annotation"`
	Arch       string            `json:"arch"`
	Features   []string          `json:"features"`
	OS         string            `json:"os"`
	OSFeatures []string          `json:"os_feature"`
	OSVersion  string            `json:"os_version"`
	Variant    string            `json:"variant"`
}

ManifestAnnotateOptions defines the options for manifest annotate

type ResultFilter

type ResultFilter func(*Image) bool

ResultFilter is a mock function for image filtering

func CreatedAfterFilter

func CreatedAfterFilter(createTime time.Time) ResultFilter

CreatedAfterFilter allows you to filter on images created after the given time.Time

func CreatedBeforeFilter

func CreatedBeforeFilter(createTime time.Time) ResultFilter

CreatedBeforeFilter allows you to filter on images created before the given time.Time

func DanglingFilter

func DanglingFilter(danglingImages bool) ResultFilter

DanglingFilter allows you to filter images for dangling images

func IDFilter

func IDFilter(idFilter string) ResultFilter

IDFilter allows you to filter by image Id

func LabelFilter

func LabelFilter(ctx context.Context, labelfilter string) ResultFilter

LabelFilter allows you to filter by images labels key and/or value

func OutputImageFilter

func OutputImageFilter(userImage *Image) ResultFilter

OutputImageFilter allows you to filter by an a specific image name

func ReadOnlyFilter

func ReadOnlyFilter(readOnly bool) ResultFilter

ReadOnlyFilter allows you to filter images based on read/only and read/write

func ReferenceFilter

func ReferenceFilter(ctx context.Context, referenceFilter string) ResultFilter

ReferenceFilter allows you to filter by image name Replacing all '/' with '|' so that filepath.Match() can work '|' character is not valid in image name, so this is safe

type Runtime

type Runtime struct {
	SignaturePolicyPath string
	EventsLogFilePath   string
	EventsLogger        string
	Eventer             events.Eventer
	// contains filtered or unexported fields
}

Runtime contains the store

func NewImageRuntimeFromOptions

func NewImageRuntimeFromOptions(options storage.StoreOptions) (*Runtime, error)

NewImageRuntimeFromOptions creates an Image Runtime including the store given store options

func NewImageRuntimeFromStore

func NewImageRuntimeFromStore(store storage.Store) *Runtime

NewImageRuntimeFromStore creates an ImageRuntime based on a provided store

func (*Runtime) DiskUsage

func (ir *Runtime) DiskUsage(ctx context.Context, images []*Image) ([]DiskUsageStat, error)

DiskUsage returns disk-usage statistics for the specified slice of images.

func (*Runtime) GetImages

func (ir *Runtime) GetImages() ([]*Image, error)

GetImages retrieves all images present in storage

func (*Runtime) GetImagesWithFilters

func (ir *Runtime) GetImagesWithFilters(filters []string) ([]*Image, error)

GetImagesWithFilters gets images with a series of filters applied

func (*Runtime) GetPruneImages

func (ir *Runtime) GetPruneImages(ctx context.Context, all bool, filterFuncs []ImageFilter) ([]*Image, error)

GetPruneImages returns a slice of images that have no names/unused

func (*Runtime) GetRWImages

func (ir *Runtime) GetRWImages() ([]*Image, error)

GetRWImages retrieves all read/write images present in storage

func (*Runtime) ImageNames

func (ir *Runtime) ImageNames(id string) ([]string, error)

func (*Runtime) Import

func (ir *Runtime) Import(ctx context.Context, path, reference string, writer io.Writer, signingOptions SigningOptions, imageConfig ociv1.Image) (*Image, error)

Import imports and image into the store and returns an image

func (*Runtime) IntermediateFilter

func (ir *Runtime) IntermediateFilter(ctx context.Context, images []*Image) (ResultFilter, error)

IntermediateFilter returns filter for intermediate images (i.e., images with children and no tags).

func (*Runtime) LoadAllImagesFromDockerArchive

func (ir *Runtime) LoadAllImagesFromDockerArchive(ctx context.Context, fileName string, signaturePolicyPath string, writer io.Writer) ([]*Image, error)

LoadAllImagesFromDockerArchive loads all images from the docker archive that fileName points to.

func (*Runtime) LoadFromArchiveReference

func (ir *Runtime) LoadFromArchiveReference(ctx context.Context, srcRef types.ImageReference, signaturePolicyPath string, writer io.Writer) ([]*Image, error)

LoadFromArchiveReference creates a new image object for images pulled from a tar archive and the like (podman load) This function is needed because it is possible for a tar archive to have multiple tags for one image

func (*Runtime) New

func (ir *Runtime) New(ctx context.Context, name, signaturePolicyPath, authfile string, writer io.Writer, dockeroptions *DockerRegistryOptions, signingoptions SigningOptions, label *string, pullType util.PullType) (*Image, error)

New creates a new image object where the image could be local or remote

func (*Runtime) NewFromLocal

func (ir *Runtime) NewFromLocal(name string) (*Image, error)

NewFromLocal creates a new image object that is intended to only deal with local images already in the store (or its aliases)

func (*Runtime) PruneImages

func (ir *Runtime) PruneImages(ctx context.Context, all bool, filter []string) ([]*reports.PruneReport, error)

PruneImages prunes dangling and optionally all unused images from the local image store

func (*Runtime) SaveImages

func (ir *Runtime) SaveImages(ctx context.Context, namesOrIDs []string, format string, outputFile string, quiet, removeSignatures bool) (finalErr error)

SaveImages stores one more images in a multi-image archive. Note that only `docker-archive` supports storing multiple image.

func (*Runtime) Shutdown

func (ir *Runtime) Shutdown(force bool) error

Shutdown closes down the storage and require a bool arg as to whether it should do so forcibly.

type SearchFilter

type SearchFilter struct {
	// Stars describes the minimal amount of starts of an image.
	Stars int
	// IsAutomated decides if only images from automated builds are displayed.
	IsAutomated types.OptionalBool
	// IsOfficial decides if only official images are displayed.
	IsOfficial types.OptionalBool
}

SearchFilter allows filtering the results of SearchImages.

func ParseSearchFilter

func ParseSearchFilter(filter []string) (*SearchFilter, error)

ParseSearchFilter turns the filter into a SearchFilter that can be used for searching images.

type SearchOptions

type SearchOptions struct {
	// Filter allows to filter the results.
	Filter SearchFilter
	// Limit limits the number of queries per index (default: 25). Must be
	// greater than 0 to overwrite the default value.
	Limit int
	// NoTrunc avoids the output to be truncated.
	NoTrunc bool
	// Authfile is the path to the authentication file.
	Authfile string
	// InsecureSkipTLSVerify allows to skip TLS verification.
	InsecureSkipTLSVerify types.OptionalBool
	// ListTags returns the search result with available tags
	ListTags bool
}

SearchOptions are used to control the behaviour of SearchImages.

type SearchResult

type SearchResult struct {
	// Index is the image index (e.g., "docker.io" or "quay.io")
	Index string
	// Name is the canonical name of the image (e.g., "docker.io/library/alpine").
	Name string
	// Description of the image.
	Description string
	// Stars is the number of stars of the image.
	Stars int
	// Official indicates if it's an official image.
	Official string
	// Automated indicates if the image was created by an automated build.
	Automated string
	// Tag is the image tag
	Tag string
}

SearchResult is holding image-search related data.

func SearchImages

func SearchImages(term string, options SearchOptions) ([]SearchResult, error)

SearchImages searches images based on term and the specified SearchOptions in all registries.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL