templates

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package templates contains the parser for a template for the engine.

Index

Constants

View Source
const (
	SeverityHigh   = "high"
	SeverityMedium = "medium"
	SeverityLow    = "low"
)

Levels of severity for a request template

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Name is the name of the template
	Name string `yaml:"name"`
	// Author is the name of the author of the template
	Author string `yaml:"author"`
	// Severity optionally describes the severity of the template
	Severity string `yaml:"severity,omitempty"`
}

Info contains information about the request template

type Template

type Template struct {
	// ID is the unique id for the template
	ID string `yaml:"id"`
	// Info contains information about the template
	Info Info `yaml:"info"`
	// RequestHTTP contains the http request to make in the template
	RequestsHTTP []*requests.HTTPRequest `yaml:"requests"`
	// RequestDNS contains the dns request to make in the template
	RequestsDNS []*requests.DNSRequest `yaml:"dns"`
}

Template is a request template parsed from a yaml file

func ParseTemplate

func ParseTemplate(file string) (*Template, error)

ParseTemplate parses a yaml request template file

Jump to

Keyboard shortcuts

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