// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: v1/request/command.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 *AutoMigrateRequest) 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 len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *AutoMigrateItem) Validate() error { 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)) } if !(len(this.TableModelDescribe) > 0) { return github_com_mwitkow_go_proto_validators.FieldError("TableModelDescribe", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.TableModelDescribe)) } return nil } func (this *TransactionBeginRequest) 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 *InsertTxRequest) Validate() error { 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)) } } if this.TableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TableRow", err) } } return nil } func (this *InsertBatchTxRequest) Validate() error { if len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *DeleteTxRequest) Validate() error { 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 *DeleteWhereTxRequest) Validate() error { 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)) } } return nil } func (this *UpdateTxRequest) Validate() error { 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)) } } if this.NewTableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.NewTableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("NewTableRow", err) } } return nil } func (this *UpdateWhereTxRequest) Validate() error { 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)) } } if this.NewTableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.NewTableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("NewTableRow", err) } } return nil } func (this *TransactionEndRequest) Validate() error { return nil } func (this *TransactionOperation) Validate() error { if oneOfNester, ok := this.GetRequest().(*TransactionOperation_TransactionBeginRequest); ok { if oneOfNester.TransactionBeginRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TransactionBeginRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TransactionBeginRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_InsertTxRequest); ok { if oneOfNester.InsertTxRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.InsertTxRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("InsertTxRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_InsertBatchTxRequest); ok { if oneOfNester.InsertBatchTxRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.InsertBatchTxRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("InsertBatchTxRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_DeleteTxRequest); ok { if oneOfNester.DeleteTxRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.DeleteTxRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("DeleteTxRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_DeleteWhereTxRequest); ok { if oneOfNester.DeleteWhereTxRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.DeleteWhereTxRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("DeleteWhereTxRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_UpdateTxRequest); ok { if oneOfNester.UpdateTxRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.UpdateTxRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("UpdateTxRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_UpdateWhereTxRequest); ok { if oneOfNester.UpdateWhereTxRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.UpdateWhereTxRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("UpdateWhereTxRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_TransactionEndRequest); ok { if oneOfNester.TransactionEndRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TransactionEndRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TransactionEndRequest", err) } } } return nil } func (this *InsertRequest) 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)) } } if this.TableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TableRow", err) } } return nil } func (this *InsertBatchRequest) 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 len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *InsertTableRowItem) Validate() error { 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.TableRows { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TableRows", err) } } } return nil } func (this *DeleteRequest) 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 *DeleteWhereRequest) 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)) } } return nil } func (this *UpdateRequest) 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)) } } if this.NewTableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.NewTableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("NewTableRow", err) } } return nil } func (this *UpdateWhereRequest) 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)) } } if this.NewTableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.NewTableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("NewTableRow", err) } } return nil } func (this *ReplayRequest) 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 *TableRow) Validate() error { for _, item := range this.Columns { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Columns", err) } } } return nil } func (this *Column) Validate() error { if this.Value != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Value); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Value", err) } } return nil } func (this *ColumnValue) Validate() error { return nil }