usecases

package
v2.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeUseCase

type ExchangeUseCase interface {
	Exchange(ctx context.Context, token string, ipAddress *string, userAgent *string) (*types.ExchangeResult, error)
}

type ExchangeUseCaseImpl

type ExchangeUseCaseImpl struct {
	GlobalConfig        *models.Config
	PluginConfig        *types.MagicLinkPluginConfig
	Logger              models.Logger
	UserService         rootservices.UserService
	AccountService      rootservices.AccountService
	SessionService      rootservices.SessionService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
}

func (*ExchangeUseCaseImpl) Exchange

func (uc *ExchangeUseCaseImpl) Exchange(
	ctx context.Context,
	token string,
	ipAddress *string,
	userAgent *string,
) (*types.ExchangeResult, error)

type SignInUseCase

type SignInUseCase interface {
	SignIn(ctx context.Context, name *string, email string, callbackURL *string) (*types.SignInResult, error)
}

type SignInUseCaseImpl

type SignInUseCaseImpl struct {
	GlobalConfig        *models.Config
	PluginConfig        *types.MagicLinkPluginConfig
	Logger              models.Logger
	UserService         rootservices.UserService
	AccountService      rootservices.AccountService
	TokenService        rootservices.TokenService
	VerificationService rootservices.VerificationService
	MailerService       rootservices.MailerService
}

func (*SignInUseCaseImpl) SignIn

func (uc *SignInUseCaseImpl) SignIn(
	ctx context.Context,
	name *string,
	email string,
	callbackURL *string,
) (*types.SignInResult, error)

type UseCases

type UseCases struct {
	SignInUseCase   SignInUseCase
	VerifyUseCase   VerifyUseCase
	ExchangeUseCase ExchangeUseCase
}

func NewUseCases

func NewUseCases(
	signInUseCase SignInUseCase,
	verifyUseCase VerifyUseCase,
	exchangeUseCase ExchangeUseCase,
) *UseCases

type VerifyUseCase

type VerifyUseCase interface {
	Verify(ctx context.Context, token string, ipAddress *string, userAgent *string) (string, error)
}

type VerifyUseCaseImpl

type VerifyUseCaseImpl struct {
	GlobalConfig        *models.Config
	PluginConfig        *types.MagicLinkPluginConfig
	Logger              models.Logger
	UserService         rootservices.UserService
	VerificationService rootservices.VerificationService
	TokenService        rootservices.TokenService
}

func (*VerifyUseCaseImpl) Verify

func (uc *VerifyUseCaseImpl) Verify(
	ctx context.Context,
	token string,
	ipAddress *string,
	userAgent *string,
) (string, error)

Jump to

Keyboard shortcuts

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