postmark_client

package
v0.1.1-rc Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VerificationCodeTmpl = "verification_code"
	PasswordResetTmpl    = "password_reset"
	DestroyUserCodeTmpl  = "destroy_account"
)

Predefined email templates

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Postmark service wrapper

func New

func New(postmark postmarkClient, conf Config) *Client

New func is a factory function, returns a new instance of the Client interface implementation

func (*Client) SendDestroyProfileCode

func (c *Client) SendDestroyProfileCode(ctx context.Context, uid, email, otp string) error

func (*Client) SendResetPasswordCode

func (c *Client) SendResetPasswordCode(ctx context.Context, uid, email, otp string) error

func (*Client) SendVerificationCode

func (c *Client) SendVerificationCode(ctx context.Context, uid, email, otp string) error

type Config

type Config struct {
	ProductName  string
	ProductURL   string
	SupportEmail string
	CompanyName  string
	FromEmail    string
	FromName     string

	// Base URLs for email actions
	VerificationCodeURL string
	PasswordResetURL    string
	DestroyUserCodeURL  string
}

Config struct

Jump to

Keyboard shortcuts

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