Documentation
¶
Index ¶
Constants ¶
View Source
const ( EMAIL_TYPE_REGISTRATION = "registration" EMAIL_TYPE_INVITATION = "invitation" EMAIL_TYPE_VERIFY_EMAIL = "verify-email" EMAIL_TYPE_AUTH_VERIFICATION_CODE = "verification-code" EMAIL_TYPE_PASSWORD_RESET = "password-reset" EMAIL_TYPE_PASSWORD_CHANGED = "password-changed" EMAIL_TYPE_ACCOUNT_ID_CHANGED = "account-id-changed" EMAIL_TYPE_WEEKLY = "weekly" EMAIL_TYPE_STUDY_REMINDER = "study-reminder" EMAIL_TYPE_NEWSLETTER = "newsletter" EMAIL_TYPE_ACCOUNT_DELETED = "account-deleted" EMAIL_TYPE_ACCOUNT_DELETED_AFTER_INACTIVITY = "account-deleted-after-inactivity" EMAIL_TYPE_ACCOUNT_INACTIVITY = "account-inactivity" EMAIL_TYPE_PHONE_NUMBER_CHANGED = "phone-number-changed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailTemplate ¶
type EmailTemplate struct {
ID primitive.ObjectID `bson:"_id" json:"id,omitempty"`
MessageType string `bson:"messageType" json:"messageType"`
StudyKey string `bson:"studyKey,omitempty" json:"studyKey"`
DefaultLanguage string `bson:"defaultLanguage" json:"defaultLanguage"`
HeaderOverrides *HeaderOverrides `bson:"headerOverrides" json:"headerOverrides"`
Translations []LocalizedTemplate `bson:"translations" json:"translations"`
}
type HeaderOverrides ¶
type LocalizedTemplate ¶
type MessagingConfigs ¶
type MessagingConfigs struct {
GlobalEmailTemplateConstants map[string]string `json:"global_email_template_constants" yaml:"global_email_template_constants"`
SmtpBridgeConfig struct {
URL string `json:"url" yaml:"url"`
APIKey string `json:"api_key" yaml:"api_key"`
RequestTimeout time.Duration `json:"request_timeout" yaml:"request_timeout"`
} `json:"smtp_bridge_config" yaml:"smtp_bridge_config"`
SMSConfig *SMSGatewayConfig `json:"sms_config" yaml:"sms_config"`
}
type OutgoingEmail ¶
type OutgoingEmail struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"id"`
MessageType string `bson:"messageType" json:"messageType"`
UserID string `bson:"userId" json:"userId"`
To []string `bson:"to" json:"to"`
Subject string `bson:"subject" json:"subject"`
HeaderOverrides *HeaderOverrides `bson:"headerOverrides" json:"headerOverrides"`
Content string `bson:"content" json:"content"`
AddedAt int64 `bson:"addedAt" json:"addedAt"`
SentAt time.Time `bson:"sentAt" json:"sentAt"`
ExpiresAt int64 `bson:"expiresAt" json:"expiresAt"`
HighPrio bool `bson:"highPrio" json:"highPrio"`
LastSendAttempt int64 `bson:"lastSendAttempt" json:"lastSendAttempt"`
}
type SMSGatewayConfig ¶
type SMSTemplate ¶
type SMSTemplate struct {
ID primitive.ObjectID `bson:"_id" json:"id,omitempty"`
MessageType string `bson:"messageType" json:"messageType"`
DefaultLanguage string `bson:"defaultLanguage" json:"defaultLanguage"`
From string `bson:"from" json:"from"`
Translations []LocalizedTemplate `bson:"translations" json:"translations"`
}
type ScheduledEmail ¶
type ScheduledEmail struct {
ID primitive.ObjectID `bson:"_id" json:"id,omitempty"`
Template EmailTemplate `bson:"template" json:"template"`
Type string `bson:"type" json:"type"`
StudyKey string `bson:"studyKey" json:"studyKey"`
Condition *study.ExpressionArg `bson:"condition" json:"condition"`
NextTime int64 `bson:"nextTime" json:"nextTime"`
Period int64 `bson:"period" json:"period"`
Label string `bson:"label" json:"label"`
Until int64 `bson:"until" json:"until"`
}
Click to show internal directories.
Click to hide internal directories.