Documentation ¶
Index ¶
- Constants
- func CacheResourceImageStatus(resourceID string, status Status)
- func EvictImageStatus(resourceID string)
- func IsDanglingImage(image types.ImageInspect) bool
- func IsLocalImage(image types.ImageInspect) bool
- func IsNoTagImage(image types.ImageInspect) bool
- func ParseReference(imageStr string) (types.ImageReference, error)
- func ParseRepoDigest(repoDigest string) digest.Digest
- func ParseRepoDigests(repoDigests []string) []digest.Digest
- type DigestClient
- func (c *DigestClient) ContainerImageStatus(ctx context.Context, containerID string, endpoint *portainer.Endpoint, ...) (Status, error)
- func (c *DigestClient) ContainersImageStatus(ctx context.Context, containers []types.Container, ...) Status
- func (c *DigestClient) RemoteDigest(image Image) (digest.Digest, error)
- func (c *DigestClient) ServiceImageStatus(ctx context.Context, serviceID string, endpoint *portainer.Endpoint) (Status, error)
- type Image
- type ImageID
- type Options
- type ParseImageOptions
- type Puller
- type RegistryClient
- func (c *RegistryClient) CertainRegistryAuth(registry *portainer.Registry) (string, string, error)
- func (c *RegistryClient) EncodedCertainRegistryAuth(registry *portainer.Registry) (string, error)
- func (c *RegistryClient) EncodedRegistryAuth(image Image) (string, error)
- func (c *RegistryClient) RegistryAuth(image Image) (string, string, error)
- type Status
Constants ¶
const ( Processing = Status("processing") Outdated = Status("outdated") Updated = Status("updated") Skipped = Status("skipped") Preparing = Status("preparing") Error = Status("error") )
Status constants
Variables ¶
This section is empty.
Functions ¶
func EvictImageStatus ¶
func EvictImageStatus(resourceID string)
func IsDanglingImage ¶
func IsDanglingImage(image types.ImageInspect) bool
IsDanglingImage returns whether the given image is "dangling" which means that there are no repository references to the given image and it has no child images
func IsLocalImage ¶
func IsLocalImage(image types.ImageInspect) bool
IsLocalImage checks if the image has been built locally
func IsNoTagImage ¶
func IsNoTagImage(image types.ImageInspect) bool
IsNoTagImage returns whether the given image is damaged, has no tags
func ParseReference ¶
func ParseReference(imageStr string) (types.ImageReference, error)
func ParseRepoDigest ¶
func ParseRepoDigest(repoDigest string) digest.Digest
func ParseRepoDigests ¶
func ParseRepoDigests(repoDigests []string) []digest.Digest
Types ¶
type DigestClient ¶
type DigestClient struct {
// contains filtered or unexported fields
}
func NewClientWithRegistry ¶
func NewClientWithRegistry(registryClient *RegistryClient, clientFactory *dockerclient.ClientFactory) *DigestClient
func (*DigestClient) ContainerImageStatus ¶
func (*DigestClient) ContainersImageStatus ¶
func (*DigestClient) RemoteDigest ¶
func (c *DigestClient) RemoteDigest(image Image) (digest.Digest, error)
func (*DigestClient) ServiceImageStatus ¶
type Image ¶
type Image struct { // Domain is the registry host of this image Domain string // Path may include username like portainer/portainer-ee, no Tag or Digest Path string Tag string Digest digest.Digest HubLink string // contains filtered or unexported fields }
Image holds information about an image.
func ParseImage ¶
func ParseImage(parseOpts ParseImageOptions) (Image, error)
ParseImage returns an Image struct with all the values filled in for a given image.
func ParseLocalImage ¶
func ParseLocalImage(inspect types.ImageInspect) (*Image, error)
func ParseRepoTag ¶
func ParseRepoTags ¶
func (*Image) FullName ¶
FullName return the real full name may include Tag or Digest of the image, Tag first.
func (*Image) Reference ¶
Reference returns either the digest if it is non-empty or the tag for the image.
func (*Image) String ¶
String returns the string representation of an image, including Tag and Digest if existed.
func (*Image) WithDigest ¶
WithDigest sets the digest for an image.
type Options ¶
type Options struct { Auth imagetypes.DockerAuthConfig Timeout time.Duration }
Options holds docker registry object options
type ParseImageOptions ¶
ParseImageOptions holds image options for parsing.
type Puller ¶
type Puller struct {
// contains filtered or unexported fields
}
func NewPuller ¶
func NewPuller(client *client.Client, registryClient *RegistryClient, dataStore dataservices.DataStore) *Puller
type RegistryClient ¶
type RegistryClient struct {
// contains filtered or unexported fields
}
func NewRegistryClient ¶
func NewRegistryClient(dataStore dataservices.DataStore) *RegistryClient
func (*RegistryClient) CertainRegistryAuth ¶
func (*RegistryClient) EncodedCertainRegistryAuth ¶
func (c *RegistryClient) EncodedCertainRegistryAuth(registry *portainer.Registry) (string, error)
func (*RegistryClient) EncodedRegistryAuth ¶
func (c *RegistryClient) EncodedRegistryAuth(image Image) (string, error)
func (*RegistryClient) RegistryAuth ¶
func (c *RegistryClient) RegistryAuth(image Image) (string, string, error)
type Status ¶
type Status string
Status holds Docker image analysis