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 RegisterCommand(name string, execFunc ExecFunc, arity int, isAdmin bool)
- 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
- func WithInitSendTimeout(v time.Duration) initOption
- type ActionCardMultiBtnModel
- 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) SendActionCardMessageBySliceWithCtx(ctx context.Context, title string, textList []string, opts ...actionCardOption) error
- func (d *DingTalk) SendActionCardMessageWithCtx(ctx context.Context, title, text string, opts ...actionCardOption) error
- func (d *DingTalk) SendDTMDMessage(title string, dtmdMap *dingMap, opt ...atOption) error
- func (d *DingTalk) SendDTMDMessageWithCtx(ctx context.Context, title string, dtmdMap *dingMap, opt ...atOption) error
- func (d *DingTalk) SendFeedCardMessage(feedCard []FeedCardLinkModel) error
- func (d *DingTalk) SendFeedCardMessageWithCtx(ctx context.Context, feedCard []FeedCardLinkModel) error
- func (d *DingTalk) SendLinkMessage(title, text, picUrl, msgUrl string) error
- func (d *DingTalk) SendLinkMessageWithCtx(ctx context.Context, 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) SendMarkDownMessageBySliceWithCtx(ctx context.Context, title string, textList []string, opts ...atOption) error
- func (d *DingTalk) SendMarkDownMessageWithCtx(ctx context.Context, title, text string, opts ...atOption) error
- func (d *DingTalk) SendTextMessage(content string, opt ...atOption) error
- func (d *DingTalk) SendTextMessageWithCtx(ctx context.Context, content string, opt ...atOption) error
- type ExecFunc
- type FeedCardLinkModel
- type MarkType
- type OutGoingHandler
Constants ¶
View Source
const ( TEXT msgTypeType = "text" LINK msgTypeType = "link" MARKDOWN msgTypeType = "markdown" ACTION_CARD msgTypeType = "actionCard" FEED_CARD msgTypeType = "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 RegisterCommand ¶
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
func WithInitSendTimeout ¶
Types ¶
type ActionCardMultiBtnModel ¶
type DingTalk ¶
type DingTalk struct { InitModel initModel // contains filtered or unexported fields }
func InitDingTalk ¶
func InitDingTalkWithSecret ¶
func (*DingTalk) SendActionCardMessage ¶
func (*DingTalk) SendActionCardMessageBySlice ¶
func (*DingTalk) SendActionCardMessageBySliceWithCtx ¶
func (*DingTalk) SendActionCardMessageWithCtx ¶
func (*DingTalk) SendDTMDMessage ¶
SendDTMDMessage 利用dtmd发送点击消息
func (*DingTalk) SendDTMDMessageWithCtx ¶
func (d *DingTalk) SendDTMDMessageWithCtx(ctx context.Context, title string, dtmdMap *dingMap, opt ...atOption) error
SendDTMDMessageWithCtx 利用dtmd发送点击消息
func (*DingTalk) SendFeedCardMessage ¶
func (d *DingTalk) SendFeedCardMessage(feedCard []FeedCardLinkModel) error
func (*DingTalk) SendFeedCardMessageWithCtx ¶
func (d *DingTalk) SendFeedCardMessageWithCtx(ctx context.Context, feedCard []FeedCardLinkModel) error
func (*DingTalk) SendLinkMessage ¶
func (*DingTalk) SendLinkMessageWithCtx ¶
func (*DingTalk) SendMarkDownMessage ¶
func (*DingTalk) SendMarkDownMessageBySlice ¶
func (*DingTalk) SendMarkDownMessageBySliceWithCtx ¶
func (*DingTalk) SendMarkDownMessageWithCtx ¶
func (*DingTalk) SendTextMessage ¶
type FeedCardLinkModel ¶
type OutGoingHandler ¶
type OutGoingHandler struct{}
func (*OutGoingHandler) ServeHTTP ¶
func (h *OutGoingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.