Documentation ¶
Index ¶
- func NewDiscordSender(log zerolog.Logger, settings domain.Notification) domain.NotificationSender
- func NewNotifiarrSender(log zerolog.Logger, settings domain.Notification) domain.NotificationSender
- func NewTelegramSender(log zerolog.Logger, settings domain.Notification) domain.NotificationSender
- type DiscordEmbeds
- type DiscordEmbedsFields
- type DiscordMessage
- type EmbedColors
- type Service
- type TelegramMessage
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 DiscordEmbedsFields ¶
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 ¶
type Service interface { Find(ctx context.Context, params domain.NotificationQueryParams) ([]domain.Notification, int, error) FindByID(ctx context.Context, id int) (*domain.Notification, error) Store(ctx context.Context, n domain.Notification) (*domain.Notification, error) Update(ctx context.Context, n domain.Notification) (*domain.Notification, error) Delete(ctx context.Context, id int) error Send(event domain.NotificationEvent, payload domain.NotificationPayload) Test(ctx context.Context, notification domain.Notification) error }
func NewService ¶
func NewService(log logger.Logger, repo domain.NotificationRepo) Service
type TelegramMessage ¶
Click to show internal directories.
Click to hide internal directories.