utils

package
v0.0.0-...-57c2c9a Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *logrus.Logger

Functions

func GenerateJWT

func GenerateJWT(userID int, username string, secret string) (string, error)

func NewLogger

func NewLogger(production bool)

Types

type Claims

type Claims struct {
	UserID   int    `json:"user_id"`
	Username string `json:"username"`
	jwt.RegisteredClaims
}

func ValidateJWT

func ValidateJWT(tokenString string, secret string) (*Claims, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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