Documentation ¶
Index ¶
- func ChiRouteName(r *http.Request) string
- func MethodAndPathCleanID(r *http.Request) string
- func PathWithCleanID(r *http.Request) string
- func WithCORS(allowedOrigins, allowedMethods, allowedHeaders []string, allowCredentials bool) server.Option
- func WithCORSWideOpen() server.Option
- func WithLogging(app string) server.Option
- func WithMetrics(app string, opNameFunc func(r *http.Request) string) server.Option
- func WithRecovery(writer io.Writer, printStack bool) server.Option
- func WithTracing(app string, tags map[string]string, opNameFunc func(r *http.Request) string) server.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChiRouteName ¶
ChiRouteName replace route parameters from the Chi route mux with "*"
func MethodAndPathCleanID ¶
MethodAndPathCleanID replace string values that look like ids (uuids and int) with "*"
func PathWithCleanID ¶
PathWithCleanID replace string values that look like ids (uuids and int) with "*"
func WithCORS ¶
func WithCORS(allowedOrigins, allowedMethods, allowedHeaders []string, allowCredentials bool) server.Option
WithCORS configures CORS on the webserver
func WithCORSWideOpen ¶
WithCORSWideOpen allows requests from all origins with all methods and all headers/cookies/credentials allowed.
func WithLogging ¶
WithLogging configures a logrus middleware for that server
func WithMetrics ¶
WithMetrics configures metrics collection
func WithRecovery ¶
WithRecovery configures panic recovery for that server
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.