im_hook

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeiShuHook

type FeiShuHook struct {
	Enable bool
	Token  string
	Url    string
}

func NewFeishuHook

func NewFeishuHook(token, url string) *FeiShuHook

func (*FeiShuHook) Push

func (f *FeiShuHook) Push(msgType FeiShuMsgType, title, content string) error

飞书自定义机器人, 目前仅支持文字和富文本

msgType: 1-纯文本 2-富文本
	msgType为1时,title为发送的文字信息,content置空
	msgType为2时,title为富文本标题,content为富文本内容

type FeiShuMsgType

type FeiShuMsgType int
const (
	FText     FeiShuMsgType = 1 // 普通文本消息
	FFullText FeiShuMsgType = 2 // 富文本消息
)

type FeiShuResponse

type FeiShuResponse struct {
	Extra         interface{} `json:"Extra"`
	StatusCode    int         `json:"StatusCode"`
	StatusMessage string      `json:"StatusMessage"`
	Code          int         `json:"code"`
	Msg           string      `json:"msg"`
	Data          interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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