usecases

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePasswordUseCase

type ChangePasswordUseCase struct {
	Logger              models.Logger
	PluginConfig        types.EmailPasswordPluginConfig
	UserService         rootservices.UserService
	AccountService      rootservices.AccountService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
	PasswordService     rootservices.PasswordService
	MailerService       rootservices.MailerService
	EventBus            models.EventBus
}

func (*ChangePasswordUseCase) ChangePassword

func (uc *ChangePasswordUseCase) ChangePassword(
	ctx context.Context,
	tokenValue string,
	newPassword string,
) error

type RequestEmailChangeUseCase

type RequestEmailChangeUseCase struct {
	Logger              models.Logger
	GlobalConfig        *models.Config
	PluginConfig        types.EmailPasswordPluginConfig
	UserService         rootservices.UserService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
	MailerService       rootservices.MailerService
}

func (*RequestEmailChangeUseCase) RequestChange

func (uc *RequestEmailChangeUseCase) RequestChange(
	ctx context.Context,
	userID string,
	newEmail string,
	callbackURL *string,
) error

type RequestPasswordResetUseCase

type RequestPasswordResetUseCase struct {
	Logger              models.Logger
	GlobalConfig        *models.Config
	PluginConfig        types.EmailPasswordPluginConfig
	UserService         rootservices.UserService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
	MailerService       rootservices.MailerService
}

func (*RequestPasswordResetUseCase) RequestReset

func (uc *RequestPasswordResetUseCase) RequestReset(
	ctx context.Context,
	email string,
	callbackURL *string,
) error

type SendEmailVerificationUseCase

type SendEmailVerificationUseCase struct {
	GlobalConfig        *models.Config
	PluginConfig        types.EmailPasswordPluginConfig
	Logger              models.Logger
	UserService         rootservices.UserService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
	MailerService       rootservices.MailerService
}

func (*SendEmailVerificationUseCase) Send

func (uc *SendEmailVerificationUseCase) Send(ctx context.Context, email string, callbackURL *string) error

type SignInUseCase

type SignInUseCase struct {
	GlobalConfig    *models.Config
	PluginConfig    types.EmailPasswordPluginConfig
	Logger          models.Logger
	UserService     rootservices.UserService
	AccountService  rootservices.AccountService
	SessionService  rootservices.SessionService
	TokenService    rootservices.TokenService
	PasswordService rootservices.PasswordService
	EventBus        models.EventBus
}

func (*SignInUseCase) GetSessionByID

func (uc *SignInUseCase) GetSessionByID(ctx context.Context, sessionID string) (*models.Session, error)

func (*SignInUseCase) GetUserByID

func (uc *SignInUseCase) GetUserByID(ctx context.Context, userID string) (*models.User, error)

func (*SignInUseCase) SignIn

func (uc *SignInUseCase) SignIn(
	ctx context.Context,
	email string,
	password string,
	callbackURL *string,
	ipAddress *string,
	userAgent *string,
) (*types.SignInResult, error)

type SignUpUseCase

type SignUpUseCase struct {
	GlobalConfig    *models.Config
	PluginConfig    types.EmailPasswordPluginConfig
	Logger          models.Logger
	UserService     rootservices.UserService
	AccountService  rootservices.AccountService
	SessionService  rootservices.SessionService
	TokenService    rootservices.TokenService
	PasswordService rootservices.PasswordService
	EventBus        models.EventBus
}

func (*SignUpUseCase) SignUp

func (uc *SignUpUseCase) SignUp(
	ctx context.Context,
	name string,
	email string,
	password string,
	image *string,
	callbackURL *string,
	ipAddress *string,
	userAgent *string,
) (*types.SignUpResult, error)

type UseCases

type UseCases struct {
	SignUpUseCase                *SignUpUseCase
	SignInUseCase                *SignInUseCase
	VerifyEmailUseCase           *VerifyEmailUseCase
	SendEmailVerificationUseCase *SendEmailVerificationUseCase
	RequestPasswordResetUseCase  *RequestPasswordResetUseCase
	ChangePasswordUseCase        *ChangePasswordUseCase
	RequestEmailChangeUseCase    *RequestEmailChangeUseCase
}

type VerifyEmailUseCase

type VerifyEmailUseCase struct {
	PluginConfig        types.EmailPasswordPluginConfig
	Logger              models.Logger
	UserService         rootservices.UserService
	AccountService      rootservices.AccountService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
	MailerService       rootservices.MailerService
	EventBus            models.EventBus
}

func (*VerifyEmailUseCase) VerifyEmail

func (uc *VerifyEmailUseCase) VerifyEmail(ctx context.Context, tokenStr string) (models.VerificationType, error)

Jump to

Keyboard shortcuts

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