channels

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package channels provides different communication channels to notify users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	// SendMessage sends a message to users.
	SendMessage(userIDs []string, msg string) error
	// SendMessageToGroup sends a message to a group.
	SendMessageToGroup(groupdID *groups.GroupId, msg string) error
}

Channel defines the methods of a communication channel.

func NewMailChannel

func NewMailChannel(cfg config.Config, logger log.Logger) (Channel, error)

NewMailChannel instantiates a new mail communication channel.

type Mail

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

Mail is the communcation channel for email.

func (Mail) SendMessage

func (m Mail) SendMessage(userIDs []string, msg string) error

SendMessage sends a message to all given users.

func (Mail) SendMessageToGroup

func (m Mail) SendMessageToGroup(groupID *groups.GroupId, msg string) error

SendMessageToGroup sends a message to all members of the given group.

Jump to

Keyboard shortcuts

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