feishu

package
v0.0.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 28 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PlatformID = "feishu"

Variables

This section is empty.

Functions

func BuildPostContent

func BuildPostContent(markdown string) string

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 ExtractContext(raw string) string

func NewPlatform

func NewPlatform(cfg config.FeishuConfig, mediaSvc *media.Service) platform.Platform

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 (*FeishuPlatform) Sender

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

type MediaKeyInfo

type MediaKeyInfo struct {
	FileKey  string
	FileName string
}

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL