Discover Packages
github.com/clickvisual/clickvisual
api
internal
service
alarm
pusher
feishu
package
Version:
v1.0.0-rc8
Opens a new window with list of versions in this module.
Published: Oct 24, 2023
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package feishu @Author arthur 09:51:00
Package feishu @Author arthur 09:47:00
Package feishu @Author arthur 09:49:00
GenSign 生成消息摘要
generates message digest
func SendMsg(webhook string , v interface{}) (response interface{}, isErrResponse bool , err error )
type Actions struct {
Actions []ActionsItem `json:"actions"`
}
type ActionsItem struct {
Tag string `json:"tag"`
Text struct {
Content string `json:"content"`
Tag string `json:"tag"`
} `json:"text"`
URL string `json:"url"`
Type string `json:"type"`
Value struct {
} `json:"value"`
}
type Body struct {
Content string `json:"content,omitempty"`
Tag string `json:"tag,omitempty"`
}
type Card struct {
Config Config `json:"config,omitempty"`
Elements []Element `json:"elements,omitempty"`
}
type CardMsg struct {
*Sign
MsgType string `json:"msg_type,omitempty"`
Card Card `json:"card,omitempty"`
}
AddAtAll 增加一个@全体的功能
Add an @All function
AddElement 添加一个内容,内容的格式为markdown形式
Add a content in markdown format
AddUrl 增加一个url的内容
Add the content of url
type Config struct {
WideScreenMode bool `json:"wide_screen_mode,omitempty"`
EnableForward bool `json:"enable_forward,omitempty"`
}
type Element struct {
Tag string `json:"tag,omitempty"`
*Body `json:"text"`
*Actions
}
type ErrResponse struct {
Code int `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
}
ErrResponse 返回的错误信息
error message returned
type Response struct {
StatusCode int
StatusMessage string
}
Response 成功发送之后的消息
Message after successfully sent
type Sign struct {
Timestamp string `json:"timestamp,omitempty"`
Sign string `json:"sign,omitempty"`
}
Sign 签名
NewSign 创建一个新的签名
Create a new signature
Source Files
¶
Click to show internal directories.
Click to hide internal directories.