docker

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DockerBase   = flag.String("docker-url", "https://docker.myorg.net", "when there is only one (legacy option)")
	DockerURLs   = flag.String("docker-urls", "https://harbor.myorg.net,https://ghcr.myorg.net", "csv of docker server base URLs")
	DockerScheme = flag.String("docker-auth-scheme", "https", "(only for testing)")

	GHPHost = flag.String("ghp-hosts", "ghp.myorg.net", "CSV of github packages domains")
)
View Source
var Debug *bool

Debug flag reference (set by main package)

Handler function (set by main package)

View Source
var LogRoundtrip func(*http.Response)

LogRoundtrip function (set by main package)

Functions

func GetServers

func GetServers() map[string]*Server

GetServers returns the map of docker servers

func SetGHPHosts

func SetGHPHosts(hosts map[string]bool)

SetGHPHosts sets the GitHub packages hosts

func Setup

func Setup(urls ...string) error

Types

type ClaimSet

type ClaimSet struct {
	Access []struct {
		Type    string   `json:"type"`
		Name    string   `json:"name"`
		Actions []string `json:"actions"`
	} `json:"access"`
	Context struct {
		EntityKind       string `json:"entity_kind"`
		Kind             string `json:"kind"`
		Version          int    `json:"version"`
		ComApostilleRoot string `json:"com.apostille.root"`
		User             string `json:"user"`
		EntityReference  string `json:"entity_reference"`
	} `json:"context"`
	Aud string `json:"aud"`
	Exp int    `json:"exp"`
	Iss string `json:"iss"`
	Iat int    `json:"iat"`
	Nbf int    `json:"nbf"`
	Sub string `json:"sub"`
}

https://docs.docker.com/registry/spec/auth/jwt/

{
	"context": {
	  "com.apostille.root": "$disabled"
	},
	"aud": "docker.colofoo.net",
	"exp": 1593910505,
	"iss": "quay",
	"iat": 1593906905,
	"nbf": 1593906905,
	"sub": "(anonymous)"
}

{
	"access": [
	  {
		"type": "repository",
		"name": "presbrey/beyond",
		"actions": [
		  "pull"
		]
	  }
	],
	"context": {
	  "entity_kind": "appspecifictoken",
	  "kind": "user",
	  "version": 2,
	  "com.apostille.root": "$disabled",
	  "user": "joe",
	  "entity_reference": "4ac6f0e7-7bd2-4aea-9a77-738e1b98f22f"
	},
	"aud": null,
	"exp": 1593911101,
	"iss": "quay",
	"iat": 1593907501,
	"nbf": 1593907501,
	"sub": "joe"
}

type Server

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

func (*Server) ModifyResponse

func (ds *Server) ModifyResponse(resp *http.Response) error

func (*Server) RegisterHandlers

func (ds *Server) RegisterHandlers(mux *http.ServeMux)

func (*Server) ServeHTTP

func (ds *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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