services

package
v0.0.0-...-e796f14 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSendSMS   = errors.New("failed to send SMS")
	ErrSendEmail = errors.New("failed to send e-mail")
)

Functions

This section is empty.

Types

type JWTAuthenticator

type JWTAuthenticator struct {
	// contains filtered or unexported fields
}

func NewJWTAuthenticator

func NewJWTAuthenticator(jwtConfig *configs.JWTConfig) *JWTAuthenticator

func (*JWTAuthenticator) GenerateToken

func (j *JWTAuthenticator) GenerateToken(
	userId string,
	duration time.Duration,
) (*models.TokenDetails, error)

func (*JWTAuthenticator) ParseToken

func (j *JWTAuthenticator) ParseToken(token string) (*models.TokenDetails, error)

func (*JWTAuthenticator) SetJWTCookies

func (j *JWTAuthenticator) SetJWTCookies(resp *core_dtos.ResponseDto, tokens *models.TokenPairs)

type NotificationService

type NotificationService struct {
	// contains filtered or unexported fields
}

func NewNotificationService

func NewNotificationService(
	config *configs.OTPConfig,
	notifier *adapters.NotifierAdapter,
) *NotificationService

func (*NotificationService) GenerateAndSendEmailConfirm

func (ns *NotificationService) GenerateAndSendEmailConfirm(email string) (string, error)

func (*NotificationService) GenerateAndSendOTPSms

func (ns *NotificationService) GenerateAndSendOTPSms(phone string) (string, error)

func (*NotificationService) GenerateAndSendPhoneConfirm

func (ns *NotificationService) GenerateAndSendPhoneConfirm(phone string) (string, error)

Jump to

Keyboard shortcuts

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