registryvendor

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package registryvendor is the catalog of container registry vendors the credential flow offers presets for: default host, fixed username where the vendor defines one, and how long its tokens live.

Index

Constants

View Source
const DockerHubRejected = "token rejected by Docker Hub"

DockerHubRejected is the health text stored when Docker Hub refuses a token.

View Source
const Generic = "generic"

Generic is the ID of the any-registry preset.

Variables

This section is empty.

Functions

func IsDockerHubHost

func IsDockerHubHost(host string) bool

IsDockerHubHost reports whether a registry host string names Docker Hub, with or without a scheme, port or path.

Types

type Vendor

type Vendor struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	// DefaultHost is pre-filled in the credential form. Empty when the
	// host is per tenant and HostHint says what shape it takes.
	DefaultHost string `json:"default_host,omitempty"`
	HostHint    string `json:"host_hint,omitempty"`
	// FixedUsername is a username the vendor requires, such as AWS for ECR.
	FixedUsername string `json:"fixed_username,omitempty"`
	// TokenLifetimeHours is non-zero when the vendor's password expires
	// and must be re-issued, so the credential gets an expiry reminder.
	TokenLifetimeHours int `json:"token_lifetime_hours,omitempty"`
	// Brand is the web BrandIcon key for the vendor logo.
	Brand string `json:"brand"`
	// TokenHint is the minimum token scope to ask the operator for.
	TokenHint string `json:"token_hint,omitempty"`
}

Vendor describes one container registry vendor preset.

func Find

func Find(id string) (Vendor, bool)

Find returns the preset with this ID.

func Vendors

func Vendors() []Vendor

Vendors returns the presets in display order.

Jump to

Keyboard shortcuts

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