rules

package
v0.0.0-...-5773fd0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveResults

func SaveResults()

Types

type MatchResult

type MatchResult struct {
	Filename string `json:"filename"`
	Results  string `json:"results"`
	Rule     string `json:"rule"`
	Name     string `json:"name"`
}

type Rule

type Rule struct {
	Id          string `yaml:"id"`
	Description string `yaml:"description"`
	LineMatch   string `yaml:"line_match,omitempty"`
	StartMarker string `yaml:"start_marker,omitempty"`
	EndMarker   string `yaml:"end_marker,omitempty"`
}

func (*Rule) ProcessLineMatch

func (c *Rule) ProcessLineMatch(destination string) error

Processes a single line match printing the result if found

func (*Rule) ProcessStartEndMarker

func (c *Rule) ProcessStartEndMarker(destination string) error

Processes a start and end marker match printing the result if found

type RulesSpec

type RulesSpec struct {
	Rules []Rule `yaml:"rules"`
}

func (*RulesSpec) Parse

func (c *RulesSpec) Parse(specFile string) *RulesSpec

Jump to

Keyboard shortcuts

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