# Functions

BadRequest writes to the ResponseWriter a bad request error.
No description provided by the author
No description provided by the author
CreateSign returns signature for given u.
No description provided by the author
Delete returns a new route for this params for a DELETE request.
Error creates a ResponseError that also writes the error code to the response writer.
No description provided by the author
No description provided by the author
Get returns a new route for this params for a GET request.
GetLogger retrieves logger from request context.
HandleError logs the error then responds with generic 500 message.
No description provided by the author
MiddlewareChain returns a middleware composed of sequentially applied middlewares.
New returns new web instance that handle the given routes.
NewValidationError returns a new error response with 400 status code.
No description provided by the author
NewConflict returns a new error response with 409 status code.
No description provided by the author
NewForbidden returns a new error response with 403 status code.
No description provided by the author
No description provided by the author
NewNotFound returns a new error response with 404 status code.
NewRoute returns a new route for this params.
NewRouter returns a new router.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NotFound writes to the ResponseWriter a not found error.
No description provided by the author
Patch returns a new route for this params for a PATCH request.
No description provided by the author
Post
Post returns a new route for this params for a POST request.
No description provided by the author
Put returns a new route for this params for a PUT request.
No description provided by the author
SetLogger sets logger to request context.
SignURL adds signature to u using key.
TraceableRequestFunc returns a RequestFunc.
TracedTransport takes a http.RoundTripper and returns a transport wrapper that implements RoundTrip with added tracing.
TracingMiddleware returns a middleware that adds tracing information to a request.
UnsupportedMediaType writes to the ResponseWriter an unsupported media type error.
ValidSign validates signature of u using key.
WithAddr sets the listening address of the server.
No description provided by the author
WithDefaultHandler sets the default handler for the router.
WithPing can be used to disable the ping route by giving WithPing(false) as option to New().
WithPingPath sets the path of the ping endpoint.
WithPort overrides the default port used by New().
WithPrefix adds a matcher for the URL path prefix for a route.
WithTracer sets the tracer when creating a web server.
WriteJSON encodes given value to JSON and responds with <code>.

# Constants

Context keys.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Ping is the ping HandlerFunc.
SessionContextKey is the request context key where session is kept.

# Structs

No description provided by the author
ErrorResponse defines the response structure for all 4xx and 5xx errors.
Route object.
No description provided by the author
Web is a generic webserver.

# Interfaces

ResponseError defines an interface for HTTP error handling, using the custom format: { "messages": ["a message", "another message"], "errors": { "thing 1": ["value 1", "value 2"], "thing 2": ["value 3"] } }.
No description provided by the author
No description provided by the author

# Type aliases

ContextKey is a type alias for string to prevent key collisions across packages.
Middleware defines an HTTP middleware: a decorator that takes an HTTP handler and returns an HTTP handler.
Option is used to specify functional options when creating a new web server.
RequestFunc defines a function that receives a span and inserts it into the request context.
RouteOption is a functional option for creating routes.
Routes keeps all routes.