registry

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ACCEPT_HEADER = "application/vnd.docker.distribution.manifest.v2+json"
View Source
const ACCEPT_HEADER_V1 = "application/vnd.docker.distribution.manifest.v1+json"
View Source
const CREDENTIALS_FILE = ".credentials"

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageManifest

type ImageManifest struct {
	SchemaVersion int64       `json:"schemaVersion"`
	MediaType     string      `json:"mediaType"`
	Config        LayerInfo   `json:"config"`
	Layers        []LayerInfo `json:"layers"`
}

type ImageManifestV1

type ImageManifestV1 struct {
	SchemaVersion int64  `json:"schemaVersion"`
	Name          string `json:"name"`
	Tag           string `json:"tag"`
	Architecture  string `json:"architecture"`
	Created       string
	Date          time.Time
}

type ImageTags

type ImageTags struct {
	Name string   `json:"name"`
	Tags []string `json:"tags"`
}

type LayerInfo

type LayerInfo struct {
	MediaType string `json:"mediaType"`
	Size      int64  `json:"size"`
	Digest    string `json:"digest"`
}

type Registry

type Registry struct {
	Host       string `toml:"nexus_host"`
	Username   string `toml:"nexus_username"`
	Password   string `toml:"nexus_password"`
	Repository string `toml:"nexus_repository"`
}

func NewRegistry

func NewRegistry() (Registry, error)

func (Registry) DeleteImageByTag

func (r Registry) DeleteImageByTag(image string, tag string) error

func (Registry) ImageManifest

func (r Registry) ImageManifest(image string, tag string) (ImageManifest, error)

func (Registry) ImageManifestV1

func (r Registry) ImageManifestV1(image string, tag string) (ImageManifestV1, error)

func (Registry) ListImages

func (r Registry) ListImages() ([]string, error)

func (Registry) ListTagsByImage

func (r Registry) ListTagsByImage(image string) ([]string, error)

type Repositories

type Repositories struct {
	Images []string `json:"repositories"`
}

Jump to

Keyboard shortcuts

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