ding

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

*

  • @api post model. *
  • User: yunshengzhu
  • Date: 2020/7/31
  • Time: 3:00 下午

*

  • @api post model. *
  • User: yunshengzhu
  • Date: 2020/7/31
  • Time: 3:26 下午

*

  • @api post model. *
  • User: yunshengzhu
  • Date: 2020/7/31
  • Time: 3:02 下午

*

  • @api post model. *
  • User: yunshengzhu
  • Date: 2020/7/31
  • Time: 3:03 下午

*

  • @api post model. *
  • User: yunshengzhu
  • Date: 2020/7/31
  • Time: 3:04 下午

*

  • @api post model. *
  • User: yunshengzhu
  • Date: 2020/7/31
  • Time: 2:59 下午

Index

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 DingMap

func DingMap() *dingMap

func GetBlockHeight

func GetBlockHeight(url string) (int64, error)

func GetBlockHeightNumber

func GetBlockHeightNumber(url string, heightBlock int64) (b block, err error)

func NewActionCardMsg

func NewActionCardMsg(title, text string, opts ...actionCardOption) *actionCardMsg

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 WithAtAll

func WithAtAll() atOption

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 ActionCardMultiBtnModel struct {
	Title     string `json:"title,omitempty"`
	ActionURL string `json:"actionURL,omitempty"`
}

type ChainResp

type ChainResp struct {
	Code int `json:"code"`
	Data struct {
		Count int64 `json:"count"`
		List  []struct {
			BlockHeight int64 `json:"blockHeight"`
		} `json:"list"`
	} `json:"data"`
}

type DingTalk

type DingTalk struct {
	// contains filtered or unexported fields
}

func InitDingTalk

func InitDingTalk(tokens []string, key string) *DingTalk

func (*DingTalk) OutGoing

func (d *DingTalk) OutGoing(r io.Reader) (outGoing outGoingModel, err error)

func (*DingTalk) SendActionCardMessage

func (d *DingTalk) SendActionCardMessage(title, text string, opts ...actionCardOption) error

func (*DingTalk) SendActionCardMessageBySlice

func (d *DingTalk) SendActionCardMessageBySlice(title string, textList []string, opts ...actionCardOption) error

func (*DingTalk) SendFeedCardMessage

func (d *DingTalk) SendFeedCardMessage(feedCard []FeedCardLinkModel) error

func (*DingTalk) SendLinkMessage

func (d *DingTalk) SendLinkMessage(title, text, picUrl, msgUrl string) error

func (*DingTalk) SendMarkDownMessage

func (d *DingTalk) SendMarkDownMessage(title, text string, opts ...atOption) error

func (DingTalk) SendMarkDownMessageBySlice

func (d DingTalk) SendMarkDownMessageBySlice(title string, textList []string, opts ...atOption) error

func (*DingTalk) SendTextMessage

func (d *DingTalk) SendTextMessage(content string, opt ...atOption) error

type FeedCardLinkModel

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

type MarkType

type MarkType string
const (
	H1    MarkType = "h1"
	H2    MarkType = "h2"
	H3    MarkType = "h3"
	H4    MarkType = "h4"
	H5    MarkType = "h5"
	H6    MarkType = "h6"
	RED   MarkType = "red"
	BLUE  MarkType = "blue"
	GREEN MarkType = "green"
	GOLD  MarkType = "gold"
	N     MarkType = ""
)

type TokenTxIdResp

type TokenTxIdResp struct {
	Code int `json:"code"`
	Data struct {
		Count int64 `json:"count"`
	} `json:"data"`
}

func GetTokenTxId

func GetTokenTxId(url string, txId string) (b TokenTxIdResp, err error)

Jump to

Keyboard shortcuts

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