registry

package
v4.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) (Manifest, 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.

func (*Image) WithDigest

func (i *Image) WithDigest(digest digest.Digest) (err error)

WithDigest sets the digest for 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 `json:"-"`
}

Manifest is the Docker image manifest information

type Options

type Options struct {
	Username     string
	Password     string
	InsecureTLS  bool
	Timeout      time.Duration
	UserAgent    string
	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 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
	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