12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- // Code generated by protoc-gen-gogo. DO NOT EDIT.
- // source: v1/request/query.proto
- package request
- import (
- fmt "fmt"
- math "math"
- proto "github.com/golang/protobuf/proto"
- _ "github.com/mwitkow/go-proto-validators"
- github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- func (this *QueryByWhereAndOrderByRequest) Validate() error {
- if this.DatabaseID == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
- }
- return nil
- }
- func (this *CommonQueryRequest) Validate() error {
- if this.DatabaseID == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
- }
- return nil
- }
- func (this *QueryByKeysRequest) Validate() error {
- if this.DatabaseID == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
- }
- if this.TablePrefixWithSchema == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema))
- }
- if this.Version == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version))
- }
- for _, item := range this.KeyColumns {
- if !(len(item) > 0) {
- return github_com_mwitkow_go_proto_validators.FieldError("KeyColumns", fmt.Errorf(`value '%v' must have a length greater than '0'`, item))
- }
- }
- for _, item := range this.KeyValues {
- if !(len(item) > 0) {
- return github_com_mwitkow_go_proto_validators.FieldError("KeyValues", fmt.Errorf(`value '%v' must have a length greater than '0'`, item))
- }
- }
- return nil
- }
- func (this *CountWhereRequest) Validate() error {
- if this.DatabaseID == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
- }
- return nil
- }
- func (this *CommonCountRequest) Validate() error {
- if this.DatabaseID == "" {
- return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID))
- }
- return nil
- }
|