Documentation ¶
Index ¶
- func Bytes(n int) []byte
- func ContextInjector(componentName string, handler http.Handler) http.Handler
- func NewRequestLogger(handler http.Handler) http.Handler
- func UUID() string
- type Handler
- type HandlerFunc
- type ResponseWriter
- func (r *ResponseWriter) CloseNotify() <-chan bool
- func (r *ResponseWriter) Context() context.Context
- func (r *ResponseWriter) Flush()
- func (r *ResponseWriter) Header() http.Header
- func (r *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (r *ResponseWriter) Status() int
- func (r *ResponseWriter) Write(b []byte) (int, error)
- func (r *ResponseWriter) WriteHeader(s int)
- func (r *ResponseWriter) Written() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextInjector ¶
ContextInjector .
Types ¶
type Handler ¶
Handler is an extended version of http.Handler that also takes a context argument ctx.
type HandlerFunc ¶
The HandlerFunc type is an adapter to allow the use of ordinary functions as Handlers. If f is a function with the appropriate signature, HandlerFunc(f) is a Handler object that calls f.
func (HandlerFunc) ServeHTTP ¶
func (f HandlerFunc) ServeHTTP(ctx context.Context, w http.ResponseWriter, r *http.Request)
ServeHTTP calls f(ctx, w, r).
type ResponseWriter ¶
type ResponseWriter struct {
// contains filtered or unexported fields
}
ResponseWriter .
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter, ctx context.Context) *ResponseWriter
NewResponseWriter .
func (*ResponseWriter) CloseNotify ¶
func (r *ResponseWriter) CloseNotify() <-chan bool
CloseNotify .
func (*ResponseWriter) Hijack ¶
func (r *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
Hijack .
Click to show internal directories.
Click to hide internal directories.