dingding

package module
v0.0.0-...-9b1b795 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 16 Imported by: 0

README

钉钉调用机器人


ctrl c/v永不过时 !!!

├─dingding.go          实现钉钉接口以及发送消息类
├─ex.go                扩展方法

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FloatDecimal

func FloatDecimal(data float64) int64

func StrToInt64

func StrToInt64(str string) int64

Types

type Config

type Config struct {
	Secret    string   `yaml:"Secret" json:"Secret,omitempty"`       // 密钥
	Urls      string   `yaml:"Urls" json:"Urls,omitempty"`           // 路径
	AtMobiles []string `yaml:"AtMobiles" json:"AtMobiles,omitempty"` // @的手机号(固定)
	AtUserIds []string `yaml:"AtUserIds" json:"AtUserIds,omitempty"` // @的用户id(固定)
	Interval  int64    `yaml:"Interval" json:"Interval,omitempty"`   // 相同信息发送间隔,单位:(秒)
}

Config 钉钉配置

type DingSrv

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

func NewDingSrv

func NewDingSrv(opt *Config) *DingSrv

func (*DingSrv) Close

func (d *DingSrv) Close()

func (*DingSrv) DingdingDirectSend

func (d *DingSrv) DingdingDirectSend(message string, opt ...Option) (bool, error)

DingdingDirectSend 直接发送消息

func (*DingSrv) DingdingSend

func (d *DingSrv) DingdingSend(message string)

DingdingSend 发送文本类小时

type Option

type Option struct {
	AtMobiles []string // @的手机号(额外添加)
	AtUserIds []string // @的用户id(额外添加)
	// contains filtered or unexported fields
}

Option 发送小时时可以支持的额外参数

type PanicInfo

type PanicInfo struct {
	Ty     string
	Method string
	Line   string
}

func GetPanicInfo

func GetPanicInfo(content string) *PanicInfo

type ResultForDingDing

type ResultForDingDing struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
}

Jump to

Keyboard shortcuts

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