Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VersionRegex = regexp.MustCompile(`^/v\d\.\d+\b`) ErrForbidden = errors.New("error: access to resource denied") )
Functions ¶
func JsonHandler ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, msg string, code int)
Types ¶
type Interceptor ¶
type Interceptor interface {
Intercept(l Logger, req *http.Request, upstream http.Handler) http.Handler
}
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 ¶
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
}
Logger is a subset of log.Logger used in a Proxy request
Click to show internal directories.
Click to hide internal directories.