normalize

package
v3.9.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeMentionsTextPrefix

func ComposeMentionsTextPrefix(mentions []types.Mention) string

ComposeMentionsTextPrefix builds a text prefix that renders as real Feishu mentions when prepended to a text-type outbound message (the <at ...> tag form).

func ComposePostMentionElements

func ComposePostMentionElements(mentions []types.Mention) []postElement

ComposePostMentionElements produces `at` elements to prepend to the first paragraph of a post body.

func ParseBotAdded

func ParseBotAdded(event *larkim.P2ChatMemberBotAddedV1) *types.BotAddedEvent

ParseBotAdded normalizes a P2ChatMemberBotAddedV1 event.

func ParseCardAction

func ParseCardAction(event *callback.CardActionTriggerEvent) *types.CardActionEvent

ParseCardAction normalizes a CardActionTriggerEvent.

func ParseComment

func ParseComment(event *larkevent.EventReq) *types.CommentEvent

ParseComment normalizes a drive.notice.comment_add_v1 event.

func ParseContent

func ParseContent(msgType string, content string) (string, []types.Resource)

ParseContent parses the message content based on the message type.

func ParseMP4Duration

func ParseMP4Duration(r io.ReadSeeker) (int, error)

ParseMP4Duration parses MP4 video duration (ms) by walking the ISO BMFF box hierarchy and finding `moov -> mvhd`.

func ParseMessage

func ParseMessage(event *larkim.P2MessageReceiveV1) *types.NormalizedMessage

ParseMessage normalizes a P2MessageReceiveV1 event.

func ParseOpusDuration

func ParseOpusDuration(r io.ReadSeeker) (int, error)

ParseOpusDuration parses Opus/OGG audio duration (ms) from an io.ReadSeeker. Scans backward for the last "OggS" page capture pattern.

func ParseReaction

func ParseReaction(event interface{}) *types.ReactionEvent

ParseReaction normalizes a message reaction event (Created or Deleted).

func SimpleMarkdownToPost

func SimpleMarkdownToPost(title, markdown string, mentions []types.Mention) (string, error)

SimpleMarkdownToPost converts a basic markdown string to Lark Post JSON string. It supports paragraphs and links in the format [text](url).

Types

This section is empty.

Jump to

Keyboard shortcuts

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