Documentation ¶
Index ¶
- Constants
- func DingMap() *dingMap
- func NewActionCardMsg(title, text string, opts ...actionCardOption) *actionCardMsg
- func NewDTMDMsg(title string, dtmdMap *dingMap, opts ...atOption) *markDownMsg
- func NewFeedCardMsg(feedCard []FeedCardLinkModel) *feedCardMsg
- func NewLinkMsg(title, text, picUrl, msgUrl string) *linkMsg
- func NewMarkDownMsg(title string, text interface{}, opts ...atOption) *markDownMsg
- func NewTextMsg(content string, opts ...atOption) *textMsg
- func WithAtAll() atOption
- func WithAtMobiles(mobiles []string) atOption
- func WithCardBtnVertical() actionCardOption
- func WithCardBtns(btns []ActionCardMultiBtnModel) actionCardOption
- func WithCardSingleTitle(title string) actionCardOption
- func WithCardSingleURL(url string) actionCardOption
- type ActionCardMultiBtnModel
- type DingTalk
- 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 MarkType
Constants ¶
View Source
const ( TEXT msgTypeType = "text" //text类型 LINK msgTypeType = "link" //link类型 MARKDOWN msgTypeType = "markdown" //markdown类型 ACTION_CARD msgTypeType = "actionCard" //ActionCard类型 FEED_CARD msgTypeType = "feedCard" //FeedCard类型 )
Variables ¶
This section is empty.
Functions ¶
func NewActionCardMsg ¶
func NewActionCardMsg(title, text string, opts ...actionCardOption) *actionCardMsg
func NewDTMDMsg ¶
func NewDTMDMsg(title string, dtmdMap *dingMap, opts ...atOption) *markDownMsg
func NewFeedCardMsg ¶
func NewFeedCardMsg(feedCard []FeedCardLinkModel) *feedCardMsg
func NewLinkMsg ¶
func NewLinkMsg(title, text, picUrl, msgUrl string) *linkMsg
func NewMarkDownMsg ¶
func NewMarkDownMsg(title string, text interface{}, opts ...atOption) *markDownMsg
func NewTextMsg ¶
func NewTextMsg(content string, opts ...atOption) *textMsg
func WithAtMobiles ¶
func WithAtMobiles(mobiles []string) atOption
func WithCardBtnVertical ¶
func WithCardBtnVertical() actionCardOption
func WithCardBtns ¶
func WithCardBtns(btns []ActionCardMultiBtnModel) actionCardOption
func WithCardSingleTitle ¶
func WithCardSingleTitle(title string) actionCardOption
func WithCardSingleURL ¶
func WithCardSingleURL(url string) actionCardOption
Types ¶
type ActionCardMultiBtnModel ¶
type DingTalk ¶
type DingTalk struct {
// contains filtered or unexported fields
}
func InitDingTalk ¶
func InitDingTalkWithSecret ¶
func (*DingTalk) SendActionCardMessage ¶
func (*DingTalk) SendActionCardMessageBySlice ¶
func (*DingTalk) SendDTMDMessage ¶
利用dtmd发送点击消息
func (*DingTalk) SendFeedCardMessage ¶
func (d *DingTalk) SendFeedCardMessage(feedCard []FeedCardLinkModel) error
func (*DingTalk) SendLinkMessage ¶
func (*DingTalk) SendMarkDownMessage ¶
func (DingTalk) SendMarkDownMessageBySlice ¶
func (*DingTalk) SendTextMessage ¶
type FeedCardLinkModel ¶
Click to show internal directories.
Click to hide internal directories.