-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: email: rename methods (#324)
- Loading branch information
Showing
4 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,8 @@ import ( | |
) | ||
|
||
type Email interface { | ||
SendVerificationEmail(ctx context.Context, req SendVerificationEmail) error | ||
SendPasswordResetEmail(ctx context.Context, req SendPasswordResetEmail) error | ||
SendVerification(ctx context.Context, req SendVerification) error | ||
SendPasswordReset(ctx context.Context, req SendPasswordReset) error | ||
} | ||
|
||
type email struct { | ||
|
@@ -51,13 +51,13 @@ func MustNew(c *c.Config) Email { | |
return e | ||
} | ||
|
||
type SendVerificationEmail struct { | ||
type SendVerification struct { | ||
Name string | ||
Email string | ||
Token string | ||
} | ||
|
||
func (e *email) SendVerificationEmail(ctx context.Context, req SendVerificationEmail) error { | ||
func (e *email) SendVerification(ctx context.Context, req SendVerification) error { | ||
sender := "[email protected]" | ||
subject := "[GetStronger] Verify your email" | ||
body := fmt.Sprintf(`Hi %s, | ||
|
@@ -89,13 +89,13 @@ Please verify your email address by clicking on the link below. | |
return nil | ||
} | ||
|
||
type SendPasswordResetEmail struct { | ||
type SendPasswordReset struct { | ||
Name string | ||
Email string | ||
Token string | ||
} | ||
|
||
func (e *email) SendPasswordResetEmail(ctx context.Context, req SendPasswordResetEmail) error { | ||
func (e *email) SendPasswordReset(ctx context.Context, req SendPasswordReset) error { | ||
sender := "[email protected]" | ||
subject := "[GetStronger] Reset your password" | ||
body := fmt.Sprintf(`Hi %s, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters