Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶
func CORS() gin.HandlerFunc
func Gzip ¶
func Gzip() gin.HandlerFunc
func GzipWithConfig ¶
func GzipWithConfig(config CompressionConfig) gin.HandlerFunc
func Logger ¶
func Logger() gin.HandlerFunc
func TokenAuth ¶
func TokenAuth(config TokenAuthConfig) gin.HandlerFunc
TokenAuth creates a middleware for token authentication.
Types ¶
type CompressionConfig ¶
type CompressionConfig struct {
// Level is the compression level (1-9)
Level int
// ExcludedPaths are paths that should not be compressed
ExcludedPaths []string
// ExcludedExtensions are file extensions that should not be compressed
ExcludedExtensions []string
}
CompressionConfig contains configuration for the compression middleware
type TokenAuthConfig ¶
type TokenAuthConfig struct {
// Token is the authentication token.
Token string
}
TokenAuthConfig contains the configuration for token-based authentication.
Click to show internal directories.
Click to hide internal directories.