Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor implements a Value(name) (value, valid) function which allow to extract data from an existing DNS Request(or state)
func NewExtractor ¶
NewExtractor return a new Extractor based on the Mapping and the Request provided
func (*Extractor) Value ¶
Value extract the data that is mapped to this name and return the corresponding value as a string if that value is empty then the defaultValue is returned Second parameter is a boolean that inform if the name itself is supported in the mapping
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
Mapping define the mapping between 'name' of data and the way to extract that data from the Request it also defines what will be the empty value returned if the data behind the name is empty. it is pretty static, and you should need to instantiate only once
func NewMapping ¶
NewMapping build the mapping name -> func to extract data from the Request