/
extra_info.validator.pb.go
101 lines (96 loc) · 3.53 KB
/
extra_info.validator.pb.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: extra_info.proto
package tool
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
regexp "regexp"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _regex_ExtraInfo_ToolId = regexp.MustCompile(`^[a-fA-F0-9]{32}$`)
var _regex_ExtraInfo_ExecUser = regexp.MustCompile(`^[a-zA-Z0-9][.a-zA-Z0-9_-]{2,31}$`)
func (this *ExtraInfo) Validate() error {
if this.Detail != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Detail); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Detail", err)
}
}
if !_regex_ExtraInfo_ToolId.MatchString(this.ToolId) {
return github_com_mwitkow_go_proto_validators.FieldError("ToolId", fmt.Errorf(`value '%v' must be a string conforming to regex "^[a-fA-F0-9]{32}$"`, this.ToolId))
}
if !_regex_ExtraInfo_ExecUser.MatchString(this.ExecUser) {
return github_com_mwitkow_go_proto_validators.FieldError("ExecUser", fmt.Errorf(`value '%v' must be a string conforming to regex "^[a-zA-Z0-9][.a-zA-Z0-9_-]{2,31}$"`, this.ExecUser))
}
if this.Inputs != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Inputs); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Inputs", err)
}
}
return nil
}
func (this *ExtraInfo_Detail) Validate() error {
if this.Callback != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Callback); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Callback", err)
}
}
if this.ToolOutputs != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ToolOutputs); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ToolOutputs", err)
}
}
if this.ToolEnv != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ToolEnv); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ToolEnv", err)
}
}
for _, item := range this.OutputDefs {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("OutputDefs", err)
}
}
}
for _, item := range this.TableDefs {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TableDefs", err)
}
}
}
return nil
}
func (this *ExtraInfo_Detail_OutputDefs) Validate() error {
return nil
}
func (this *ExtraInfo_Detail_TableDefs) Validate() error {
for _, item := range this.Dimensions {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Dimensions", err)
}
}
}
for _, item := range this.Columns {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Columns", err)
}
}
}
return nil
}
func (this *ExtraInfo_Detail_TableDefs_Dimensions) Validate() error {
return nil
}
func (this *ExtraInfo_Detail_TableDefs_Columns) Validate() error {
return nil
}