alert

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TELEGRAM = "TELEGRAM"
)
View Source
const TELEGRAM_MAXLEN = 4096

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert interface {
	SendMessage(log AlertInfo) error
	Initialize(log AlertProps) error
}

func New

func New(logger string, props AlertProps) Alert

type AlertInfo

type AlertInfo struct {
	Key   string
	Value string
	Extra interface{}
}

type AlertProps

type AlertProps struct {
	Url       string
	ChatId    string
	ParseMode string
	Enable    bool
}

type TelegramSDK

type TelegramSDK struct {
	// contains filtered or unexported fields
}

func (*TelegramSDK) Initialize

func (obj *TelegramSDK) Initialize(props AlertProps) error

func (TelegramSDK) SendMessage

func (obj TelegramSDK) SendMessage(log AlertInfo) error

Jump to

Keyboard shortcuts

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