registry

package
v0.0.0-...-75d348f Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package registry implements a docker V2 registry and the OCI distribution specification.

It is designed to be used anywhere a low dependency container registry is needed, with an initial focus on tests.

Its goal is to be standards compliant and its strictness will increase over time.

This is currently a low flightmiles system. It's likely quite safe to use in tests; If you're using it in production, please let us know how and send us CL's for integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dig

func Dig(gw string, short bool, name string) (string, error)

Dig interrogates registry server. It performs CID lookups and shows the response.

func Get

func Get(url string) (resp *http.Response, err error)

Get issues a GET to the specified URL - a drop-in replacement for http.Get with timeouts.

func IpfsURL

func IpfsURL(gw string, s []string) string

IpfsURL constructs IPFS gateway URL

func IpfsifyHash

func IpfsifyHash(base32Hash string) string

IpfsifyHash does base32 to base58 conversion

func New

func New(config *Config, opts ...Option) http.Handler

New returns a handler which implements the docker registry protocol. It should be registered at the site root.

func ToB32

func ToB32(s string) string

ToB32 returns base32 encoded string if s is a valid cid

func ToB58

func ToB58(s string) string

ToB58 returns base58 encoded string if s is a valid cid

Types

type Config

type Config struct {
	Store string
}

Config is the config for the registry

type Option

type Option func(r *registry)

Option describes the available options for creating the registry.

func Logger

func Logger(l *log.Logger) Option

Logger overrides the logger used to record requests to the registry.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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