Documentation
¶
Index ¶
- type ActionCard
- type ActionCardMessage
- func (m *ActionCardMessage) SetIndependentJump(title string, text string, btns []Btn, btnOrientation string, ...) *ActionCardMessage
- func (m *ActionCardMessage) SetOverallJump(title string, text string, singleTitle string, singleURL string, ...) *ActionCardMessage
- func (m *ActionCardMessage) ToByte() ([]byte, error)
- type At
- type Btn
- type Client
- type FeedCard
- type FeedCardLink
- type FeedCardMessage
- type Link
- type LinkMessage
- type Markdown
- type MarkdownMessage
- type Message
- type MsgType
- type Response
- type Text
- type TextMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCard ¶
type ActionCard struct {
Title string `json:"title"`
Text string `json:"text"`
SingleTitle string `json:"singleTitle"`
SingleURL string `json:"singleURL"`
Btns []Btn `json:"btns"`
BtnOrientation string `json:"btnOrientation"`
HideAvatar string `json:"hideAvatar"`
}
ActionCard actionCard struct
type ActionCardMessage ¶
type ActionCardMessage struct {
MsgType MsgType `json:"msgtype"`
ActionCard ActionCard `json:"actionCard"`
}
ActionCardMessage struct
func NewActionCardMessage ¶
func NewActionCardMessage() *ActionCardMessage
NewActionCardMessage new message
func (*ActionCardMessage) SetIndependentJump ¶
func (m *ActionCardMessage) SetIndependentJump( title string, text string, btns []Btn, btnOrientation string, hideAvatar string) *ActionCardMessage
SetIndependentJump set independent jump actionCard
func (*ActionCardMessage) SetOverallJump ¶
func (m *ActionCardMessage) SetOverallJump( title string, text string, singleTitle string, singleURL string, btnOrientation string, hideAvatar string) *ActionCardMessage
SetOverallJump set overall jump actionCard
func (*ActionCardMessage) ToByte ¶
func (m *ActionCardMessage) ToByte() ([]byte, error)
ToByte to byte
type FeedCard ¶
type FeedCard struct {
Links []FeedCardLink `json:"links"`
}
FeedCard feedCard struct
type FeedCardLink ¶
type FeedCardLink struct {
Title string `json:"title"`
PicURL string `json:"picURL"`
MessageURL string `json:"messageURL"`
}
FeedCardLink struct
type FeedCardMessage ¶
type FeedCardMessage struct {
MsgType MsgType `json:"msgtype"`
FeedCard FeedCard `json:"feedCard"`
}
FeedCardMessage feed message struct
func (*FeedCardMessage) AppendLink ¶
func (m *FeedCardMessage) AppendLink( title string, messageURL string, picURL string) *FeedCardMessage
AppendLink append link
type Link ¶
type Link struct {
Title string `json:"title"`
Text string `json:"text"`
PicURL string `json:"picUrl"`
MessageURL string `json:"messageUrl"`
}
Link link struct
type LinkMessage ¶
LinkMessage link message struct
func (*LinkMessage) SetLink ¶
func (m *LinkMessage) SetLink( title string, text string, picURL string, messageURL string) *LinkMessage
SetLink set link
type MarkdownMessage ¶
type MarkdownMessage struct {
MsgType MsgType `json:"msgtype"`
Markdown Markdown `json:"markdown"`
At At `json:"at"`
}
MarkdownMessage markdown message struct
func (*MarkdownMessage) SetAt ¶
func (m *MarkdownMessage) SetAt(atMobiles []string, isAtAll bool) *MarkdownMessage
SetAt set at
func (*MarkdownMessage) SetMarkdown ¶
func (m *MarkdownMessage) SetMarkdown(title string, text string) *MarkdownMessage
SetMarkdown set markdown
type MsgType ¶
type MsgType string
MsgType message type enum
const ( // MsgTypeText text MsgTypeText MsgType = "text" // MsgTypeMarkdown markdown MsgTypeMarkdown MsgType = "markdown" // MsgTypeLink link MsgTypeLink MsgType = "link" // MsgTypeActionCard actionCard MsgTypeActionCard MsgType = "actionCard" // MsgTypeFeedCard feedCard MsgTypeFeedCard MsgType = "feedCard" )
type TextMessage ¶
type TextMessage struct {
MsgType MsgType `json:"msgtype"`
Text Text `json:"text"`
At At `json:"at"`
}
TextMessage text message struct
func (*TextMessage) SetAt ¶
func (m *TextMessage) SetAt(atMobiles []string, isAtAll bool) *TextMessage
SetAt set at
func (*TextMessage) SetContent ¶
func (m *TextMessage) SetContent(content string) *TextMessage
SetContent set content
Click to show internal directories.
Click to hide internal directories.