Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapFileNameBytes ¶
CapFileNameBytes truncates name to at most maxBytes bytes while preserving a short extension (≤16 bytes) when present and never splitting a UTF-8 rune.
func SanitizeFileNamePart ¶
SanitizeFileNamePart keeps Unicode letters/digits plus `._-` and replaces everything else with '_'. Leading / trailing punctuation is trimmed so the result is safe to embed as one segment in a generated filename.
Types ¶
type EventHandler ¶
type MediaPayload ¶
MediaPayload describes one outbound media attachment. Exactly one of URL or Path should be set by callers. URL is used for externally hosted media; Path is used for already downloaded local files.
type MediaReplier ¶
type MediaReplier interface {
Replier
ReplyMedia(ctx context.Context, messageID string, media MediaPayload) error
}
MediaReplier is an optional extension implemented by platforms that can send native media messages. Callers should type-assert this interface and fall back to ReplyText when a platform does not support it.
type Message ¶
type Message struct {
Platform Platform
MessageID string
ParentID string
RootID string
ChatID string
ChatType ChatType
SenderID string
MessageType string
Content string
// CreateTime / UpdateTime keep the raw platform timestamp strings for
// prompt-template compatibility. ReceivedAt is when Quartet accepted the
// message; EventTime is the parsed platform event time when available.
CreateTime string
UpdateTime string
ReceivedAt time.Time
EventTime time.Time
Mentions []Mention
RawEvent []byte
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package media owns platform-agnostic IM attachment directories.
|
Package media owns platform-agnostic IM attachment directories. |
|
Package wechat provides personal-WeChat integration via the iLink protocol.
|
Package wechat provides personal-WeChat integration via the iLink protocol. |
|
cdn
Package cdn talks to the WeChat C2C CDN: encrypts files locally with AES-128-ECB, hands them to the upload endpoint, and inverts the flow on the download side.
|
Package cdn talks to the WeChat C2C CDN: encrypts files locally with AES-128-ECB, hands them to the upload endpoint, and inverts the flow on the download side. |