Documentation
¶
Index ¶
- func GetMatchedRoutePath(r *http.Request) string
- func GetMeta(r *http.Request) map[string]string
- func GetMetaFromContext(ctx context.Context) map[string]string
- func GetRouteFromContext(ctx context.Context) string
- func Vars(r *http.Request) map[string]string
- func WithMatchedRoutePath(r *http.Request, path string) *http.Request
- func WithMeta(r *http.Request, meta map[string]string) *http.Request
- func WithVars(r *http.Request, params map[string]string) *http.Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMatchedRoutePath ¶ added in v1.13.0
GetMatchedRoutePath returns the matched route path pattern from the request context. For example, if the registered route is "/api/users/:id" and the request is "GET /api/users/123", this returns "/api/users/:id".
func GetMetaFromContext ¶ added in v1.13.3
GetMetaFromContext returns the route meta from the context.
func GetRouteFromContext ¶ added in v1.13.1
GetRouteFromContext returns the matched route path pattern from the context.
func WithMatchedRoutePath ¶ added in v1.13.0
WithMatchedRoutePath writes the matched route path pattern into the request context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.