dingtalk

package
v3.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTokensEmpty

func IsTokensEmpty(tokens []string) bool

Types

type Dingtalk

type Dingtalk struct {
	Ding      *ding.DingTalk
	Tokens    []string // Tokens 单个机器人有单位时间内消息条数的限制,如果有需要可以初始化多个token,发消息时随机发给其中一个机器人。
	AtMobiles []string // 可选参数 @指定群成员
	AtAll     bool     // 可选参数 @所有人
	Range     string   // 漏洞通知范围,默认 high,critical
}

func New

func New(tokens, atMobiles []string, rang string, atAll bool) (*Dingtalk, error)

func (*Dingtalk) IsAtMobilesEmpty

func (d *Dingtalk) IsAtMobilesEmpty() bool

func (*Dingtalk) MarkdownText

func (d *Dingtalk) MarkdownText(id, severity, url string) []string

func (*Dingtalk) SendMarkDownMessageBySlice

func (d *Dingtalk) SendMarkDownMessageBySlice(title string, mkcontent []string) error

func (*Dingtalk) Severity

func (d *Dingtalk) Severity(s string) string

Jump to

Keyboard shortcuts

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