verification

package
v0.0.0-...-af438c1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailVerification

type EmailVerification struct {
	types.Model
	UserId  uint64 `gorm:"column:user_id"`
	Token   string `gorm:"column:token"`
	Secret  string `gorm:"secret"`
	IsValid bool   `gorm:"column:isvalid"`
}

type Service

type Service struct {
	DB *gorm.DB
}

func NewService

func NewService(db *gorm.DB) *Service

func (*Service) GenerateVerification

func (s *Service) GenerateVerification(user user.User) (error, string, string)

return the token and hashed secret to the calling function

func (*Service) GetTokenInfo

func (s *Service) GetTokenInfo(token string) EmailVerification

func (*Service) RequestVerification

func (s *Service) RequestVerification(user user.User, token EmailVerification, hash string) (error, bool)

Jump to

Keyboard shortcuts

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