auth

package
v1.0.0-with-auth Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignInGateway

type SignInGateway interface {
	GetUser(ctx context.Context, email string) (*domain.User, error)
}

type SignInUseCase

type SignInUseCase interface {
	Execute(ctx context.Context, user domain.User) (accessToken, refreshToken *string, err error)
}

func NewSignInUseCase

func NewSignInUseCase(
	l logger.Logger,
	passwd bcrypt.Password,
	jwt jwt.JWTAuth,
	gw SignInGateway,
) SignInUseCase

type SignUpGateway

type SignUpGateway interface {
	UserExists(ctx context.Context, email string) (*bool, error)
	SaveUser(ctx context.Context, user domain.User) error
}

type SignUpUseCase

type SignUpUseCase interface {
	Execute(ctx context.Context, user domain.User) error
}

func NewSignUpUseCase

func NewSignUpUseCase(
	l logger.Logger,
	bcryptPass bcrypt.Password,
	gw SignUpGateway,
) SignUpUseCase

Jump to

Keyboard shortcuts

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