Debian Codegraph @

pkg/services/chat/wecom/doc.go

raw
1 /*
2 Package wecom provides notification support for WeChat Work (WeCom) webhook bots.
3
4 This package implements the Shoutrrr service interface for sending notifications
5 to WeChat Work groups via webhook bots. It supports:
6
7 - Text message notifications up to 4096 characters
8 - User mentions using @username or mobile numbers
9 - Custom webhook bot integration
10 - Comprehensive error handling and validation
11
12 # URL Format
13
14 wecom://WEBHOOK_KEY
15
16 # Example Usage
17
18 import "github.com/nicholas-fedor/shoutrrr"
19
20 // Send a simple message
21 url := "wecom://693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
22 err := shoutrrr.Send(url, "Hello from Shoutrrr!")
23
24 // Send with mentions
25 url := "wecom://693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa?mentioned_list=@all"
26 err := shoutrrr.Send(url, "Alert message")
27
28 # Setup
29
30 1. Create a webhook bot in WeChat Work
31 2. Copy the webhook URL key (the part after ?key=)
32 3. Use the key in your Shoutrrr URL: wecom://YOUR_KEY
33
34 For more information, see: https://developer.work.weixin.qq.com/document/path/99110
35 */
36 package wecom