Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrInvalidPinCode ¶
func (ErrInvalidPinCode) Error ¶
func (err ErrInvalidPinCode) Error() string
type ErrOTPNotFoundOrExpired ¶
type ErrOTPNotFoundOrExpired struct {
UUID string
}
func (ErrOTPNotFoundOrExpired) Error ¶
func (err ErrOTPNotFoundOrExpired) Error() string
type Middleware ¶
type Option ¶
type Option func(*service)
func WithExpiresIn ¶
func WithGoogleAutomaticSMSVerificationTemplate ¶
func WithGoogleAutomaticSMSVerificationTemplate() Option
func WithMessageTemplate ¶
func WithPinCodeLength ¶
type Repository ¶
type SendOTPOption ¶
type SendOTPOption func(data map[string]interface{})
func WithGoogleAutomaticSMSVerification ¶
func WithGoogleAutomaticSMSVerification(hash string) SendOTPOption
type SendOTPRequest ¶
type SendOTPRequest struct {
PhoneNumber string
}
type SendOTPResponse ¶
type SendOTPResponse struct {
OTPUUID string
}
type Service ¶
type Service interface { SendOTP(ctx context.Context, req SendOTPRequest, options ...SendOTPOption) (res *SendOTPResponse, err error) VerifyOTP(ctx context.Context, req VerifyOTPRequest) (res *VerifyOTPResponse, err error) }
func New ¶
func New(repo Repository, smsSvc smssvc.Service, options ...Option) Service
type VerifyOTPRequest ¶
type VerifyOTPResponse ¶
type VerifyOTPResponse struct {
PhoneNumber string
}
Click to show internal directories.
Click to hide internal directories.