user

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package user defines the User entity: the identity that authenticates.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEmail = errors.New("user: invalid email address")

ErrInvalidEmail is returned when an email address cannot be parsed.

Functions

func NormalizeEmail

func NormalizeEmail(email string) (string, error)

NormalizeEmail trims and lowercases an email address and validates that it is a bare address (no display name). Normalization guarantees that lookups and uniqueness constraints behave consistently across store adapters.

Types

type User

type User struct {
	ID            string    `json:"id"`
	Email         string    `json:"email"`
	EmailVerified bool      `json:"email_verified"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

User represents a user identity. Plugins extend the model with their own stores keyed by User.ID instead of adding fields to the core entity.

Jump to

Keyboard shortcuts

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