registry

package
v0.1.6-0...-089b30c Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 26 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 {
	DockerLocalRegistryHost string
	IPFSHost                string
	IPFSGateway             string
	IPFSClusterAPI          string
	Debug                   bool
}

Config is the config for the registry

type Registry

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

Registry is the registry structure

func NewRegistry

func NewRegistry(config *Config) *Registry

NewRegistry returns a new registry client instance

func (*Registry) Debugf

func (r *Registry) Debugf(str string, args ...interface{})

Debugf prints debug log

func (*Registry) DownloadImage

func (r *Registry) DownloadImage(ipfsHash string) (string, error)

DownloadImage downloads the Docker image from IPFS

func (*Registry) PinImage

func (r *Registry) PinImage(cidString string, name string)

PinImage pins a docker image in ipfs-cluster

func (*Registry) PullImage

func (r *Registry) PullImage(ipfsHash string) (string, error)

PullImage pulls the Docker image from IPFS

func (*Registry) PushImage

func (r *Registry) PushImage(reader io.Reader, imageID string) (string, error)

PushImage uploads the Docker image to IPFS

func (*Registry) PushImageByID

func (r *Registry) PushImageByID(imageID string) (string, error)

PushImageByID uploads Docker image by image ID, which is hash or repo tag, to IPFS

func (*Registry) TagToImageID

func (r *Registry) TagToImageID(imageID string) (string, error)

TagToImageID returns the image ID given a repo tag

Jump to

Keyboard shortcuts

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