Documentation ¶
Overview ¶
Package ginhelper provides some common functionality across gin servers.
Index ¶
Constants ¶
View Source
const HealthCheck string = "/health-check"
HealthCheck is the health check endpoint.
View Source
const MetricsEndpoint string = "/metrics"
MetricsEndpoint is used for prometheus metrics. Deprecated: use METRICS_PATH instead.
View Source
const RequestIDHeader = "X-Request-ID"
RequestIDHeader is used for tracking request ids.
View Source
const RobotsTxt string = "/robots.txt"
RobotsTxt is used for apis to disallow crawls.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new gin server with some sensible defaults. these include: - helmet-default handlers - request-ids (used for stack tracing) - cors (used for requests from the frontend) - health-checks - restrictive robots.txt.
func NewWithExperimentalLogger ¶ added in v0.1.12
NewWithExperimentalLogger creates a new gin server with some sensible defaults. See New for more information.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.