Documentation
¶
Index ¶
- func ComposeMentionsTextPrefix(mentions []types.Mention) string
- func ComposePostMentionElements(mentions []types.Mention) []postElement
- func ParseBotAdded(event *larkim.P2ChatMemberBotAddedV1) *types.BotAddedEvent
- func ParseCardAction(event *callback.CardActionTriggerEvent) *types.CardActionEvent
- func ParseComment(event *larkevent.EventReq) *types.CommentEvent
- func ParseContent(msgType string, content string) (string, []types.Resource)
- func ParseMP4Duration(r io.ReadSeeker) (int, error)
- func ParseMessage(event *larkim.P2MessageReceiveV1) *types.NormalizedMessage
- func ParseOpusDuration(r io.ReadSeeker) (int, error)
- func ParseReaction(event interface{}) *types.ReactionEvent
- func SimpleMarkdownToPost(title, markdown string, mentions []types.Mention) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeMentionsTextPrefix ¶
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 ¶
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 ¶
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).
Types ¶
This section is empty.