package
0.0.0-20250114092647-a3d21043d0f0
Repository: https://github.com/golangtroshin/shorturl.git
Documentation: pkg.go.dev
# Functions
CheckAuthToken is middleware that validates the presence of an authentication token.
GiveAuthTokenToUser is middleware that assigns an authentication token to the user if not already set.
GzipMiddleware compresses HTTP responses and decompresses HTTP requests if gzip is supported and enabled by the client.
IPTrustedMiddleware is a middleware that restricts access to handlers based on the client's IP address.
# Constants
CookieAuthToken is the name of the cookie used for user authentication.
UserIDKey is the key used to store the user ID in the request context.
# Type aliases
ContextKey defines a custom type for keys in the context to avoid collisions.