docker

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRegistry = errors.New("no registry for repo")

Functions

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

func Routes

func Routes(r chi.Router)

func SetupRegistries added in v1.3.0

func SetupRegistries() error

Types

type AuthMethod added in v1.3.0

type AuthMethod uint8
const (
	AuthNone AuthMethod = iota
	AuthToken
	AuthApp
)

type DescriptionValues

type DescriptionValues struct {
	Repo string
	Tag  string
}

type DockerHub

type DockerHub struct{}

func (DockerHub) ApiUrl

func (d DockerHub) ApiUrl() string

func (DockerHub) GetOwner

func (d DockerHub) GetOwner(repo string) string

func (DockerHub) GetRepoUrl

func (d DockerHub) GetRepoUrl(repo string) string

func (DockerHub) GetTagUrl

func (d DockerHub) GetTagUrl(repo, tag string) string

func (DockerHub) Names added in v1.3.0

func (d DockerHub) Names() []string

func (DockerHub) NormalizeRepo

func (d DockerHub) NormalizeRepo(repo string) string

func (DockerHub) TokenUrl

func (d DockerHub) TokenUrl(repo string) string

func (DockerHub) Transport

func (d DockerHub) Transport(_ context.Context, repo string) (http.RoundTripper, error)

type Ghcr

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

func NewGhcr added in v1.3.0

func NewGhcr() (*Ghcr, error)

func (Ghcr) ApiUrl

func (g Ghcr) ApiUrl() string

func (Ghcr) GetOwner

func (g Ghcr) GetOwner(repo string) string

func (Ghcr) GetRepoUrl

func (g Ghcr) GetRepoUrl(repo string) string

func (Ghcr) GetTagUrl

func (g Ghcr) GetTagUrl(repo, tag string) string

func (Ghcr) Names added in v1.3.0

func (g Ghcr) Names() []string

func (Ghcr) NormalizeRepo

func (g Ghcr) NormalizeRepo(repo string) string

func (*Ghcr) RefreshAppToken added in v1.3.0

func (g *Ghcr) RefreshAppToken(ctx context.Context) error

func (Ghcr) TokenUrl

func (g Ghcr) TokenUrl(repo string) string

func (Ghcr) Transport

func (g Ghcr) Transport(ctx context.Context, repo string) (http.RoundTripper, error)

type Registry

type Registry interface {
	Names() []string

	ApiUrl() string
	TokenUrl(repo string) string

	Transport(ctx context.Context, repo string) (http.RoundTripper, error)

	NormalizeRepo(repo string) string
	GetRepoUrl(repo string) string
	GetTagUrl(repo, tag string) string
	GetOwner(repo string) string
}

func FindRegistry

func FindRegistry(repo string) (Registry, error)

Jump to

Keyboard shortcuts

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