notification

package
v1.35.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: GPL-2.0 Imports: 19 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 NewGotifySender added in v1.32.0

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

func NewLunaSeaSender added in v1.35.0

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

func NewNotifiarrSender

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

func NewNtfySender added in v1.35.0

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

func NewPushoverSender

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

func NewShoutrrrSender added in v1.35.0

func NewShoutrrrSender(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
)

type LunaSeaMessage added in v1.35.0

type LunaSeaMessage struct {
	Title string `json:"title"`
	Body  string `json:"body"`
	Image string `json:"image,omitempty"`
}

type NotificationBuilderPlainText added in v1.35.0

type NotificationBuilderPlainText struct{}

func (*NotificationBuilderPlainText) BuildBody added in v1.35.0

BuildBody constructs the body of the notification message.

func (*NotificationBuilderPlainText) BuildTitle added in v1.35.0

BuildTitle constructs the title of the notification message.

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"`
	MessageThreadID int    `json:"message_thread_id,omitempty"`
}

TelegramMessage Reference: https://core.telegram.org/bots/api#sendmessage

Jump to

Keyboard shortcuts

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