Documentation ¶
Overview ¶
Package proxy implements an intercepting proxy
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // VersionRegex matches a version of the form v123.456 VersionRegex = regexp.MustCompile(`^/v\d\.\d+\b`) // ErrForbidden is returned for forbidden resources ErrForbidden = errors.New("error: access to resource denied") )
Functions ¶
func JSONHandler ¶
JSONHandler implements a JSON response handler
func WriteError ¶
func WriteError(w http.ResponseWriter, msg string, code int)
Types ¶
type Interceptor ¶
Interceptor returns an http.Handler that either passes through to an upstream handler or imposes some logic of it's own on the request.
type InterceptorFunc ¶
Click to show internal directories.
Click to hide internal directories.