messanger

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMessanger

func WithMessanger(ctx context.Context, messanger Messanger) context.Context

WithMessanger sets the messanger in the context

Types

type DummyMessanger

type DummyMessanger struct{}

func (*DummyMessanger) IsEnabled

func (d *DummyMessanger) IsEnabled() bool

func (*DummyMessanger) Send

func (d *DummyMessanger) Send(ctx context.Context, name string, recipients []string, vars map[string]any) error

type Messanger

type Messanger interface {
	Send(ctx context.Context, name string, recipients []string, vars map[string]any) error
	IsEnabled() bool
}

func Get

func Get(ctx context.Context) Messanger

Get messanger from the context

type MessangerFunc

type MessangerFunc func(ctx context.Context, name string, recipients []string, vars map[string]any) error

func (MessangerFunc) IsEnabled

func (d MessangerFunc) IsEnabled() bool

func (MessangerFunc) Send

func (f MessangerFunc) Send(ctx context.Context, name string, recipients []string, vars map[string]any) error

Jump to

Keyboard shortcuts

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