-
Notifications
You must be signed in to change notification settings - Fork 1
/
update.validator.pb.go
188 lines (172 loc) · 11.6 KB
/
update.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: update.proto
package installed_micro_app
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
_ "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/model/micro_app"
math "math"
regexp "regexp"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *UpdateInstalledMicroAppRequest) Validate() error {
if this.MicroApp != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.MicroApp); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("MicroApp", err)
}
}
return nil
}
var _regex_UpdateInstalledMicroAppRequest_MicroApp_InstanceId = regexp.MustCompile(`^[0-9a-z]{13}$`)
var _regex_UpdateInstalledMicroAppRequest_MicroApp_CurrentVersion = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
var _regex_UpdateInstalledMicroAppRequest_MicroApp_AppVersion = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
var _regex_UpdateInstalledMicroAppRequest_MicroApp_Homepage = regexp.MustCompile(`^((\/[^\/:\*\?""<>\|\r\n]+)+)|(\/)|[a-zA-Z]:(\\[^\\:\*\?""<>\|\r\n]+)*$`)
var _regex_UpdateInstalledMicroAppRequest_MicroApp_Owner = regexp.MustCompile(`^[a-zA-Z0-9][.a-zA-Z0-9_-]{2,31}$`)
var _regex_UpdateInstalledMicroAppRequest_MicroApp_Ctime = regexp.MustCompile(`^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$`)
var _regex_UpdateInstalledMicroAppRequest_MicroApp_Mtime = regexp.MustCompile(`^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$`)
func (this *UpdateInstalledMicroAppRequest_MicroApp) Validate() error {
if this.Container != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Container); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Container", err)
}
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_InstanceId.MatchString(this.InstanceId) {
return github_com_mwitkow_go_proto_validators.FieldError("InstanceId", fmt.Errorf(`value '%v' must be a string conforming to regex "^[0-9a-z]{13}$"`, this.InstanceId))
}
if this.Icons != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Icons); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Icons", err)
}
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_CurrentVersion.MatchString(this.CurrentVersion) {
return github_com_mwitkow_go_proto_validators.FieldError("CurrentVersion", fmt.Errorf(`value '%v' must be a string conforming to regex "^\\d+\\.\\d+\\.\\d+$"`, this.CurrentVersion))
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_AppVersion.MatchString(this.AppVersion) {
return github_com_mwitkow_go_proto_validators.FieldError("AppVersion", fmt.Errorf(`value '%v' must be a string conforming to regex "^\\d+\\.\\d+\\.\\d+$"`, this.AppVersion))
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_Homepage.MatchString(this.Homepage) {
return github_com_mwitkow_go_proto_validators.FieldError("Homepage", fmt.Errorf(`value '%v' must be a string conforming to regex "^((\\/[^\\/:\\*\\?\"\"<>\\|\\r\\n]+)+)|(\\/)|[a-zA-Z]:(\\\\[^\\\\:\\*\\?\"\"<>\\|\\r\\n]+)*$"`, this.Homepage))
}
if this.ClonedFrom != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ClonedFrom); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ClonedFrom", err)
}
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_Owner.MatchString(this.Owner) {
return github_com_mwitkow_go_proto_validators.FieldError("Owner", fmt.Errorf(`value '%v' must be a string conforming to regex "^[a-zA-Z0-9][.a-zA-Z0-9_-]{2,31}$"`, this.Owner))
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_Ctime.MatchString(this.Ctime) {
return github_com_mwitkow_go_proto_validators.FieldError("Ctime", fmt.Errorf(`value '%v' must be a string conforming to regex "^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"`, this.Ctime))
}
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_Mtime.MatchString(this.Mtime) {
return github_com_mwitkow_go_proto_validators.FieldError("Mtime", fmt.Errorf(`value '%v' must be a string conforming to regex "^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"`, this.Mtime))
}
if this.MenuIcon != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.MenuIcon); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("MenuIcon", err)
}
}
return nil
}
func (this *UpdateInstalledMicroAppRequest_MicroApp_Container) Validate() error {
return nil
}
var _regex_UpdateInstalledMicroAppRequest_MicroApp_Icons_Large = regexp.MustCompile(`^((\/[^\/:\*\?""<>\|\r\n]+)+)|(\/)|[a-zA-Z]:(\\[^\\:\*\?""<>\|\r\n]+)*$`)
func (this *UpdateInstalledMicroAppRequest_MicroApp_Icons) Validate() error {
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_Icons_Large.MatchString(this.Large) {
return github_com_mwitkow_go_proto_validators.FieldError("Large", fmt.Errorf(`value '%v' must be a string conforming to regex "^((\\/[^\\/:\\*\\?\"\"<>\\|\\r\\n]+)+)|(\\/)|[a-zA-Z]:(\\\\[^\\\\:\\*\\?\"\"<>\\|\\r\\n]+)*$"`, this.Large))
}
return nil
}
var _regex_UpdateInstalledMicroAppRequest_MicroApp_ClonedFrom_Version = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
func (this *UpdateInstalledMicroAppRequest_MicroApp_ClonedFrom) Validate() error {
if !_regex_UpdateInstalledMicroAppRequest_MicroApp_ClonedFrom_Version.MatchString(this.Version) {
return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must be a string conforming to regex "^\\d+\\.\\d+\\.\\d+$"`, this.Version))
}
return nil
}
func (this *UpdateInstalledMicroAppRequest_MicroApp_MenuIcon) Validate() error {
return nil
}
var _regex_UpdateInstalledMicroAppResponse_InstanceId = regexp.MustCompile(`^[0-9a-z]{13}$`)
var _regex_UpdateInstalledMicroAppResponse_CurrentVersion = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
var _regex_UpdateInstalledMicroAppResponse_AppVersion = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
var _regex_UpdateInstalledMicroAppResponse_Homepage = regexp.MustCompile(`^((\/[^\/:\*\?""<>\|\r\n]+)+)|(\/)|[a-zA-Z]:(\\[^\\:\*\?""<>\|\r\n]+)*$`)
var _regex_UpdateInstalledMicroAppResponse_Owner = regexp.MustCompile(`^[a-zA-Z0-9][.a-zA-Z0-9_-]{2,31}$`)
var _regex_UpdateInstalledMicroAppResponse_Ctime = regexp.MustCompile(`^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$`)
var _regex_UpdateInstalledMicroAppResponse_Mtime = regexp.MustCompile(`^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$`)
func (this *UpdateInstalledMicroAppResponse) Validate() error {
if this.Container != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Container); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Container", err)
}
}
if !_regex_UpdateInstalledMicroAppResponse_InstanceId.MatchString(this.InstanceId) {
return github_com_mwitkow_go_proto_validators.FieldError("InstanceId", fmt.Errorf(`value '%v' must be a string conforming to regex "^[0-9a-z]{13}$"`, this.InstanceId))
}
if this.Icons != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Icons); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Icons", err)
}
}
if !_regex_UpdateInstalledMicroAppResponse_CurrentVersion.MatchString(this.CurrentVersion) {
return github_com_mwitkow_go_proto_validators.FieldError("CurrentVersion", fmt.Errorf(`value '%v' must be a string conforming to regex "^\\d+\\.\\d+\\.\\d+$"`, this.CurrentVersion))
}
if !_regex_UpdateInstalledMicroAppResponse_AppVersion.MatchString(this.AppVersion) {
return github_com_mwitkow_go_proto_validators.FieldError("AppVersion", fmt.Errorf(`value '%v' must be a string conforming to regex "^\\d+\\.\\d+\\.\\d+$"`, this.AppVersion))
}
if !_regex_UpdateInstalledMicroAppResponse_Homepage.MatchString(this.Homepage) {
return github_com_mwitkow_go_proto_validators.FieldError("Homepage", fmt.Errorf(`value '%v' must be a string conforming to regex "^((\\/[^\\/:\\*\\?\"\"<>\\|\\r\\n]+)+)|(\\/)|[a-zA-Z]:(\\\\[^\\\\:\\*\\?\"\"<>\\|\\r\\n]+)*$"`, this.Homepage))
}
if this.ClonedFrom != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ClonedFrom); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ClonedFrom", err)
}
}
if !_regex_UpdateInstalledMicroAppResponse_Owner.MatchString(this.Owner) {
return github_com_mwitkow_go_proto_validators.FieldError("Owner", fmt.Errorf(`value '%v' must be a string conforming to regex "^[a-zA-Z0-9][.a-zA-Z0-9_-]{2,31}$"`, this.Owner))
}
if !_regex_UpdateInstalledMicroAppResponse_Ctime.MatchString(this.Ctime) {
return github_com_mwitkow_go_proto_validators.FieldError("Ctime", fmt.Errorf(`value '%v' must be a string conforming to regex "^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"`, this.Ctime))
}
if !_regex_UpdateInstalledMicroAppResponse_Mtime.MatchString(this.Mtime) {
return github_com_mwitkow_go_proto_validators.FieldError("Mtime", fmt.Errorf(`value '%v' must be a string conforming to regex "^((?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])[T ](2[0-3]|[0-1][0-9]):([0-5][0-9]):[0-5][0-9](\\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$"`, this.Mtime))
}
if this.MenuIcon != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.MenuIcon); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("MenuIcon", err)
}
}
return nil
}
var _regex_UpdateInstalledMicroAppResponse_Icons_Large = regexp.MustCompile(`^((\/[^\/:\*\?""<>\|\r\n]+)+)|(\/)|[a-zA-Z]:(\\[^\\:\*\?""<>\|\r\n]+)*$`)
func (this *UpdateInstalledMicroAppResponse_Icons) Validate() error {
if !_regex_UpdateInstalledMicroAppResponse_Icons_Large.MatchString(this.Large) {
return github_com_mwitkow_go_proto_validators.FieldError("Large", fmt.Errorf(`value '%v' must be a string conforming to regex "^((\\/[^\\/:\\*\\?\"\"<>\\|\\r\\n]+)+)|(\\/)|[a-zA-Z]:(\\\\[^\\\\:\\*\\?\"\"<>\\|\\r\\n]+)*$"`, this.Large))
}
return nil
}
var _regex_UpdateInstalledMicroAppResponse_ClonedFrom_Version = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
func (this *UpdateInstalledMicroAppResponse_ClonedFrom) Validate() error {
if !_regex_UpdateInstalledMicroAppResponse_ClonedFrom_Version.MatchString(this.Version) {
return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must be a string conforming to regex "^\\d+\\.\\d+\\.\\d+$"`, this.Version))
}
return nil
}
func (this *UpdateInstalledMicroAppResponse_MenuIcon) Validate() error {
return nil
}
func (this *UpdateInstalledMicroAppResponseWrapper) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}