utils

package
v0.0.0-...-6cb8ef5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWT

func CreateJWT(claims Claims, secretKey string) (string, error)

func EncryptPassword

func EncryptPassword(password string) ([]byte, error)

Types

type Claims

type Claims struct {
	Name      string    `json:"name"`
	Uuid      uuid.UUID `json:"uuid"`
	ExpiresAt time.Time `json:"expires_at"`
}

func GenerateClaimToken

func GenerateClaimToken(name string) Claims

func (Claims) Valid

func (c Claims) Valid() error

Jump to

Keyboard shortcuts

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