ginhelper

package
v0.0.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 13 Imported by: 19

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 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

func New(logger *log.ZapEventLogger) *gin.Engine

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL