dingding

package
v0.0.0-...-d369a32 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "dingding"
)

内置变量

Variables

This section is empty.

Functions

func New

func New(setting map[string]string) (sender.Sender, error)

New 创建一个微信消息发送器

Types

type Message

type Message struct {
	MsgType string `json:"msgtype"`
	Text    struct {
		Content string `json:"content"`
	} `json:"text,omitempty"`
}

Message entity post to dingding api

type Response

type Response struct {
	Token        string `json:"access_token"`
	ErrorMessage string `json:"errmsg"`
	ErrorCode    int    `json:"errcode"`
	TaskID       int    `json:"task_id"`
	RequestID    string `json:"request_id"`
	// contains filtered or unexported fields
}

Response is the access token used to send message to dingding

type Sender

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

Sender can send message to dingding

func (*Sender) Send

func (sender *Sender) Send(title, msg string, from string, receivers []string) (int, error)

Send 是对 Sender 的实现

Jump to

Keyboard shortcuts

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