util

package
v0.0.0-...-c6fbc10 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Redis *redis.Client

Functions

func GenerateMailConfirmationToken

func GenerateMailConfirmationToken(user *model.User) (string, error)

func GenerateToken

func GenerateToken(userId string) (string, int, error)

func InitRedis

func InitRedis()

func ParseToken

func ParseToken(tokenString string) (*jwt.Token, error)

func SendRealCreateUserMail

func SendRealCreateUserMail(to string, token string) error

Types

type TokenClaims

type TokenClaims struct {
	UserId string `json:"user_id"`
	Exp    int64  `json:"exp"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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