gomessage

package
v1.2.49 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

发送通知

飞书
普通群消息
gomessage.FeiShu(hookUrl, "这是普通的群消息")
钉钉
gomessage.InitDingDing("token","secret")

普通群消息
err := gomessage.DingDing("这是普通的群消息")

@特定人的消息
@对象必须为绑定钉钉的手机号
err := gomessage.DingDing("Lucy, Harvey, 你们的程序挂了", "18578924567", "+13414567890")

@所有人的消息
err := gomessage.DingDing("这是@所有人的消息", "*")

Telegram电报
gomessage.InitTelegram("token",false)

//chatId 个人ID或群组ID text 消息内容
err := gomessage.TelegramTo(chatId, "text")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDingDing added in v1.0.17

func CreateDingDing(accessToken string, secret string) *goding.Webhook

新创建一个DingDing 发送器对象

func DingDing added in v1.0.15

func DingDing(text string, at ...string) error

func FeiShu

func FeiShu(hookUrl string, text string) error

func InitDingDing added in v1.0.15

func InitDingDing(accessToken string, secret string)

全局初始化一个DingDing 发送器对象

func InitTelegram added in v1.2.45

func InitTelegram(accessToken string, inChina bool)

Telegram 发送器对象, inChina true时走代理IP

func Telegram added in v1.2.45

func Telegram(chatId int64, text string) error

chatId 个人ID或群组ID text 消息内容

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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