email

package
v0.0.0-...-767b333 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultGlobalTemplate = GlobalTemplate{
	BackgroundColor:     "#f6f6f6",
	PrimaryColor:        "#0099ff",
	PrimaryBorderColor:  "#0099ff",
	HeaderLogoUrl:       "",
	IntroText:           "",
	OutroText:           "",
	FooterCopyrightText: "",
	UnsubscribeLink:     "",
}

DefaultGlobalTemplate returns the default global template

View Source
var Templates embed.FS // css template

Templates contain the templates

Functions

This section is empty.

Types

type CreationInvitationEmailTemplate

type CreationInvitationEmailTemplate struct {
	GlobalTemplate
	EmailOfNewUser string
	FirstName      string
	LastName       string
	ContentText    string
	ButtonText     string
	ButtonUrl      string
	HtmlTemplate   string
}

CreationInvitationEmailTemplate is the template for the creation invitation email

func DefaultCreationInvitationEmailResolver

func DefaultCreationInvitationEmailResolver(origin, firstName, lastName, emailAddress, content, token string) CreationInvitationEmailTemplate

DefaultCreationInvitationEmailResolver is the default resolver for the invitation email

func (*CreationInvitationEmailTemplate) Content

func (obj *CreationInvitationEmailTemplate) Content() (html string, err error)

Content returns the content of the invitation email

type GlobalTemplate

type GlobalTemplate struct {
	BackgroundColor     string
	PrimaryColor        string
	PrimaryBorderColor  string
	HeaderLogoUrl       string
	IntroText           string
	OutroText           string
	FooterCopyrightText string
	UnsubscribeLink     string
}

GlobalTemplate is a global template for email

func (*GlobalTemplate) Style

func (globalTemplate *GlobalTemplate) Style() (result template.HTML)

Style returns the css of the email

type InvitationEmailTemplate

type InvitationEmailTemplate struct {
	GlobalTemplate
	EmailOfNewUser string
	FirstName      string
	LastName       string
	ContentText    string
	ButtonText     string
	ButtonUrl      string
	HtmlTemplate   string
}

InvitationEmailTemplate is the template for the invitation email

func DefaultInvitationEmailResolver

func DefaultInvitationEmailResolver(origin, firstName, lastName, emailAddress, content, link string) InvitationEmailTemplate

DefaultInvitationEmailResolver is the default resolver for the invitation email

func (*InvitationEmailTemplate) Content

func (obj *InvitationEmailTemplate) Content() (html string, err error)

Content returns the content of the invitation email

type PasswordResetTemplate

type PasswordResetTemplate struct {
	GlobalTemplate
	EmailOfNewUser string
	ContentText    string
	ButtonText     string
	ButtonUrl      string
	HtmlTemplate   string
}

PasswordResetTemplate is the template for the password reset email.

func DefaultPasswordResetEmailResolver

func DefaultPasswordResetEmailResolver(origin, email, token string) PasswordResetTemplate

DefaultPasswordResetEmailResolver is the default resolver for the password reset email.

func (*PasswordResetTemplate) Content

func (obj *PasswordResetTemplate) Content() (html string, err error)

Content returns the content of the email

type RegistrationEmailConfirmationTemplate

type RegistrationEmailConfirmationTemplate struct {
	GlobalTemplate
	EmailOfNewUser string
	ContentText    string
	ButtonText     string
	ButtonUrl      string
}

RegistrationEmailConfirmationTemplate is the template for the registration confirmation email.

func (*RegistrationEmailConfirmationTemplate) Content

func (obj *RegistrationEmailConfirmationTemplate) Content() (html string, err error)

Content returns the content of the registration confirmation email

type RegistrationEmailTemplate

type RegistrationEmailTemplate struct {
	GlobalTemplate
	EmailOfNewUser string
	ContentText    string
	ButtonText     string
	ButtonUrl      string
	HtmlTemplate   string
}

RegistrationEmailTemplate is the template for the registration email

func DefaultRegistrationEmailResolver

func DefaultRegistrationEmailResolver(origin, email, token string) RegistrationEmailTemplate

DefaultRegistrationEmailResolver is the default resolver for the registration email

func (*RegistrationEmailTemplate) Content

func (obj *RegistrationEmailTemplate) Content() (html string, err error)

Content returns the content of the registration email

Jump to

Keyboard shortcuts

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