Documentation
¶
Index ¶
Constants ¶
const PlatformID = "feishu"
Variables ¶
This section is empty.
Functions ¶
func BuildPostContent ¶
BuildPostContent wraps a markdown string into a Feishu post message content JSON. The resulting string is suitable for use as the content field with msg_type "post". Each line is placed in its own paragraph row so that newlines render correctly.
func ExtractContext ¶ added in v0.0.31
func NewPlatform ¶
NewPlatform constructs a FeishuPlatform from configuration.
Types ¶
type FeishuPlatform ¶
type FeishuPlatform struct {
// contains filtered or unexported fields
}
FeishuPlatform implements platform.Platform for Feishu/Lark.
func (*FeishuPlatform) ID ¶
func (f *FeishuPlatform) ID() string
func (*FeishuPlatform) Receiver ¶
func (f *FeishuPlatform) Receiver() platform.PlatformReceiverAdapter
func (*FeishuPlatform) Sender ¶
func (f *FeishuPlatform) Sender() platform.PlatformSenderAdapter
type FeishuReceiver ¶
type FeishuReceiver struct {
// contains filtered or unexported fields
}
FeishuReceiver connects to Feishu via WebSocket and dispatches inbound messages.
func (*FeishuReceiver) Start ¶
func (r *FeishuReceiver) Start(ctx context.Context, dispatch func(platform.InboundMessage)) error
type FeishuSender ¶
type FeishuSender struct {
// contains filtered or unexported fields
}
FeishuSender sends messages via the Feishu IM API.
func (*FeishuSender) Send ¶
func (s *FeishuSender) Send(ctx context.Context, msg platform.OutboundMessage) error
type MediaKeyInfo ¶
MediaKeyInfo holds a file key and optional file name from a post media element.
type PostParseResult ¶
type PostParseResult struct {
TextContent string
ImageKeys []string
MediaKeys []MediaKeyInfo
}
PostParseResult contains the parsed output of a Feishu post (rich text) message.
func ParsePostContent ¶
func ParsePostContent(content string) (*PostParseResult, error)
ParsePostContent parses a Feishu post message content string into structured data. Tries three formats: direct, locale-wrapped, double-wrapped (post > locale).