feat: message parser with json/regex/text modes
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package parser
|
||||
|
||||
type TextParser struct{}
|
||||
|
||||
func (p *TextParser) Parse(body []byte) (*ParsedMessage, error) {
|
||||
return &ParsedMessage{
|
||||
Event: "default", // text mode has no explicit event
|
||||
Data: map[string]interface{}{"Body": string(body)},
|
||||
Body: string(body),
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user