123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412 |
- // 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
- }
|