types

package
v0.0.0-...-4780336 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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 HeaderOverrides struct {
	From      string   `bson:"from" json:"from"`
	Sender    string   `bson:"sender" json:"sender"`
	ReplyTo   []string `bson:"replyTo" json:"replyTo"`
	NoReplyTo bool     `bson:"noReplyTo" json:"noReplyTo"`
}

type LocalizedTemplate

type LocalizedTemplate struct {
	Lang        string `bson:"languageCode" json:"lang"`
	Subject     string `bson:"subject" json:"subject"`
	TemplateDef string `bson:"templateDef" json:"templateDef"`
}

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"`
	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"`
	ExpiresAt       int64              `bson:"expiresAt" json:"expiresAt"`
	HighPrio        bool               `bson:"highPrio" json:"highPrio"`
	LastSendAttempt int64              `bson:"lastSendAttempt" json:"lastSendAttempt"`
}

type SMSGatewayConfig

type SMSGatewayConfig struct {
	URL    string `yaml:"url"`
	APIKey string `yaml:"api_key"`
}

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"`
}

type SentSMS

type SentSMS struct {
	ID          primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	UserID      string             `bson:"userID" json:"userID"`
	MessageType string             `bson:"messageType" json:"messageType"`
	SentAt      time.Time          `bson:"sentAt" json:"sentAt"`
	PhoneNumber string             `bson:"phoneNumber" json:"phoneNumber"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL