Documentation
¶
Index ¶
- Constants
- type ActionCardMsg
- type ActionCardMultiBtnModel
- type ActionCardOption
- type AtOption
- type DingMap
- type DingTalk
- func (d *DingTalk) OutGoing(r io.Reader) (outGoingMsg OutGoingModel, err error)
- func (d *DingTalk) SendActionCardMessage(title, text string, opts ...ActionCardOption) error
- func (d *DingTalk) SendActionCardMessageBySlice(title string, textList []string, opts ...ActionCardOption) error
- func (d *DingTalk) SendDTMDMessage(title string, dtmdMap *DingMap, opt ...AtOption) error
- func (d *DingTalk) SendFeedCardMessage(feedCard []FeedCardLinkModel) error
- func (d *DingTalk) SendLinkMessage(title, text, picURL, msgURL string) error
- func (d *DingTalk) SendMarkDownMessage(title, text string, opts ...AtOption) error
- func (d DingTalk) SendMarkDownMessageBySlice(title string, textList []string, opts ...AtOption) error
- func (d *DingTalk) SendTextMessage(content string, opt ...AtOption) error
- type FeedCardLinkModel
- type FeedCardMsg
- type LinkMsg
- type MarkDownMsg
- type MarkType
- type OutGoingModel
- type TextMsg
Constants ¶
const ( // TEXT 文本(text) TEXT msgTypeType = "text" // LINK 链接(link) LINK msgTypeType = "link" // MARKDOWN MARKDOWN MARKDOWN msgTypeType = "markdown" // ACTIONCARD ActionCard 整体跳转 独立跳转 ACTIONCARD msgTypeType = "actionCard" // FEEDCARD FEEDCARD FEEDCARD msgTypeType = "feedCard" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCardMsg ¶
type ActionCardMsg struct {
MsgType msgTypeType `json:"msgtype,omitempty"`
ActionCard actionCardModel `json:"actionCard,omitempty"`
}
ActionCardMsg ActionCardMsg
func NewActionCardMsg ¶
func NewActionCardMsg(title, text string, opts ...ActionCardOption) *ActionCardMsg
NewActionCardMsg NewActionCardMsg
type ActionCardMultiBtnModel ¶
type ActionCardMultiBtnModel struct {
Title string `json:"title,omitempty"`
ActionURL string `json:"actionURL,omitempty"`
}
ActionCardMultiBtnModel ActionCardMultiBtnModel
type ActionCardOption ¶
type ActionCardOption interface {
// contains filtered or unexported methods
}
ActionCardOption ActionCardOption
func WithCardBtnVertical ¶
func WithCardBtnVertical() ActionCardOption
WithCardBtnVertical WithCardBtnVertical
func WithCardBtns ¶
func WithCardBtns(btns []ActionCardMultiBtnModel) ActionCardOption
WithCardBtns WithCardBtns
func WithCardSingleTitle ¶
func WithCardSingleTitle(title string) ActionCardOption
WithCardSingleTitle WithCardSingleTitle
func WithCardSingleURL ¶
func WithCardSingleURL(url string) ActionCardOption
WithCardSingleURL WithCardSingleURL
type AtOption ¶
type AtOption interface {
// contains filtered or unexported methods
}
AtOption atOption
type DingTalk ¶
type DingTalk struct {
// contains filtered or unexported fields
}
DingTalk DingTalk
func InitDingTalk ¶
InitDingTalk InitDingTalk
func (*DingTalk) OutGoing ¶
func (d *DingTalk) OutGoing(r io.Reader) (outGoingMsg OutGoingModel, err error)
OutGoing OutGoing
func (*DingTalk) SendActionCardMessage ¶
func (d *DingTalk) SendActionCardMessage(title, text string, opts ...ActionCardOption) error
SendActionCardMessage SendActionCardMessage
func (*DingTalk) SendActionCardMessageBySlice ¶
func (d *DingTalk) SendActionCardMessageBySlice(title string, textList []string, opts ...ActionCardOption) error
SendActionCardMessageBySlice SendActionCardMessageBySlice
func (*DingTalk) SendDTMDMessage ¶
SendDTMDMessage 利用dtmd发送点击消息
func (*DingTalk) SendFeedCardMessage ¶
func (d *DingTalk) SendFeedCardMessage(feedCard []FeedCardLinkModel) error
SendFeedCardMessage SendFeedCardMessage
func (*DingTalk) SendLinkMessage ¶
SendLinkMessage SendLinkMessage
func (*DingTalk) SendMarkDownMessage ¶
SendMarkDownMessage SendMarkDownMessage
type FeedCardLinkModel ¶
type FeedCardLinkModel struct {
Title string `json:"title,omitempty"`
MessageURL string `json:"messageURL,omitempty"`
PicURL string `json:"picURL,omitempty"`
}
FeedCardLinkModel FeedCardLinkModel
type FeedCardMsg ¶
type FeedCardMsg struct {
MsgType msgTypeType `json:"msgtype,omitempty"`
FeedCard feedCardModel `json:"feedCard,omitempty"`
}
FeedCardMsg FeedCardMsg
func NewFeedCardMsg ¶
func NewFeedCardMsg(feedCard []FeedCardLinkModel) *FeedCardMsg
NewFeedCardMsg NewFeedCardMsg
type LinkMsg ¶
type LinkMsg struct {
MsgType msgTypeType `json:"msgtype,omitempty"`
Link linkModel `json:"link,omitempty"`
}
LinkMsg linkMsg
func NewLinkMsg ¶
NewLinkMsg NewLinkMsg
type MarkDownMsg ¶
type MarkDownMsg struct {
MsgType msgTypeType `json:"msgtype,omitempty"`
Markdown markDownModel `json:"markdown,omitempty"`
At atModel `json:"at,omitempty"`
}
MarkDownMsg MarkDownMsg
func NewDTMDMsg ¶
func NewDTMDMsg(title string, dtmdMap *DingMap, opts ...AtOption) *MarkDownMsg
NewDTMDMsg NewDTMDMsg
func NewMarkDownMsg ¶
func NewMarkDownMsg(title string, text interface{}, opts ...AtOption) *MarkDownMsg
NewMarkDownMsg NewMarkDownMsg
type MarkType ¶
type MarkType string
MarkType MarkType
const ( // H1 H1 H1 MarkType = "h1" // H2 H2 H2 MarkType = "h2" // H3 H3 H3 MarkType = "h3" // H4 H4 H4 MarkType = "h4" // H5 H5 H5 MarkType = "h5" // H6 H6 H6 MarkType = "h6" // RED RED RED MarkType = "red" // BLUE BLUE BLUE MarkType = "blue" // GREEN GREEN GREEN MarkType = "green" // GOLD GOLD GOLD MarkType = "gold" // N N N MarkType = "" )
type OutGoingModel ¶
type OutGoingModel struct {
AtUsers []struct {
DingtalkID string `json:"dingtalkId"`
} `json:"atUsers"`
ChatbotUserID string `json:"chatbotUserId"`
ConversationID string `json:"conversationId"`
ConversationTitle string `json:"conversationTitle"`
ConversationType string `json:"conversationType"`
CreateAt int64 `json:"createAt"`
IsAdmin bool `json:"isAdmin"`
IsInAtList bool `json:"isInAtList"`
MsgID string `json:"msgId"`
Msgtype string `json:"msgtype"`
SceneGroupCode string `json:"sceneGroupCode"`
SenderID string `json:"senderId"`
SenderNick string `json:"senderNick"`
SessionWebhook string `json:"sessionWebhook"`
SessionWebhookExpiredTime int64 `json:"sessionWebhookExpiredTime"`
Text struct {
Content string `json:"content"`
} `json:"text"`
}
OutGoingModel OutGoingModel









