Documentation
¶
Overview ¶
Package testsender provides notification sender testing support.
Index ¶
- Constants
- func CaptureMessages(ctx context.Context) context.Context
- func CaptureMessagesWithHandler(ctx context.Context, handler func(msg *sender.Message) error) context.Context
- func MergeOptions(ctx context.Context, src Options, dst *Options, isUpdate bool) error
- func MessagesInContext(ctx context.Context) []*sender.Message
- type Options
Constants ¶
View Source
const ProviderType = "testsender"
ProviderType defines the type of the test notification provider.
Variables ¶
This section is empty.
Functions ¶
func CaptureMessages ¶
CaptureMessages captures messages sent in the provider context and returns a new context. Captured messages can be retrieved using MessagesInContext.
func CaptureMessagesWithHandler ¶ added in v0.19.0
func CaptureMessagesWithHandler(ctx context.Context, handler func(msg *sender.Message) error) context.Context
CaptureMessagesWithHandler captures messages sent in the provider context and returns a new context. Captured messages can be retrieved using MessagesInContext.
func MergeOptions ¶
MergeOptions updates the destination options with the source options.
Types ¶
Click to show internal directories.
Click to hide internal directories.