registry

package
v0.0.0-...-d5751bf Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 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 Config

type Config struct {
	Endpoint       string
	RegistryDomain string
	Proxy          string
	Insecure       bool
	Username       string
	Password       string
	RepoName       string
}

Config registry config struct

type Manifests

type Manifests struct {
	Config        manifestConfig  `json:"config,omitempty"`
	Layers        []manifestLayer `json:"layers,omitempty"`
	MediaType     string          `json:"mediaType,omitempty"`
	SchemaVersion int             `json:"schemaVersion,omitempty"`
}

Manifests is the image manifest struct

type Registry

type Registry struct {
	URL          *url.URL
	Host         string
	RegistryHost string

	Auth   auth
	Config Config
	// contains filtered or unexported fields
}

Registry registry object

func New

func New(rc Config) (*Registry, error)

New creates a new Registry object

func (*Registry) GetToken

func (reg *Registry) GetToken() error

GetToken retrives a docker registry API pull token

func (*Registry) RepoGetConfig

func (reg *Registry) RepoGetConfig(tempDir, reposName string, manifest *Manifests) (string, error)

RepoGetConfig gets docker image config JSON

func (*Registry) RepoGetLayers

func (reg *Registry) RepoGetLayers(tempDir, reposName string, manifest *Manifests) ([]string, error)

RepoGetLayers gets docker image layer tarballs

func (*Registry) ReposManifests

func (reg *Registry) ReposManifests(reposName, repoTag string) (*Manifests, error)

ReposManifests gets docker image manifest for name:tag

func (*Registry) ReposTags

func (reg *Registry) ReposTags(reposName string) (*Tags, error)

ReposTags gets a list of the docker image tags

func (*Registry) TokenExpired

func (reg *Registry) TokenExpired() bool

TokenExpired returns wheither or not an auth token has expired

type Tags

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

Tags is the image tags struct

Jump to

Keyboard shortcuts

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