senders

package
v0.0.0-...-ae485d8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearyChatSender

type BearyChatSender struct {
	Sender
	UnSupportType map[string]int
}

sender

var BearyChatPusher BearyChatSender

bearychat pusher

func (BearyChatSender) BuildMessage

func (f BearyChatSender) BuildMessage(notification *models.Notification) string

build message

func (BearyChatSender) IsSupport

func (f BearyChatSender) IsSupport() bool

is support

func (BearyChatSender) Send

func (f BearyChatSender) Send(notifications []*models.Notification)

send

func (BearyChatSender) SingleSend

func (f BearyChatSender) SingleSend(notification *models.Notification)

send notification

type LogSender

type LogSender struct {
	Sender
}

sender

var LogPusher LogSender

log pusher

func (LogSender) BuildMessage

func (f LogSender) BuildMessage(notification *models.Notification) string

build message

func (LogSender) IsSupport

func (f LogSender) IsSupport() bool

is support

func (LogSender) Send

func (f LogSender) Send(notifications []*models.Notification)

send

func (LogSender) SingleSend

func (f LogSender) SingleSend(notification *models.Notification)

send notification

type Sender

type Sender interface {
	Send([]*models.Notification)
	IsSupport() bool
}

sender

type SlackMessage

type SlackMessage struct {
	ID      uint64 `json:"id"`
	Type    string `json:"type"`
	Channel string `json:"channel"`
	AsUser  bool   `json:"as_user"`
	Text    string `json:"text"`
	Token   string `json:"token"`
}

SlackMessage slack message model

type SlackSender

type SlackSender struct {
	Sender
}

SlackSender sender

var SlackPusher SlackSender

SlackPusher pusher

func (SlackSender) BuildMessage

func (s SlackSender) BuildMessage(notification *models.Notification) string

BuildMessage build message

func (SlackSender) IsSupport

func (s SlackSender) IsSupport() bool

is support

func (SlackSender) Send

func (s SlackSender) Send(notifications []*models.Notification)

send

func (SlackSender) SingleSend

func (s SlackSender) SingleSend(notification *models.Notification)

SingleSend send notification

Jump to

Keyboard shortcuts

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