Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAtSomeones ¶
Types ¶
type Dingding ¶
func NewDingding ¶
type DingdingMessage ¶
type DingdingMessage struct { Message MarkdownMessage `json:"message"` Token string `json:"token"` }
DingdingMessage is a message holds all informations for a dingding sender
func (*DingdingMessage) Decode ¶
func (dm *DingdingMessage) Decode(data []byte) error
func (*DingdingMessage) Encode ¶
func (dm *DingdingMessage) Encode() []byte
type MarkdownMessage ¶
type MarkdownMessage struct { Type string `json:"msgtype,omitempty"` Markdown MarkdownMessageBody `json:"markdown,omitempty"` At MessageAtSomebody `json:"at,omitempty"` }
MarkdownMessage is a markdown message for dingding
func NewMarkdownMessage ¶
func NewMarkdownMessage(title string, body string, mobiles []string) MarkdownMessage
NewMarkdownMessage create a new MarkdownMessage
func (MarkdownMessage) Encode ¶
func (m MarkdownMessage) Encode() ([]byte, error)
Encode encode markdown message to json bytes
type MarkdownMessageBody ¶
type MarkdownMessageBody struct { Title string `json:"title,omitempty"` Text string `json:"text,omitempty"` MessageURL string `json:"messageUrl,omitempty"` }
MarkdownMessageBody is markdown body
type MessageAtSomebody ¶
MessageAtSomebody @ someone
Click to show internal directories.
Click to hide internal directories.