testsender

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package testsender provides notification sender testing support.

Index

Constants

View Source
const ProviderType = "testsender"

ProviderType defines the type of the test notification provider.

Variables

This section is empty.

Functions

func CaptureMessages

func CaptureMessages(ctx context.Context) context.Context

CaptureMessages captures messages sent in the provider context and returns a new context. Captured messages can be retrieved using MessagesInContext.

func MergeOptions

func MergeOptions(src Options, dst *Options, isUpdate bool)

MergeOptions updates the destination options with the source options.

func MessagesInContext

func MessagesInContext(ctx context.Context) []*sender.Message

MessagesInContext retrieves messages sent in the provider context.

Types

type Options

type Options struct {
	Format string `json:"format"` // format of the message, must be "html" or "md"
}

Options defines email notification provider options.

Jump to

Keyboard shortcuts

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