gateway

package
v0.13.0-alpha.34 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

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

func NewGateway

func NewGateway(opts ...Option) (*Gateway, error)

func (*Gateway) ServeHTTP

func (c *Gateway) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ImageInfo

type ImageInfo struct {
	Host string
	Name string
}

type Option

type Option func(c *Gateway)

func WithAuthenticator

func WithAuthenticator(authenticator *token.Authenticator) Option

func WithCache

func WithCache(cache *cache.Cache) Option

func WithClient

func WithClient(client *http.Client) Option

func WithDefaultRegistry

func WithDefaultRegistry(target string) Option

func WithDisableTagsList

func WithDisableTagsList(b bool) Option

func WithDomainAlias

func WithDomainAlias(domainAlias map[string]string) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithManifestCacheDuration

func WithManifestCacheDuration(d time.Duration) Option

func WithOverrideDefaultRegistry

func WithOverrideDefaultRegistry(overrideDefaultRegistry map[string]string) Option

func WithPathInfoModifyFunc

func WithPathInfoModifyFunc(modify func(info *ImageInfo) *ImageInfo) Option

type PathInfo

type PathInfo struct {
	Host  string
	Image string

	TagsList  bool
	Manifests string
	Blobs     string
}

func (PathInfo) Path

func (p PathInfo) Path() (string, error)

Jump to

Keyboard shortcuts

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