Documentation ¶
Index ¶
- func Authorize(db *gorm.DB, inputRole ...models.RoleId) gin.HandlerFunc
- func CORS() gin.HandlerFunc
- func GetIdFromToken(c *gin.Context) (string, interface{})
- func GetUserClaims(c *gin.Context, db *gorm.DB, theValue string) (interface{}, error)
- func GzipWithExclusion(excludedPaths ...string) gin.HandlerFunc
- func Logger() gin.HandlerFunc
- func Metrics(cfg *config.Configuration) gin.HandlerFunc
- func RateLimiter() gin.HandlerFunc
- func Security() gin.HandlerFunc
- func Throttle() gin.HandlerFunc
- func TokenValid(bearerToken string) (*jwt.Token, error)
- type TokenDetailDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶
func CORS() gin.HandlerFunc
func GetIdFromToken ¶
func GetUserClaims ¶
func GzipWithExclusion ¶
func GzipWithExclusion(excludedPaths ...string) gin.HandlerFunc
GzipWithExclusion applies gzip compression conditionally based on the request path.
func Logger ¶
func Logger() gin.HandlerFunc
func Metrics ¶
func Metrics(cfg *config.Configuration) gin.HandlerFunc
func RateLimiter ¶
func RateLimiter() gin.HandlerFunc
func Throttle ¶
func Throttle() gin.HandlerFunc
Types ¶
type TokenDetailDTO ¶
type TokenDetailDTO struct { AccessUuid string `json:"access_uuid"` AccessToken string `json:"access_token"` ExpiresAt time.Time }
func CreateToken ¶
func CreateToken(user models.User) (*TokenDetailDTO, error)
Click to show internal directories.
Click to hide internal directories.