package module
Version: v0.0.0-...-3a69f29 Latest Latest

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 13 Imported by: 3




This section is empty.


This section is empty.


func Setup

func Setup(builder component.Builder)

Setup configures package services


type Service

type Service interface {
	// Send a notification via Slack
	NotifySlack(msg *SlackMessage) error

	// Send a notification via Telegram
	NotifyTelegram(msg *TelegramMessage) error

	// Send a notification via webhook
	NotifyWebhook(msg *WebhookMessage) error

Service provides methods to send notifications

func GetService

func GetService(c di.Container) Service

GetService returns an implementation Service from DI container

type SlackMessage

type SlackMessage struct {
	To    []string
	Title string
	Text  string
	Emoji string

SlackMessage is a content for Slack notification

type TelegramMessage

type TelegramMessage struct {
	To    []string
	Title string
	Text  string
	Emoji string

TelegramMessage is a content for Telegram notification

type WebhookMessage

type WebhookMessage struct {
	To          []string
	PayloadJSON interface{}

WebhookMessage is a content for webhook notification

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL