dingtalk

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 14 Imported by: 1

README

dingtalk暂停维护

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionCard

type ActionCard struct {
	Title          string            `json:"title,omitempty"`
	Text           string            `json:"text,omitempty"`
	SingleTitle    string            `json:"singleTitle,omitempty"`
	SingleURL      string            `json:"singleURL,omitempty"`
	HideAvatar     string            `json:"hideAvatar,omitempty"`
	BtnOrientation string            `json:"btnOrientation,omitempty"`
	Btns           map[string]string `json:"btns,omitempty"`
}

ActionCard 整体跳转actionCard类型

type At

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

type FeedCard

type FeedCard struct {
	Links []Link `json:"links,omitempty"`
}

FeedCard feedCard类型

type Link struct {
	Title      string `json:"title,omitempty"`
	Text       string `json:"title,omitempty"`
	MessageURL string `json:"messageURL,omitempty"`
	PicURL     string `json:"picURL,omitempty"`
}

Link feedCard类型 links 参数

type Markdown

type Markdown struct {
	Title string `json:"title,omitempty"`
	Text  string `json:"text,omitempty"`
}

type Message

type Message struct {
	MsgType string `json:"msgtype"`
	At      At     `json:"at,omitempty"`

	Text       *Text       `json:"text,omitempty"`
	Markdown   *Markdown   `json:"markdown,omitempty"`
	Link       *Link       `json:"link,omitempty"`
	ActionCard *ActionCard `json:"actionCard,omitempty"`
	FeedCard   *FeedCard   `json:"feedCard,omitempty"`
}

Message 基础消息结构

func NewActionCardMessage

func NewActionCardMessage(card *ActionCard) *Message

NewActionCardMessage 新建 actionCard 类型消息

func NewEmptyMessage

func NewEmptyMessage() *Message

新建 empty 类型

func NewFeedCardMessage

func NewFeedCardMessage(links []Link) *Message

新建 feedCard 类型

func NewLinkMessage

func NewLinkMessage(title, text, msgUrl, picUrl string) *Message

NewLinkMessage 新建 link 类型消息

func NewMarkdownMessage

func NewMarkdownMessage(title, text string) *Message

NewMarkdownMessage 新建 markdown 类型消息

func NewTextMessage

func NewTextMessage(content string) *Message

NewTextMessage 新建 text 类型消息

func (*Message) AtAll

func (msg *Message) AtAll()

func (*Message) AtMobiles

func (msg *Message) AtMobiles(mobiles []string)

type Result

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

type Text

type Text struct {
	Content string `json:"content,omitempty"`
}

Text text类型

Jump to

Keyboard shortcuts

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