Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTP ¶
func (*OTP) ProcessEmailsCode ¶
ProcessEmailsCode processes the codes by spawning a ticker of teh specified interval. It checks the codes and removes the expired ones from the list of codes It returns a function to stop the process.
func (*OTP) Send ¶
func (o *OTP) Send( email *emailutils.Email, provider emailutils.Provider, purpose, entity string, ) error
Send sends an email with the code and registers it. It will assume your email subject and body has a template with the following keys: - {{.Code}}: the code to send
Click to show internal directories.
Click to hide internal directories.