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
|
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
|
2023-01-31 21:22:17 +00:00
|
|
|
InviterEmail string
|
2019-09-27 17:48:53 +01:00
|
|
|
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 {
|
2023-01-31 21:22:17 +00:00
|
|
|
return "You were invited to join a project on Storj"
|
2019-03-26 15:56:16 +00:00
|
|
|
}
|
2022-06-28 17:12:43 +01:00
|
|
|
|
2023-05-19 14:23:04 +01:00
|
|
|
// ExistingUserProjectInvitationEmail is mailservice template for project invitation email for existing users.
|
|
|
|
type ExistingUserProjectInvitationEmail struct {
|
|
|
|
InviterEmail string
|
|
|
|
Region string
|
|
|
|
SignInLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Template returns email template name.
|
|
|
|
func (*ExistingUserProjectInvitationEmail) Template() string { return "ExistingUserInvite" }
|
|
|
|
|
|
|
|
// Subject gets email subject.
|
|
|
|
func (email *ExistingUserProjectInvitationEmail) Subject() string {
|
|
|
|
return "You were invited to join a project on Storj"
|
2023-08-28 21:01:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// UnverifiedUserProjectInvitationEmail is mailservice template for project invitation email for unverified users.
|
|
|
|
type UnverifiedUserProjectInvitationEmail struct {
|
|
|
|
InviterEmail string
|
|
|
|
Region string
|
|
|
|
ActivationLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Template returns email template name.
|
|
|
|
func (*UnverifiedUserProjectInvitationEmail) Template() string { return "UnverifiedUserInvite" }
|
|
|
|
|
|
|
|
// Subject gets email subject.
|
|
|
|
func (email *UnverifiedUserProjectInvitationEmail) Subject() string {
|
|
|
|
return "You were invited to join a project on Storj"
|
2023-05-19 14:23:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewUserProjectInvitationEmail is mailservice template for project invitation email for new users.
|
|
|
|
type NewUserProjectInvitationEmail struct {
|
|
|
|
InviterEmail string
|
|
|
|
Region string
|
|
|
|
SignUpLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Template returns email template name.
|
|
|
|
func (*NewUserProjectInvitationEmail) Template() string { return "NewUserInvite" }
|
|
|
|
|
|
|
|
// Subject gets email subject.
|
|
|
|
func (email *NewUserProjectInvitationEmail) Subject() string {
|
|
|
|
return "You were invited to join a project on Storj"
|
|
|
|
}
|
|
|
|
|
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" }
|