test

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MARGECELL = 2 // marge top/bottom of cell

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Case

type Case struct {
	Payloads       []string `yaml:"payload"`
	Encoders       []string `yaml:"encoder"`
	Placeholders   []string `yaml:"placeholder"`
	Set            string
	Name           string
	IsTruePositive bool
}

func Load

func Load(cfg *config.Config, logger *log.Logger) ([]Case, error)

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(tests []Case) *DB

func (*DB) ExportPayloads

func (db *DB) ExportPayloads(payloadsExportFile string) error

func (*DB) ExportToPDF

func (db *DB) ExportToPDF(reportFile string, reportTime time.Time, wafName, url string, rows [][]string) error

func (*DB) GetTestCases

func (db *DB) GetTestCases() []Case

func (*DB) RenderTable

func (db *DB) RenderTable(reportTime time.Time, wafName string) ([][]string, error)

func (*DB) UpdateFailedTests

func (db *DB) UpdateFailedTests(t *Info)

func (*DB) UpdateNaTests

func (db *DB) UpdateNaTests(t *Info, nonBlockedAsPassed bool)

func (*DB) UpdatePassedTests

func (db *DB) UpdatePassedTests(t *Info)

type Info

type Info struct {
	Payload            string
	Encoder            string
	Placeholder        string
	Set                string
	Case               string
	ResponseStatusCode int
}

Jump to

Keyboard shortcuts

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