registry

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: ISC Imports: 12 Imported by: 0

Documentation

Overview

Package registry provides functions to fetch the latest digest of an image.

Index

Constants

View Source
const ChallengeHeader = "WWW-Authenticate"

ChallengeHeader is the HTTP Header containing challenge instructions

View Source
const ContentDigestHeader = "Docker-Content-Digest"

ContentDigestHeader is the key for the key-value pair containing the digest header

Variables

This section is empty.

Functions

func BuildManifestURL

func BuildManifestURL(image string) (string, error)

BuildManifestURL from raw image data

func GetImageDigest

func GetImageDigest(image string) (string, error)

GetImageDigest returns the latest digest of an image.

func GetScopeFromImageName

func GetScopeFromImageName(image, svc string) string

GetScopeFromImageName normalizes an image name for use as scope during auth and head requests

func GetToken

func GetToken(image string) (string, error)

GetToken fetches a token for the registry hosting the provided image

func NormalizeRegistry

func NormalizeRegistry(registry string) (string, error)

NormalizeRegistry makes sure variations of DockerHubs registry

func Req

func Req(method, uri string, header http.Header) ([]byte, error)

Req retrieves the Req HTTP response for a given URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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