notifier

package
v0.17.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendPlaintextMessage

func SendPlaintextMessage(ctx context.Context, notifiers []Notifier, msg string) error

SendPlaintextMessage sends a plaintext message to specified providers.

Types

type Notifier

type Notifier interface {

	// SendEvent notifies about new incoming event from source.
	SendEvent(context.Context, event.Event, []string) error

	// SendMessageToAll is used for notifying about Botkube start/stop listening, possible Botkube upgrades and other events.
	// Some integrations may decide to ignore such messages and have SendMessage method no-op.
	// TODO: Consider option per channel to turn on/off "announcements" (Botkube start/stop/upgrade, notify/config change).
	SendMessageToAll(context.Context, interactive.Message) error

	// SendGenericMessage sends a generic message for a given source bindings.
	SendGenericMessage(context.Context, interactive.GenericMessage, []string) error

	// IntegrationName returns a name of a given communication platform.
	IntegrationName() config.CommPlatformIntegration

	// Type returns a given integration type. See config.IntegrationType for possible integration types.
	Type() config.IntegrationType
}

Notifier sends event notifications and messages on the communication channels.

Jump to

Keyboard shortcuts

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