Versions in this module Expand all Collapse all v2 v2.0.3 Mar 28, 2025 v2.0.2 Nov 14, 2024 v2.0.1 Nov 8, 2024 v2.0.0 Sep 27, 2023 Changes in this version + const StatusClientClosedRequest + const StatusClientClosedRequestText + func CopyHeaders(dst http.Header, src http.Header) + func CopyURL(i *url.URL) *url.URL + func DumpHTTPRequest(req *http.Request) string + func HasHeaders(names []string, headers http.Header) bool + func NopWriteCloser(w io.Writer) io.WriteCloser + func RemoveHeaders(headers http.Header, names ...string) + type BasicAuth struct + Password string + Username string + func ParseAuthHeader(header string) (*BasicAuth, error) + func (ba *BasicAuth) String() string + type BufferWriter struct + Code int + H http.Header + W io.WriteCloser + func NewBufferWriter(w io.WriteCloser, l Logger) *BufferWriter + func (b *BufferWriter) Close() error + func (b *BufferWriter) CloseNotify() <-chan bool + func (b *BufferWriter) Header() http.Header + func (b *BufferWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (b *BufferWriter) Write(buf []byte) (int, error) + func (b *BufferWriter) WriteHeader(code int) + type ErrorHandler interface + ServeHTTP func(w http.ResponseWriter, req *http.Request, err error) + var DefaultHandler ErrorHandler = &StdHandler{ ... } + type ErrorHandlerFunc func(http.ResponseWriter, *http.Request, error) + func (f ErrorHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request, err error) + type ExtractSource func(req *http.Request) + type ExtractorFunc func(req *http.Request) (token string, amount int64, err error) + func (f ExtractorFunc) Extract(req *http.Request) (string, int64, error) + type Logger interface + Debug func(msg string, args ...any) + Error func(msg string, args ...any) + Info func(msg string, args ...any) + Warn func(msg string, args ...any) + type NoopLogger struct + func (*NoopLogger) Debug(string, ...interface{}) + func (*NoopLogger) Error(string, ...interface{}) + func (*NoopLogger) Info(string, ...interface{}) + func (*NoopLogger) Warn(string, ...interface{}) + type ProxyWriter struct + func NewProxyWriter(w http.ResponseWriter) *ProxyWriter + func NewProxyWriterWithLogger(w http.ResponseWriter, l Logger) *ProxyWriter + func (p *ProxyWriter) CloseNotify() <-chan bool + func (p *ProxyWriter) Flush() + func (p *ProxyWriter) GetLength() int64 + func (p *ProxyWriter) Header() http.Header + func (p *ProxyWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (p *ProxyWriter) StatusCode() int + func (p *ProxyWriter) Write(buf []byte) (int, error) + func (p *ProxyWriter) WriteHeader(code int) + type SerializableHTTPRequest struct + ContentLength int64 + Form url.Values + Header http.Header + Host string + Method string + MultipartForm *multipart.Form + PostForm url.Values + Proto string + ProtoMajor int + ProtoMinor int + RemoteAddr string + RequestURI string + TLS *tls.ConnectionState + Trailer http.Header + TransferEncoding []string + URL *url.URL + func Clone(r *http.Request) *SerializableHTTPRequest + func (s *SerializableHTTPRequest) ToJSON() string + type SourceExtractor interface + Extract func(req *http.Request) (token string, amount int64, err error) + func NewExtractor(variable string) (SourceExtractor, error) + type StdHandler struct + func (e *StdHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request, err error) Other modules containing this package github.com/vulcand/oxy