utils

package
v0.0.0-...-5565804 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHash

func GenerateHash(content string, length int8) (string, error)

func GenerateToken

func GenerateToken(user *models.User) (string, error)

* GenerateToken generates a JWT token for the user

func SetupDBConnection

func SetupDBConnection(dsn string) (*sql.DB, *bun.DB)

func VerifyToken

func VerifyToken(tokenString string) (string, error)

* VerifyToken verifies the token and returns the email of the user

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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