event_query.validator.pb.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: v1/request/event_query.proto
  3. package request
  4. import (
  5. fmt "fmt"
  6. math "math"
  7. proto "github.com/golang/protobuf/proto"
  8. _ "github.com/mwitkow/go-proto-validators"
  9. github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. func (this *EventQueryByKeysRequest) Validate() error {
  16. if this.DatabaseID == "" {
  17. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  18. }
  19. if this.TablePrefixWithSchema == "" {
  20. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  21. }
  22. if len(this.KeyValues) < 1 {
  23. return github_com_mwitkow_go_proto_validators.FieldError("KeyValues", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.KeyValues))
  24. }
  25. return nil
  26. }
  27. func (this *CommonEventQueryRequest) Validate() error {
  28. if this.DatabaseID == "" {
  29. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  30. }
  31. if this.TablePrefixWithSchema == "" {
  32. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  33. }
  34. return nil
  35. }
  36. func (this *CountEventByKeysRequest) Validate() error {
  37. if this.DatabaseID == "" {
  38. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  39. }
  40. if this.TablePrefixWithSchema == "" {
  41. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  42. }
  43. if len(this.KeyValues) < 1 {
  44. return github_com_mwitkow_go_proto_validators.FieldError("KeyValues", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.KeyValues))
  45. }
  46. return nil
  47. }
  48. func (this *CommonCountEventRequest) Validate() error {
  49. if this.DatabaseID == "" {
  50. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  51. }
  52. if this.TablePrefixWithSchema == "" {
  53. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  54. }
  55. return nil
  56. }