Documentation ¶
Index ¶
- func CheckPantherMultiline(t *testing.T, logs string, parser parsers.LogParser, ...)
- func CheckPantherParser(t *testing.T, log string, parser parsers.LogParser, expect *parsers.PantherLog, ...)
- func CheckParserSamplesJSONL(t *testing.T, filename string, parser parsers.LogParser)
- func EqualPantherLog(t *testing.T, expectedEvent *parsers.PantherLog, events []*parsers.PantherLog, ...)
- func MustReadFileJSONLines(filename string) (lines []string)
- func MustReadFileString(filename string) string
- func NewRawMessage(jsonString string) *jsoniter.RawMessage
- type MockParser
- type ParserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPantherMultiline ¶ added in v1.5.0
func CheckPantherParser ¶ added in v1.1.0
func CheckPantherParser(t *testing.T, log string, parser parsers.LogParser, expect *parsers.PantherLog, expectMore ...*parsers.PantherLog)
func CheckParserSamplesJSONL ¶ added in v1.7.0
func EqualPantherLog ¶
func EqualPantherLog(t *testing.T, expectedEvent *parsers.PantherLog, events []*parsers.PantherLog, parseErr error)
For new parser tests use `CheckPantherParser` instead Used by log parsers to validate records
func MustReadFileJSONLines ¶ added in v1.2.1
func MustReadFileString ¶ added in v1.2.1
func NewRawMessage ¶ added in v1.6.0
func NewRawMessage(jsonString string) *jsoniter.RawMessage
Types ¶
type MockParser ¶ added in v1.5.1
func AlwaysFailParser ¶ added in v1.5.1
func AlwaysFailParser(err error) *MockParser
func (*MockParser) ParseLog ¶ added in v1.5.1
func (p *MockParser) ParseLog(log string) ([]*parsers.Result, error)
func (*MockParser) RequireLessOrEqualNumberOfCalls ¶ added in v1.5.1
func (p *MockParser) RequireLessOrEqualNumberOfCalls(t *testing.T, method string, number int)
type ParserConfig ¶ added in v1.5.1
type ParserConfig map[string]interface{}
func (ParserConfig) Parser ¶ added in v1.5.1
func (args ParserConfig) Parser() *MockParser
Click to show internal directories.
Click to hide internal directories.