proxy

package
v0.0.0-...-0aae6f4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler structure

func NewHandler

func NewHandler(registry RegistryProvider, resFac ResponseFormatterFactory, requester Requester) *Handler

NewHandler create new handler

func (*Handler) ServeHTTP

func (p *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP to intercept

type RegistryProvider

type RegistryProvider interface {
	Get(username string) registry.Registry
}

RegistryProvider

type Requester

type Requester interface {
	Do(req *http.Request) (*http.Response, error)
}

type ResponseFormatterFactory

type ResponseFormatterFactory interface {
	Create(res http.ResponseWriter, req *http.Request) formatters.ResponseFormatter
}

ResponseFormatterFactory create a response format

Jump to

Keyboard shortcuts

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