dingtalk

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MsgTypeText     = "text"
	MsgTypeMarkdown = "markdown"
)
View Source
const Addr = "https://oapi.dingtalk.com/robot/send"

Variables

This section is empty.

Functions

func SendMessage

func SendMessage(c *httpx.Client, token, secret, text string) error

func SendMessageWithMap

func SendMessageWithMap(c *httpx.Client, token, secret string, data map[string]interface{}) error

func SendMessageWithReq

func SendMessageWithReq(c *httpx.Client, token, secret string, req *MessageReq) error

Types

type MessageAt

type MessageAt struct {
	AtMobiles []string `json:"atMobiles,omitempty"`
	AtUserIds []string `json:"atUserIds,omitempty"`
	IsAtAll   bool     `json:"isAtAll,omitempty"`
}

type MessageMarkdown

type MessageMarkdown struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type MessageReq

type MessageReq struct {
	MsgType string     `json:"msgtype"`
	At      *MessageAt `json:"at,omitempty"`

	Text     *MessageText     `json:"text,omitempty"`
	Markdown *MessageMarkdown `json:"markdown,omitempty"`
}

type MessageResp

type MessageResp struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type MessageText

type MessageText struct {
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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