github.com/s7techlab/cckit@v0.10.5/state/mapping/testdata/schema/with_complex_id.validator.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: mapping/testdata/schema/with_complex_id.proto 3 4 package schema 5 6 import ( 7 fmt "fmt" 8 proto "github.com/golang/protobuf/proto" 9 github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" 10 _ "google.golang.org/protobuf/types/known/timestamppb" 11 math "math" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 func (this *EntityWithComplexId) Validate() error { 20 if this.Id != nil { 21 if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Id); err != nil { 22 return github_com_mwitkow_go_proto_validators.FieldError("Id", err) 23 } 24 } 25 if this.SomeDate != nil { 26 if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.SomeDate); err != nil { 27 return github_com_mwitkow_go_proto_validators.FieldError("SomeDate", err) 28 } 29 } 30 return nil 31 } 32 func (this *EntityComplexId) Validate() error { 33 if this.IdPart3 != nil { 34 if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.IdPart3); err != nil { 35 return github_com_mwitkow_go_proto_validators.FieldError("IdPart3", err) 36 } 37 } 38 return nil 39 }