waflog

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package waflog encapsulates getting logs from a WAF to compare with expected results

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FTWLogLines

type FTWLogLines struct {
	LogMarkerHeaderName []byte
	StartMarker         []byte
	EndMarker           []byte
	// contains filtered or unexported fields
}

FTWLogLines represents the filename to search for logs in a certain timespan

func NewFTWLogLines

func NewFTWLogLines(cfg *config.FTWConfiguration) (*FTWLogLines, error)

NewFTWLogLines is the base struct for reading the log file

func (*FTWLogLines) CheckLogForMarker

func (ll *FTWLogLines) CheckLogForMarker(stageID string, readLimit int) []byte

CheckLogForMarker reads the log file and searches for a marker line. stageID is the ID of the current stage, which is part of the marker line readLimit is the maximum numbers of lines to check

func (*FTWLogLines) Cleanup

func (ll *FTWLogLines) Cleanup() error

Cleanup closes the log file

func (*FTWLogLines) Contains

func (ll *FTWLogLines) Contains(match string) bool

Contains looks in logfile for regex

func (*FTWLogLines) WithEndMarker added in v0.4.5

func (ll *FTWLogLines) WithEndMarker(marker []byte)

WithEndMarker sets the end marker for the log file

func (*FTWLogLines) WithStartMarker added in v0.4.5

func (ll *FTWLogLines) WithStartMarker(marker []byte)

WithStartMarker sets the start marker for the log file

Jump to

Keyboard shortcuts

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