query.validator.pb.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: v1/request/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 *QueryByWhereAndOrderByRequest) 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 this.Version == "" {
  23. return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
  24. }
  25. return nil
  26. }
  27. func (this *CommonQueryRequest) 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. if this.Version == "" {
  35. return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
  36. }
  37. return nil
  38. }
  39. func (this *QueryByKeysRequest) Validate() error {
  40. if this.DatabaseID == "" {
  41. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  42. }
  43. if this.TablePrefixWithSchema == "" {
  44. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  45. }
  46. if this.Version == "" {
  47. return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
  48. }
  49. return nil
  50. }
  51. func (this *CommonQueryByKeysRequest) Validate() error {
  52. if this.DatabaseID == "" {
  53. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  54. }
  55. if this.TablePrefixWithSchema == "" {
  56. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  57. }
  58. if this.Version == "" {
  59. return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
  60. }
  61. return nil
  62. }
  63. func (this *CountWhereRequest) Validate() error {
  64. if this.DatabaseID == "" {
  65. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  66. }
  67. if this.TablePrefixWithSchema == "" {
  68. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  69. }
  70. if this.Version == "" {
  71. return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
  72. }
  73. return nil
  74. }
  75. func (this *CommonCountRequest) Validate() error {
  76. if this.DatabaseID == "" {
  77. return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
  78. }
  79. if this.TablePrefixWithSchema == "" {
  80. return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
  81. }
  82. if this.Version == "" {
  83. return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
  84. }
  85. return nil
  86. }