Documentation ¶
Overview ¶
Package handlers provides the http functionality for the URL Shortener
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DoNotPrivateKeyChecking = false
DoNotPrivateKeyChecking is used for testing
Functions ¶
func Ginrus ¶
func Ginrus(logger loggerEntryWithFields, timeFormat string, utc bool, notlogged ...string) gin.HandlerFunc
Ginrus returns a gin.HandlerFunc (middleware) that logs requests using logrus.
Requests with errors are logged using logrus.Error(). Requests without errors are logged using logrus.Info().
It receives:
- A time package format string (e.g. time.RFC3339).
- A boolean stating whether to use UTC time zone or local.
- Optionally, a list of paths to skip logging for (this is why we are not using upstream github.com/gin-gonic/contrib/ginrus)
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler holds the funcs and attributes for the http communication
func (*Handler) CloseStore ¶
CloseStore stops the http server and the closes the db gracefully
Click to show internal directories.
Click to hide internal directories.