core

package
v0.0.0-...-0ac623b Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPassword error = errors.New("invalid password")

Functions

func NewFuzzy

func NewFuzzy(db Repository, issuer JwtIssuer) *fuzzy

NewFuzzy is a constructor function for the fuzzy type

Types

type JwtIssuer

type JwtIssuer interface {
	Generate(*model.TokenInfo) *jwt.Token
	Sign(token *jwt.Token) (string, error)
	Validate(token string) (jwt.MapClaims, error)
}

type Repository

type Repository interface {
	Create(any) error
	GetUser(email string) (model.User, error)
}

type TokenInfo

type TokenInfo struct {
	Email      string
	UserID     int
	FirstName  string
	LastName   string
	Subject    string
	Expiration int
}

Jump to

Keyboard shortcuts

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