resendapi

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client delivers prepared emails

func NewClient

func NewClient(apiToken string, timeout time.Duration) *Client

NewClient creates a delivery client with bounded HTTP requests

func (*Client) Send added in v1.2.0

func (c *Client) Send(ctx context.Context, email notification.Email, idempotencyKey string) (string, error)

Send submits payload with its stable idempotency key

type Config

type Config struct {
	FromEmail      string
	ContactEmail   string
	BaseURL        string
	UnsubscribeURL string
}

Config contains email template settings

type Renderer added in v1.2.0

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

Renderer prepares email content without network access

func NewRenderer added in v1.2.0

func NewRenderer(cfg Config) (*Renderer, error)

NewRenderer parses the embedded verification templates

func (*Renderer) PrepareVerification added in v1.2.0

func (r *Renderer) PrepareVerification(req SendEmailVerificationRequest) (notification.Email, error)

PrepareVerification freezes all template and configuration values for later delivery

type SendEmailVerificationRequest

type SendEmailVerificationRequest struct {
	Email            string
	Username         string
	VerificationCode string
	UnsubscribeToken string
}

SendEmailVerificationRequest represents email verification request

Jump to

Keyboard shortcuts

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