registry

package
v4.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SortTagDefault         = SortTag("default")
	SortTagReverse         = SortTag("reverse")
	SortTagLexicographical = SortTag("lexicographical")
	SortTagSemver          = SortTag("semver")
)

SortTag constants

Variables

SortTagTypes is the list of available sort tag types

Functions

func ImageReference added in v4.26.0

func ImageReference(name string) (types.ImageReference, error)

func SortTags added in v4.22.0

func SortTags(tags []string, sortTag SortTag) []string

SortTags sorts tags list

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an active docker registry object

func New

func New(opts Options) (*Client, error)

New creates new docker registry client instance

func (*Client) Manifest

func (c *Client) Manifest(image Image, dbManifest Manifest) (Manifest, bool, error)

Manifest returns the manifest for a specific image

func (*Client) Tags

func (c *Client) Tags(opts TagsOptions) (*Tags, error)

Tags returns tags of a Docker repository

type Image

type Image struct {
	Domain  string
	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 (Image) Name

func (i Image) Name() string

Name returns the full name representation of an image.

func (Image) Reference

func (i Image) Reference() string

Reference returns either the digest if it is non-empty or the tag for the image.

func (Image) String

func (i Image) String() string

String returns the string representation of an image.

type Manifest

type Manifest struct {
	Name          string
	Tag           string
	MIMEType      string
	Digest        digest.Digest
	Created       *time.Time
	DockerVersion string
	Labels        map[string]string
	Layers        []string
	Platform      string
	Raw           []byte
}

Manifest is the Docker image manifest information

type Options

type Options struct {
	Auth          types.DockerAuthConfig
	InsecureTLS   bool
	Timeout       time.Duration
	UserAgent     string
	CompareDigest bool
	ImageOs       string
	ImageArch     string
	ImageVariant  string
}

Options holds docker registry object options

type ParseImageOptions

type ParseImageOptions struct {
	Name   string
	HubTpl string
}

ParseImageOptions holds image options for parsing.

type SortTag added in v4.22.0

type SortTag string

SortTag holds sort tag type

func (*SortTag) OneOf added in v4.22.0

func (st *SortTag) OneOf(stl []SortTag) bool

OneOf checks if sort type is one of the values in the list

func (*SortTag) Valid added in v4.22.0

func (st *SortTag) Valid() bool

Valid checks sort tag type is valid

type Tags

type Tags struct {
	List        []string
	NotIncluded int
	Excluded    int
	Total       int
}

Tags holds information about image tags.

type TagsOptions

type TagsOptions struct {
	Image   Image
	Max     int
	Sort    SortTag
	Include []string
	Exclude []string
}

TagsOptions holds docker tags image options

Jump to

Keyboard shortcuts

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