Documentation ¶
Index ¶
- Constants
- Variables
- func New() alerter.Alerter
- func NewClient(opts *Options)
- func NewWithOptions(opts *Options) alerter.Alerter
- type ActionCard
- type At
- type AtOption
- type Button
- type ButtonOrientationType
- type Content
- type FeedCard
- type FeedCardLink
- type Link
- type Markdown
- type MsgType
- type Options
- type ResponseMsg
- type Text
Constants ¶
View Source
const ( DefaultDingHost = "https://oapi.dingtalk.com" DefaultDingUrl = "/robot/send" DefaultDingToken = "76f509430610108713fc835cf6e4cd460856c2e8d49f75e9e31bd04796be5f21" DefaultDingSecret = "SECed7b62be679450c4484799ea52d8cea2304e0b3b94b0618c0d587d45dd1f2c24" DefaultLevel = 0 )
Variables ¶
View Source
var Client *client
Functions ¶
func NewWithOptions ¶
Types ¶
type ActionCard ¶
type ActionCard struct { Title string `json:"title,omitempty"` Text string `json:"text,omitempty"` BtnOrientation ButtonOrientationType `json:"btnOrientation,omitempty"` SingleTitle string `json:"singleTitle,omitempty"` SingleURL string `json:"singleURL,omitempty"` Buttons []Button `json:"btns,omitempty"` }
type AtOption ¶
type AtOption interface {
// contains filtered or unexported methods
}
func WithAtMobiles ¶
func WithAtUsers ¶
type ButtonOrientationType ¶
type ButtonOrientationType string
const ( HORIZONTAL ButtonOrientationType = "0" // 横向 VERTICAL ButtonOrientationType = "1" // 竖向 )
type Content ¶
type Content struct { Type MsgType `json:"msgtype"` Text *Text `json:"text,omitempty"` Markdown *Markdown `json:"markdown,omitempty"` Link *Link `json:"link,omitempty"` ActionCard *ActionCard `json:"actionCard,omitempty"` FeedCard *FeedCard `json:"feedCard,omitempty"` At *At `json:"at,omitempty"` }
func NewMarkDown ¶
type FeedCard ¶
type FeedCard struct {
Links []FeedCardLink `json:"links,omitempty"`
}
type FeedCardLink ¶
type Options ¶
type Options struct { Host string `json:"host,omitempty"` Url string `json:"url,omitempty"` Token string `json:"token,omitempty"` Secret string `json:"secret,omitempty"` Level int `json:"level,omitempty"` }
func NewOptions ¶
func NewOptions() *Options
type ResponseMsg ¶
Click to show internal directories.
Click to hide internal directories.