user

package
v0.0.0-...-932a008 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EmailMaxLength = 64

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(password models.Password) (models.PasswordHash, error)

func NewUser

func NewUser(email models.EmailAddress, password models.Password) (models.User, error)

NewUser validates a user's invariants and returns the User. It does not save the entity to storage. The caller must persist the new entity by calling its `Save()` method.

func ValidateEmail

func ValidateEmail(email models.EmailAddress) error

func ValidatePassword

func ValidatePassword(_ models.Password) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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