registry

package
v0.0.0-...-d5fe2e5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PullScope represents the permission to pull images from a specific
	// repository.
	PullScope = Scope(transport.PullScope)

	// PushScope represents the permission to push images to a specific
	// repository.
	PushScope = Scope(transport.PushScope)
)

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(resp *http.Response, codes ...int) error

CheckResponse validates that the response code is within the provided set of codes. If it is not, CheckResponse consumes the response body and returns a detailed error.

func GetClient

func GetClient(repo image.Repository, scope Scope) (http.Client, error)

GetClient returns an HTTP client that transparently authenticates API requests to the provided image repository with the provided scope. The returned client is safe for concurrent use by multiple goroutines, and may be shared with other callers.

Types

type Scope

type Scope string

Scope represents a permission on a particular image repository.

Jump to

Keyboard shortcuts

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