Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMessage ¶
func NewMessage(content Content) reporter.Message
func NewReporter ¶
Example ¶
reporter := NewReporter("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=18da439d-bda9-43cd-a76a-f3b04b730d60") if err := reporter.Report(context.Background(), NewMessage(NewText("hello,world"))); err != nil { log.Fatalf("report the message error: %s", err) }
Output:
Types ¶
type Content ¶
type Content interface { Type() string Body() interface{} }
func NewImageFromBytes ¶
func NewMarkdown ¶
func NewText ¶
func NewText(content string, opts ...TextOption) Content
type TextOption ¶
type TextOption func(t *text)
func MentionedList ¶
func MentionedList(l ...string) TextOption
func MentionedMobileList ¶
func MentionedMobileList(l ...string) TextOption
Click to show internal directories.
Click to hide internal directories.