MCPcopy
hub / github.com/larksuite/cli / EventProcessor

Interface EventProcessor

shortcuts/event/processor.go:48–62  ·  view source on GitHub ↗

EventProcessor defines the processing strategy for each event type. Each processor implements its own Transform logic supporting Raw/Compact modes. The framework decides which mode to pass based on CLI flags; the processor decides the output format for that mode. Raw mode: return raw (the complete

Source from the content-addressed store, hash-verified

46// Compact mode: return a flat map[string]interface{} ready for JSON serialization,
47// including semantic fields like "type", "id", "from", "to" plus domain-specific fields.
48type EventProcessor interface {
49 // EventType returns the event type handled, e.g. "im.message.receive_v1".
50 // The fallback processor returns an empty string.
51 EventType() string
52
53 // Transform converts raw event data to the target format.
54 // The returned value is serialized directly to JSON by the pipeline.
55 Transform(ctx context.Context, raw *RawEvent, mode TransformMode) interface{}
56
57 // DeduplicateKey returns a deduplication key. Empty string means no dedup.
58 DeduplicateKey(raw *RawEvent) string
59
60 // WindowStrategy returns window configuration. Zero value means disabled.
61 WindowStrategy() WindowConfig
62}

Implementers 8

ImChatUpdatedProcessorshortcuts/event/processor_im_chat.go
ImChatDisbandedProcessorshortcuts/event/processor_im_chat.go
ImMessageReactionProcessorshortcuts/event/processor_im_message_r
ImMessageProcessorshortcuts/event/processor_im_message.g
ImMessageReadProcessorshortcuts/event/processor_im_message_r
GenericProcessorshortcuts/event/processor_generic.go
ImChatBotProcessorshortcuts/event/processor_im_chat_memb
ImChatMemberUserProcessorshortcuts/event/processor_im_chat_memb

Calls

no outgoing calls

Tested by

no test coverage detected