-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathconvert_paramgen.go
38 lines (33 loc) · 1.27 KB
/
convert_paramgen.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
// Code generated by paramgen. DO NOT EDIT.
// Source: github.com/ConduitIO/conduit-commons/tree/main/paramgen
package field
import (
"regexp"
"github.com/conduitio/conduit-commons/config"
)
const (
convertConfigField = "field"
convertConfigType = "type"
)
func (convertConfig) Parameters() map[string]config.Parameter {
return map[string]config.Parameter{
convertConfigField: {
Default: "",
Description: "Field is the target field that should be converted.\nNote that you can only convert fields in structured data under `.Key` and\n`.Payload`.\n\nFor more information about the format, see [Referencing fields](https://conduit.io/docs/using/processors/referencing-fields).",
Type: config.ParameterTypeString,
Validations: []config.Validation{
config.ValidationRequired{},
config.ValidationRegex{Regex: regexp.MustCompile("^\\.(Payload|Key).*")},
},
},
convertConfigType: {
Default: "",
Description: "Type is the target field type after conversion, available options are: `string`, `int`, `float`, `bool`, `time`.",
Type: config.ParameterTypeString,
Validations: []config.Validation{
config.ValidationRequired{},
config.ValidationInclusion{List: []string{"string", "int", "float", "bool", "time"}},
},
},
}
}