Documentation ¶
Index ¶
- Variables
- func DialTimeout(addr string, timeout time.Duration) (*smtp.Client, error)
- func GenerateToken(mapClaims jwt.Claims) (string, error)
- func HashPassword(password string) (string, error)
- func ValidateFormat(email string) error
- func ValidateHost(email string) error
- func ValidatePassword(hashedPassword, password string) bool
- func ValidateToken(tokenString string) (jwt.MapClaims, error)
- type Configuration
- type Credential
- type Database
- type JWT
- type SmtpError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadFormat = fmt.Errorf("invalid format") ErrUnresolvableHost = fmt.Errorf("unresolvable host") )
View Source
var DB *gorm.DB
Functions ¶
func GenerateToken ¶
func HashPassword ¶
func ValidateFormat ¶
func ValidateHost ¶
func ValidatePassword ¶
func ValidateToken ¶
Types ¶
type Configuration ¶
type Configuration struct { DB *Database Credential *Credential JWT *JWT Port, Mode string }
var Config *Configuration
type Credential ¶
type Credential struct { Username, Email, Password string }
Click to show internal directories.
Click to hide internal directories.