forked from vjeantet/bitfan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docdoc.go
66 lines (64 loc) · 2.89 KB
/
docdoc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Code generated by "bitfanDoc "; DO NOT EDIT
package evalprocessor
import "github.com/awillis/bitfan/processors/doc"
func (p *processor) Doc() *doc.Processor {
return &doc.Processor{
Name: "evalprocessor",
ImportPath: "github.com/awillis/bitfan/processors/filter-eval",
Doc: "Modify or add event's field with the result of\n\n* an expression (math or compare)\n* a go template\n\n**Operators and types supported in expression :**\n\n* Modifiers: `+` `-` `/` `*` `&` `|` `^` `**` `%` `>>` `<<`\n* Comparators: `>` `>=` `<` `<=` `==` `!=` `=~` `!~`\n* Logical ops: `||` `&&`\n* Numeric constants, as 64-bit floating point (`12345.678`)\n* String constants (single quotes: `'foobar'`)\n* Date constants (single quotes, using any permutation of RFC3339, ISO8601, ruby date, or unix date; date parsing is automatically tried with any string constant)\n* Boolean constants: `true` `false`\n* Parenthesis to control order of evaluation `(` `)`\n* Arrays (anything separated by `,` within parenthesis: `(1, 2, 'foo')`)\n* Prefixes: `!` `-` `~`\n* Ternary conditional: `?` `:`\n* Null coalescence: `??`",
DocShort: "Evaluate expression",
Options: &doc.ProcessorOptions{
Doc: "",
Options: []*doc.ProcessorOption{
&doc.ProcessorOption{
Name: "processors.CommonOptions",
Alias: ",squash",
Doc: "",
Required: false,
Type: "processors.CommonOptions",
DefaultValue: nil,
PossibleValues: []string{},
ExampleLS: "",
},
&doc.ProcessorOption{
Name: "Expressions",
Alias: "expressions",
Doc: "list of field to set with expression's result",
Required: false,
Type: "hash",
DefaultValue: nil,
PossibleValues: []string{},
ExampleLS: "expressions => { \"usage\" => \"[usage] * 100\" }",
},
&doc.ProcessorOption{
Name: "Templates",
Alias: "templates",
Doc: "list of field to set with a go template location",
Required: false,
Type: "hash",
DefaultValue: nil,
PossibleValues: []string{},
ExampleLS: "templates => { \"count\" => \"{{len .data}}\", \"mail\"=>\"mytemplate.tpl\" }",
},
&doc.ProcessorOption{
Name: "Var",
Alias: "var",
Doc: "You can set variable to be used in template by using ${var}.\neach reference will be replaced by the value of the variable found in Template's content\nThe replacement is case-sensitive.",
Required: false,
Type: "hash",
DefaultValue: nil,
PossibleValues: []string{},
ExampleLS: "var => {\"hostname\"=>\"myhost\",\"varname\"=>\"varvalue\"}",
},
},
},
Ports: []*doc.ProcessorPort{
&doc.ProcessorPort{
Default: true,
Name: "PORT_SUCCESS",
Number: 0,
Doc: "",
},
},
}
}