Documentation ¶
Index ¶
- func Endpoints(e func(EndpointsBuilder)) func(http.Handler) http.Handler
- func GetRequestID(ctx context.Context) string
- func Logging(next http.Handler) http.Handler
- func NewFiles(prefix string, filePath string) func(http.Handler) http.Handler
- func NextRequestID() uint64
- func ProxyHeaders(next http.Handler) http.Handler
- func RequestID(next http.Handler) http.Handler
- func RouteParam(r *http.Request, key string) string
- func Spa(filePath string) func(http.Handler) http.Handler
- func Time(next http.Handler) http.Handler
- type EndpointsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestID ¶
GetRequestID returns the ID set by the RequestID middleware
func ProxyHeaders ¶
ProxyHeaders parses proxy headers such as X-Forward-For and X-Forward-Proto
Types ¶
type EndpointsBuilder ¶
type EndpointsBuilder interface { Get(url string, handler http.HandlerFunc) Post(url string, handler http.HandlerFunc) Put(url string, handler http.HandlerFunc) Delete(url string, handler http.HandlerFunc) Method(method string, url string, handler http.HandlerFunc) }
Click to show internal directories.
Click to hide internal directories.