Documentation ¶
Index ¶
- func AddURLGenerator(router *mux.Router) func(http.Handler) http.Handler
- func DebugRequest(next http.Handler) http.Handler
- func UniqueID(next http.Handler) http.Handler
- func UniqueIDFromContext(ctx context.Context) string
- type RouterDebug
- type RouterURLGenerator
- type Service
- type URLGenerator
- type URLSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddURLGenerator ¶
AddURLGenerator is a middleware that adds an URLGenerator in the Request Context
func DebugRequest ¶
DebugRequest logs request start, status to its associated logger, if any
func UniqueID ¶
UniqueID adds a unique ID to the Request Context, ResponseWriter and any associated Logger
func UniqueIDFromContext ¶
UniqueIDFromContext retrieves the uniqueID from the Context
Types ¶
type RouterDebug ¶
func (*RouterDebug) ServeHTTP ¶
func (d *RouterDebug) ServeHTTP(w http.ResponseWriter, _ *http.Request)
type RouterURLGenerator ¶
type RouterURLGenerator struct {
// contains filtered or unexported fields
}
RouterURLGenerator implements URLGenerator using a mux.Router
type URLGenerator ¶
URLGenerator generates a fully-fledged URL from the URLSpec
func URLGeneratorFromContext ¶
func URLGeneratorFromContext(ctx context.Context) URLGenerator
URLGeneratorFromContext extracts the URLGenerator from the context
Click to show internal directories.
Click to hide internal directories.