2022-07-14 14:44:06 +01:00
|
|
|
// Copyright (C) 2022 Storj Labs, Inc.
|
2019-03-02 15:22:20 +00:00
|
|
|
// See LICENSE for copying information
|
|
|
|
|
2022-07-14 14:44:06 +01:00
|
|
|
package console
|
|
|
|
|
|
|
|
import "time"
|
2019-03-02 15:22:20 +00:00
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// AccountActivationEmail is mailservice template with activation data.
|
2019-03-02 15:22:20 +00:00
|
|
|
type AccountActivationEmail struct {
|
2019-09-27 17:48:53 +01:00
|
|
|
Origin string
|
|
|
|
ActivationLink string
|
|
|
|
ContactInfoURL string
|
|
|
|
TermsAndConditionsURL string
|
2020-01-24 12:56:33 +00:00
|
|
|
UserName string
|
2019-03-02 15:22:20 +00:00
|
|
|
}
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// Template returns email template name.
|
2019-03-02 15:22:20 +00:00
|
|
|
func (*AccountActivationEmail) Template() string { return "Welcome" }
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// Subject gets email subject.
|
2019-03-02 15:22:20 +00:00
|
|
|
func (*AccountActivationEmail) Subject() string { return "Activate your email" }
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// ForgotPasswordEmail is mailservice template with reset password data.
|
2019-03-02 15:22:20 +00:00
|
|
|
type ForgotPasswordEmail struct {
|
2019-05-13 16:53:52 +01:00
|
|
|
Origin string
|
|
|
|
UserName string
|
|
|
|
ResetLink string
|
|
|
|
CancelPasswordRecoveryLink string
|
2019-09-27 17:48:53 +01:00
|
|
|
LetUsKnowURL string
|
|
|
|
ContactInfoURL string
|
|
|
|
TermsAndConditionsURL string
|
2019-03-02 15:22:20 +00:00
|
|
|
}
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// Template returns email template name.
|
2019-03-02 15:22:20 +00:00
|
|
|
func (*ForgotPasswordEmail) Template() string { return "Forgot" }
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// Subject gets email subject.
|
2019-04-10 20:16:10 +01:00
|
|
|
func (*ForgotPasswordEmail) Subject() string { return "Password recovery request" }
|
2019-03-02 15:22:20 +00:00
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// ProjectInvitationEmail is mailservice template for project invitation email.
|
2019-03-02 15:22:20 +00:00
|
|
|
type ProjectInvitationEmail struct {
|
2019-09-27 17:48:53 +01:00
|
|
|
Origin string
|
|
|
|
UserName string
|
|
|
|
ProjectName string
|
|
|
|
SignInLink string
|
|
|
|
LetUsKnowURL string
|
|
|
|
ContactInfoURL string
|
|
|
|
TermsAndConditionsURL string
|
2019-03-02 15:22:20 +00:00
|
|
|
}
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// Template returns email template name.
|
2019-03-02 15:22:20 +00:00
|
|
|
func (*ProjectInvitationEmail) Template() string { return "Invite" }
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// Subject gets email subject.
|
2019-03-26 15:56:16 +00:00
|
|
|
func (email *ProjectInvitationEmail) Subject() string {
|
2019-03-29 12:13:37 +00:00
|
|
|
return "You were invited to join the Project " + email.ProjectName
|
2019-03-26 15:56:16 +00:00
|
|
|
}
|
2022-06-28 17:12:43 +01:00
|
|
|
|
|
|
|
// UnknownResetPasswordEmail is mailservice template with unknown password reset data.
|
|
|
|
type UnknownResetPasswordEmail struct {
|
|
|
|
Satellite string
|
|
|
|
Email string
|
|
|
|
DoubleCheckLink string
|
|
|
|
ResetPasswordLink string
|
|
|
|
CreateAnAccountLink string
|
|
|
|
SupportTeamLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Template returns email template name.
|
|
|
|
func (*UnknownResetPasswordEmail) Template() string { return "UnknownReset" }
|
|
|
|
|
|
|
|
// Subject gets email subject.
|
|
|
|
func (*UnknownResetPasswordEmail) Subject() string {
|
|
|
|
return "You have requested to reset your password, but..."
|
|
|
|
}
|
2022-07-01 18:31:14 +01:00
|
|
|
|
|
|
|
// AccountAlreadyExistsEmail is mailservice template for email where user tries to create account, but one already exists.
|
|
|
|
type AccountAlreadyExistsEmail struct {
|
|
|
|
Origin string
|
|
|
|
SatelliteName string
|
|
|
|
SignInLink string
|
|
|
|
ResetPasswordLink string
|
|
|
|
CreateAccountLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Template returns email template name.
|
|
|
|
func (*AccountAlreadyExistsEmail) Template() string { return "AccountAlreadyExists" }
|
|
|
|
|
|
|
|
// Subject gets email subject.
|
|
|
|
func (*AccountAlreadyExistsEmail) Subject() string {
|
|
|
|
return "Are you trying to sign in?"
|
|
|
|
}
|
2022-07-14 14:44:06 +01:00
|
|
|
|
|
|
|
// LockAccountEmail is mailservice template with lock account data.
|
|
|
|
type LockAccountEmail struct {
|
|
|
|
Name string
|
|
|
|
LockoutDuration time.Duration
|
|
|
|
ResetPasswordLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Template returns email template name.
|
|
|
|
func (*LockAccountEmail) Template() string { return "LockAccount" }
|
|
|
|
|
|
|
|
// Subject gets email subject.
|
|
|
|
func (*LockAccountEmail) Subject() string { return "Account Lock" }
|