notification

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscordSender

func NewDiscordSender(log zerolog.Logger, settings domain.Notification) domain.NotificationSender

func NewNotifiarrSender

func NewNotifiarrSender(log zerolog.Logger, settings domain.Notification) domain.NotificationSender

func NewTelegramSender

func NewTelegramSender(log zerolog.Logger, settings domain.Notification) domain.NotificationSender

Types

type DiscordEmbeds

type DiscordEmbeds struct {
	Title       string                `json:"title"`
	Description string                `json:"description"`
	Color       int                   `json:"color"`
	Fields      []DiscordEmbedsFields `json:"fields,omitempty"`
	Timestamp   time.Time             `json:"timestamp"`
}

type DiscordEmbedsFields

type DiscordEmbedsFields struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Inline bool   `json:"inline,omitempty"`
}

type DiscordMessage

type DiscordMessage struct {
	Content interface{}     `json:"content"`
	Embeds  []DiscordEmbeds `json:"embeds,omitempty"`
}

type EmbedColors

type EmbedColors int
const (
	LIGHT_BLUE  EmbedColors = 5814783  // 58b9ff
	RED         EmbedColors = 15548997 // ed4245
	GREEN       EmbedColors = 5763719  // 57f287
	GRAY        EmbedColors = 10070709 // 99aab5
	LightYellow EmbedColors = 16776960 // ffff00
)

type Service

func NewService

func NewService(log logger.Logger, repo domain.NotificationRepo) Service

type TelegramMessage

type TelegramMessage struct {
	ChatID    string `json:"chat_id"`
	Text      string `json:"text"`
	ParseMode string `json:"parse_mode"`
}

Jump to

Keyboard shortcuts

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