00f6b51228
Implemented email service infrastructure with SMTP support and optional email verification for self-hosted deployments. Registration flow now supports open/closed modes and hardcoded Apocapoc branding. Key features: - Email service with SMTP and template rendering - Optional email verification (auto-verified without SMTP config) - Registration modes: open/closed for access control - Hardcoded Apocapoc branding (AppName, AppURL, DefaultFrom) - Separate registration and login flows (registration no longer returns tokens)
16 lines
455 B
Go
16 lines
455 B
Go
package repositories
|
|
|
|
import (
|
|
"context"
|
|
|
|
"apocapoc-api/internal/domain/entities"
|
|
)
|
|
|
|
type UserRepository interface {
|
|
Create(ctx context.Context, user *entities.User) error
|
|
FindByID(ctx context.Context, id string) (*entities.User, error)
|
|
FindByEmail(ctx context.Context, email string) (*entities.User, error)
|
|
FindByVerificationToken(ctx context.Context, token string) (*entities.User, error)
|
|
Update(ctx context.Context, user *entities.User) error
|
|
}
|