email

package
v0.0.0-...-ded3010 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Template = `` /* 11676-byte string literal not displayed */

Functions

This section is empty.

Types

type ConfirmEmail

type ConfirmEmail interface {
	ConfirmEmail(ctx context.Context) (subject string, parts []Part)
}

type Data

type Data struct {
	Subject     string
	TextContent string
	HTMLContent string
	Data        []Part

	LogoURL     string
	HeaderURL   string
	HeaderLabel string

	FooterURL   string
	FooterLabel string

	// Theme
	Primary        string
	PrimaryInverse string
	Accent         string
	Neutral        string
	NeutralInverse string
}

func (*Data) Parse

func (e *Data) Parse(data map[string]interface{}) error

Parse populates Text & HTML Content returning an error

func (e *Data) ReplaceLink(link string)

type EmailBaseURL

type EmailBaseURL interface {
	EmailBaseURL(ctx context.Context) string
}

type LoginEmail

type LoginEmail interface {
	LoginEmail(ctx context.Context) (subject string, parts []Part)
}

type Part

type Part struct {
	P     string
	URL   string
	Label string
}

type ResetPassword

type ResetPassword interface {
	ResetPassword(ctx context.Context) (subject string, parts []Part)
}

type Sender

type Sender interface {
	SendEmail(ctx context.Context, toEmail string, subject string, textBody string, htmlBody string) error
}

To allow email notification you must implement your account provider to also be an email sender

type UpdateEmail

type UpdateEmail interface {
	UpdateEmail(ctx context.Context) (subject string, parts []Part)
}

Jump to

Keyboard shortcuts

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