github.com/onosproject/onos-api/go@v0.10.32/onos/config/v3/transaction.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/config/v3/transaction.proto 3 4 package v3 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 _ "github.com/gogo/protobuf/types" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 time "time" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 var _ = time.Kitchen 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 type TransactionStrategy_Synchronicity int32 31 32 const ( 33 TransactionStrategy_ASYNCHRONOUS TransactionStrategy_Synchronicity = 0 34 TransactionStrategy_SYNCHRONOUS TransactionStrategy_Synchronicity = 1 35 ) 36 37 var TransactionStrategy_Synchronicity_name = map[int32]string{ 38 0: "ASYNCHRONOUS", 39 1: "SYNCHRONOUS", 40 } 41 42 var TransactionStrategy_Synchronicity_value = map[string]int32{ 43 "ASYNCHRONOUS": 0, 44 "SYNCHRONOUS": 1, 45 } 46 47 func (x TransactionStrategy_Synchronicity) String() string { 48 return proto.EnumName(TransactionStrategy_Synchronicity_name, int32(x)) 49 } 50 51 func (TransactionStrategy_Synchronicity) EnumDescriptor() ([]byte, []int) { 52 return fileDescriptor_f6ad97ee2134c290, []int{1, 0} 53 } 54 55 type TransactionStatus_Phase int32 56 57 const ( 58 TransactionStatus_CHANGE TransactionStatus_Phase = 0 59 TransactionStatus_ROLLBACK TransactionStatus_Phase = 1 60 ) 61 62 var TransactionStatus_Phase_name = map[int32]string{ 63 0: "CHANGE", 64 1: "ROLLBACK", 65 } 66 67 var TransactionStatus_Phase_value = map[string]int32{ 68 "CHANGE": 0, 69 "ROLLBACK": 1, 70 } 71 72 func (x TransactionStatus_Phase) String() string { 73 return proto.EnumName(TransactionStatus_Phase_name, int32(x)) 74 } 75 76 func (TransactionStatus_Phase) EnumDescriptor() ([]byte, []int) { 77 return fileDescriptor_f6ad97ee2134c290, []int{3, 0} 78 } 79 80 type TransactionPhaseStatus_State int32 81 82 const ( 83 TransactionPhaseStatus_PENDING TransactionPhaseStatus_State = 0 84 TransactionPhaseStatus_IN_PROGRESS TransactionPhaseStatus_State = 1 85 TransactionPhaseStatus_COMPLETE TransactionPhaseStatus_State = 2 86 TransactionPhaseStatus_ABORTED TransactionPhaseStatus_State = 3 87 TransactionPhaseStatus_CANCELED TransactionPhaseStatus_State = 4 88 TransactionPhaseStatus_FAILED TransactionPhaseStatus_State = 5 89 ) 90 91 var TransactionPhaseStatus_State_name = map[int32]string{ 92 0: "PENDING", 93 1: "IN_PROGRESS", 94 2: "COMPLETE", 95 3: "ABORTED", 96 4: "CANCELED", 97 5: "FAILED", 98 } 99 100 var TransactionPhaseStatus_State_value = map[string]int32{ 101 "PENDING": 0, 102 "IN_PROGRESS": 1, 103 "COMPLETE": 2, 104 "ABORTED": 3, 105 "CANCELED": 4, 106 "FAILED": 5, 107 } 108 109 func (x TransactionPhaseStatus_State) String() string { 110 return proto.EnumName(TransactionPhaseStatus_State_name, int32(x)) 111 } 112 113 func (TransactionPhaseStatus_State) EnumDescriptor() ([]byte, []int) { 114 return fileDescriptor_f6ad97ee2134c290, []int{4, 0} 115 } 116 117 // EventType transaction event types for transaction store 118 type TransactionEvent_EventType int32 119 120 const ( 121 TransactionEvent_UNKNOWN TransactionEvent_EventType = 0 122 TransactionEvent_CREATED TransactionEvent_EventType = 1 123 TransactionEvent_UPDATED TransactionEvent_EventType = 2 124 TransactionEvent_DELETED TransactionEvent_EventType = 3 125 TransactionEvent_REPLAYED TransactionEvent_EventType = 4 126 ) 127 128 var TransactionEvent_EventType_name = map[int32]string{ 129 0: "UNKNOWN", 130 1: "CREATED", 131 2: "UPDATED", 132 3: "DELETED", 133 4: "REPLAYED", 134 } 135 136 var TransactionEvent_EventType_value = map[string]int32{ 137 "UNKNOWN": 0, 138 "CREATED": 1, 139 "UPDATED": 2, 140 "DELETED": 3, 141 "REPLAYED": 4, 142 } 143 144 func (x TransactionEvent_EventType) String() string { 145 return proto.EnumName(TransactionEvent_EventType_name, int32(x)) 146 } 147 148 func (TransactionEvent_EventType) EnumDescriptor() ([]byte, []int) { 149 return fileDescriptor_f6ad97ee2134c290, []int{7, 0} 150 } 151 152 type TransactionID struct { 153 Target Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target"` 154 Index Index `protobuf:"varint,2,opt,name=index,proto3,casttype=Index" json:"index,omitempty"` 155 } 156 157 func (m *TransactionID) Reset() { *m = TransactionID{} } 158 func (m *TransactionID) String() string { return proto.CompactTextString(m) } 159 func (*TransactionID) ProtoMessage() {} 160 func (*TransactionID) Descriptor() ([]byte, []int) { 161 return fileDescriptor_f6ad97ee2134c290, []int{0} 162 } 163 func (m *TransactionID) XXX_Unmarshal(b []byte) error { 164 return m.Unmarshal(b) 165 } 166 func (m *TransactionID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 167 if deterministic { 168 return xxx_messageInfo_TransactionID.Marshal(b, m, deterministic) 169 } else { 170 b = b[:cap(b)] 171 n, err := m.MarshalToSizedBuffer(b) 172 if err != nil { 173 return nil, err 174 } 175 return b[:n], nil 176 } 177 } 178 func (m *TransactionID) XXX_Merge(src proto.Message) { 179 xxx_messageInfo_TransactionID.Merge(m, src) 180 } 181 func (m *TransactionID) XXX_Size() int { 182 return m.Size() 183 } 184 func (m *TransactionID) XXX_DiscardUnknown() { 185 xxx_messageInfo_TransactionID.DiscardUnknown(m) 186 } 187 188 var xxx_messageInfo_TransactionID proto.InternalMessageInfo 189 190 func (m *TransactionID) GetTarget() Target { 191 if m != nil { 192 return m.Target 193 } 194 return Target{} 195 } 196 197 func (m *TransactionID) GetIndex() Index { 198 if m != nil { 199 return m.Index 200 } 201 return 0 202 } 203 204 type TransactionStrategy struct { 205 // 'synchronicity' indicates the transaction synchronicity level 206 Synchronicity TransactionStrategy_Synchronicity `protobuf:"varint,1,opt,name=synchronicity,proto3,enum=onos.config.v3.TransactionStrategy_Synchronicity" json:"synchronicity,omitempty"` 207 } 208 209 func (m *TransactionStrategy) Reset() { *m = TransactionStrategy{} } 210 func (m *TransactionStrategy) String() string { return proto.CompactTextString(m) } 211 func (*TransactionStrategy) ProtoMessage() {} 212 func (*TransactionStrategy) Descriptor() ([]byte, []int) { 213 return fileDescriptor_f6ad97ee2134c290, []int{1} 214 } 215 func (m *TransactionStrategy) XXX_Unmarshal(b []byte) error { 216 return m.Unmarshal(b) 217 } 218 func (m *TransactionStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 219 if deterministic { 220 return xxx_messageInfo_TransactionStrategy.Marshal(b, m, deterministic) 221 } else { 222 b = b[:cap(b)] 223 n, err := m.MarshalToSizedBuffer(b) 224 if err != nil { 225 return nil, err 226 } 227 return b[:n], nil 228 } 229 } 230 func (m *TransactionStrategy) XXX_Merge(src proto.Message) { 231 xxx_messageInfo_TransactionStrategy.Merge(m, src) 232 } 233 func (m *TransactionStrategy) XXX_Size() int { 234 return m.Size() 235 } 236 func (m *TransactionStrategy) XXX_DiscardUnknown() { 237 xxx_messageInfo_TransactionStrategy.DiscardUnknown(m) 238 } 239 240 var xxx_messageInfo_TransactionStrategy proto.InternalMessageInfo 241 242 func (m *TransactionStrategy) GetSynchronicity() TransactionStrategy_Synchronicity { 243 if m != nil { 244 return m.Synchronicity 245 } 246 return TransactionStrategy_ASYNCHRONOUS 247 } 248 249 type Transaction struct { 250 ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"` 251 // 'id' is the unique identifier of the transaction 252 ID TransactionID `protobuf:"bytes,2,opt,name=id,proto3" json:"id"` 253 // 'values' is a set of changes to apply to targets 254 Values map[string]PathValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 255 // 'status' is the transaction status 256 Status TransactionStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status"` 257 } 258 259 func (m *Transaction) Reset() { *m = Transaction{} } 260 func (m *Transaction) String() string { return proto.CompactTextString(m) } 261 func (*Transaction) ProtoMessage() {} 262 func (*Transaction) Descriptor() ([]byte, []int) { 263 return fileDescriptor_f6ad97ee2134c290, []int{2} 264 } 265 func (m *Transaction) XXX_Unmarshal(b []byte) error { 266 return m.Unmarshal(b) 267 } 268 func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 269 if deterministic { 270 return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) 271 } else { 272 b = b[:cap(b)] 273 n, err := m.MarshalToSizedBuffer(b) 274 if err != nil { 275 return nil, err 276 } 277 return b[:n], nil 278 } 279 } 280 func (m *Transaction) XXX_Merge(src proto.Message) { 281 xxx_messageInfo_Transaction.Merge(m, src) 282 } 283 func (m *Transaction) XXX_Size() int { 284 return m.Size() 285 } 286 func (m *Transaction) XXX_DiscardUnknown() { 287 xxx_messageInfo_Transaction.DiscardUnknown(m) 288 } 289 290 var xxx_messageInfo_Transaction proto.InternalMessageInfo 291 292 func (m *Transaction) GetID() TransactionID { 293 if m != nil { 294 return m.ID 295 } 296 return TransactionID{} 297 } 298 299 func (m *Transaction) GetValues() map[string]PathValue { 300 if m != nil { 301 return m.Values 302 } 303 return nil 304 } 305 306 func (m *Transaction) GetStatus() TransactionStatus { 307 if m != nil { 308 return m.Status 309 } 310 return TransactionStatus{} 311 } 312 313 type TransactionStatus struct { 314 Phase TransactionStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=onos.config.v3.TransactionStatus_Phase" json:"phase,omitempty"` 315 Change TransactionChangeStatus `protobuf:"bytes,2,opt,name=change,proto3" json:"change"` 316 Rollback TransactionRollbackStatus `protobuf:"bytes,3,opt,name=rollback,proto3" json:"rollback"` 317 } 318 319 func (m *TransactionStatus) Reset() { *m = TransactionStatus{} } 320 func (m *TransactionStatus) String() string { return proto.CompactTextString(m) } 321 func (*TransactionStatus) ProtoMessage() {} 322 func (*TransactionStatus) Descriptor() ([]byte, []int) { 323 return fileDescriptor_f6ad97ee2134c290, []int{3} 324 } 325 func (m *TransactionStatus) XXX_Unmarshal(b []byte) error { 326 return m.Unmarshal(b) 327 } 328 func (m *TransactionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 329 if deterministic { 330 return xxx_messageInfo_TransactionStatus.Marshal(b, m, deterministic) 331 } else { 332 b = b[:cap(b)] 333 n, err := m.MarshalToSizedBuffer(b) 334 if err != nil { 335 return nil, err 336 } 337 return b[:n], nil 338 } 339 } 340 func (m *TransactionStatus) XXX_Merge(src proto.Message) { 341 xxx_messageInfo_TransactionStatus.Merge(m, src) 342 } 343 func (m *TransactionStatus) XXX_Size() int { 344 return m.Size() 345 } 346 func (m *TransactionStatus) XXX_DiscardUnknown() { 347 xxx_messageInfo_TransactionStatus.DiscardUnknown(m) 348 } 349 350 var xxx_messageInfo_TransactionStatus proto.InternalMessageInfo 351 352 func (m *TransactionStatus) GetPhase() TransactionStatus_Phase { 353 if m != nil { 354 return m.Phase 355 } 356 return TransactionStatus_CHANGE 357 } 358 359 func (m *TransactionStatus) GetChange() TransactionChangeStatus { 360 if m != nil { 361 return m.Change 362 } 363 return TransactionChangeStatus{} 364 } 365 366 func (m *TransactionStatus) GetRollback() TransactionRollbackStatus { 367 if m != nil { 368 return m.Rollback 369 } 370 return TransactionRollbackStatus{} 371 } 372 373 type TransactionPhaseStatus struct { 374 Start *time.Time `protobuf:"bytes,1,opt,name=start,proto3,stdtime" json:"start,omitempty"` 375 End *time.Time `protobuf:"bytes,2,opt,name=end,proto3,stdtime" json:"end,omitempty"` 376 State TransactionPhaseStatus_State `protobuf:"varint,3,opt,name=state,proto3,enum=onos.config.v3.TransactionPhaseStatus_State" json:"state,omitempty"` 377 Failure *Failure `protobuf:"bytes,4,opt,name=failure,proto3" json:"failure,omitempty"` 378 } 379 380 func (m *TransactionPhaseStatus) Reset() { *m = TransactionPhaseStatus{} } 381 func (m *TransactionPhaseStatus) String() string { return proto.CompactTextString(m) } 382 func (*TransactionPhaseStatus) ProtoMessage() {} 383 func (*TransactionPhaseStatus) Descriptor() ([]byte, []int) { 384 return fileDescriptor_f6ad97ee2134c290, []int{4} 385 } 386 func (m *TransactionPhaseStatus) XXX_Unmarshal(b []byte) error { 387 return m.Unmarshal(b) 388 } 389 func (m *TransactionPhaseStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 390 if deterministic { 391 return xxx_messageInfo_TransactionPhaseStatus.Marshal(b, m, deterministic) 392 } else { 393 b = b[:cap(b)] 394 n, err := m.MarshalToSizedBuffer(b) 395 if err != nil { 396 return nil, err 397 } 398 return b[:n], nil 399 } 400 } 401 func (m *TransactionPhaseStatus) XXX_Merge(src proto.Message) { 402 xxx_messageInfo_TransactionPhaseStatus.Merge(m, src) 403 } 404 func (m *TransactionPhaseStatus) XXX_Size() int { 405 return m.Size() 406 } 407 func (m *TransactionPhaseStatus) XXX_DiscardUnknown() { 408 xxx_messageInfo_TransactionPhaseStatus.DiscardUnknown(m) 409 } 410 411 var xxx_messageInfo_TransactionPhaseStatus proto.InternalMessageInfo 412 413 func (m *TransactionPhaseStatus) GetStart() *time.Time { 414 if m != nil { 415 return m.Start 416 } 417 return nil 418 } 419 420 func (m *TransactionPhaseStatus) GetEnd() *time.Time { 421 if m != nil { 422 return m.End 423 } 424 return nil 425 } 426 427 func (m *TransactionPhaseStatus) GetState() TransactionPhaseStatus_State { 428 if m != nil { 429 return m.State 430 } 431 return TransactionPhaseStatus_PENDING 432 } 433 434 func (m *TransactionPhaseStatus) GetFailure() *Failure { 435 if m != nil { 436 return m.Failure 437 } 438 return nil 439 } 440 441 type TransactionChangeStatus struct { 442 Ordinal Ordinal `protobuf:"varint,1,opt,name=ordinal,proto3,casttype=Ordinal" json:"ordinal,omitempty"` 443 Commit *TransactionPhaseStatus `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` 444 Apply *TransactionPhaseStatus `protobuf:"bytes,3,opt,name=apply,proto3" json:"apply,omitempty"` 445 } 446 447 func (m *TransactionChangeStatus) Reset() { *m = TransactionChangeStatus{} } 448 func (m *TransactionChangeStatus) String() string { return proto.CompactTextString(m) } 449 func (*TransactionChangeStatus) ProtoMessage() {} 450 func (*TransactionChangeStatus) Descriptor() ([]byte, []int) { 451 return fileDescriptor_f6ad97ee2134c290, []int{5} 452 } 453 func (m *TransactionChangeStatus) XXX_Unmarshal(b []byte) error { 454 return m.Unmarshal(b) 455 } 456 func (m *TransactionChangeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 457 if deterministic { 458 return xxx_messageInfo_TransactionChangeStatus.Marshal(b, m, deterministic) 459 } else { 460 b = b[:cap(b)] 461 n, err := m.MarshalToSizedBuffer(b) 462 if err != nil { 463 return nil, err 464 } 465 return b[:n], nil 466 } 467 } 468 func (m *TransactionChangeStatus) XXX_Merge(src proto.Message) { 469 xxx_messageInfo_TransactionChangeStatus.Merge(m, src) 470 } 471 func (m *TransactionChangeStatus) XXX_Size() int { 472 return m.Size() 473 } 474 func (m *TransactionChangeStatus) XXX_DiscardUnknown() { 475 xxx_messageInfo_TransactionChangeStatus.DiscardUnknown(m) 476 } 477 478 var xxx_messageInfo_TransactionChangeStatus proto.InternalMessageInfo 479 480 func (m *TransactionChangeStatus) GetOrdinal() Ordinal { 481 if m != nil { 482 return m.Ordinal 483 } 484 return 0 485 } 486 487 func (m *TransactionChangeStatus) GetCommit() *TransactionPhaseStatus { 488 if m != nil { 489 return m.Commit 490 } 491 return nil 492 } 493 494 func (m *TransactionChangeStatus) GetApply() *TransactionPhaseStatus { 495 if m != nil { 496 return m.Apply 497 } 498 return nil 499 } 500 501 type TransactionRollbackStatus struct { 502 Ordinal Ordinal `protobuf:"varint,1,opt,name=ordinal,proto3,casttype=Ordinal" json:"ordinal,omitempty"` 503 Commit *TransactionPhaseStatus `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` 504 Apply *TransactionPhaseStatus `protobuf:"bytes,3,opt,name=apply,proto3" json:"apply,omitempty"` 505 Index Index `protobuf:"varint,4,opt,name=index,proto3,casttype=Index" json:"index,omitempty"` 506 Values map[string]PathValue `protobuf:"bytes,5,rep,name=values,proto3" json:"values" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 507 } 508 509 func (m *TransactionRollbackStatus) Reset() { *m = TransactionRollbackStatus{} } 510 func (m *TransactionRollbackStatus) String() string { return proto.CompactTextString(m) } 511 func (*TransactionRollbackStatus) ProtoMessage() {} 512 func (*TransactionRollbackStatus) Descriptor() ([]byte, []int) { 513 return fileDescriptor_f6ad97ee2134c290, []int{6} 514 } 515 func (m *TransactionRollbackStatus) XXX_Unmarshal(b []byte) error { 516 return m.Unmarshal(b) 517 } 518 func (m *TransactionRollbackStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 519 if deterministic { 520 return xxx_messageInfo_TransactionRollbackStatus.Marshal(b, m, deterministic) 521 } else { 522 b = b[:cap(b)] 523 n, err := m.MarshalToSizedBuffer(b) 524 if err != nil { 525 return nil, err 526 } 527 return b[:n], nil 528 } 529 } 530 func (m *TransactionRollbackStatus) XXX_Merge(src proto.Message) { 531 xxx_messageInfo_TransactionRollbackStatus.Merge(m, src) 532 } 533 func (m *TransactionRollbackStatus) XXX_Size() int { 534 return m.Size() 535 } 536 func (m *TransactionRollbackStatus) XXX_DiscardUnknown() { 537 xxx_messageInfo_TransactionRollbackStatus.DiscardUnknown(m) 538 } 539 540 var xxx_messageInfo_TransactionRollbackStatus proto.InternalMessageInfo 541 542 func (m *TransactionRollbackStatus) GetOrdinal() Ordinal { 543 if m != nil { 544 return m.Ordinal 545 } 546 return 0 547 } 548 549 func (m *TransactionRollbackStatus) GetCommit() *TransactionPhaseStatus { 550 if m != nil { 551 return m.Commit 552 } 553 return nil 554 } 555 556 func (m *TransactionRollbackStatus) GetApply() *TransactionPhaseStatus { 557 if m != nil { 558 return m.Apply 559 } 560 return nil 561 } 562 563 func (m *TransactionRollbackStatus) GetIndex() Index { 564 if m != nil { 565 return m.Index 566 } 567 return 0 568 } 569 570 func (m *TransactionRollbackStatus) GetValues() map[string]PathValue { 571 if m != nil { 572 return m.Values 573 } 574 return nil 575 } 576 577 // TransactionEvent transaction store event 578 type TransactionEvent struct { 579 Type TransactionEvent_EventType `protobuf:"varint,1,opt,name=type,proto3,enum=onos.config.v3.TransactionEvent_EventType" json:"type,omitempty"` 580 Transaction Transaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction"` 581 } 582 583 func (m *TransactionEvent) Reset() { *m = TransactionEvent{} } 584 func (m *TransactionEvent) String() string { return proto.CompactTextString(m) } 585 func (*TransactionEvent) ProtoMessage() {} 586 func (*TransactionEvent) Descriptor() ([]byte, []int) { 587 return fileDescriptor_f6ad97ee2134c290, []int{7} 588 } 589 func (m *TransactionEvent) XXX_Unmarshal(b []byte) error { 590 return m.Unmarshal(b) 591 } 592 func (m *TransactionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 593 if deterministic { 594 return xxx_messageInfo_TransactionEvent.Marshal(b, m, deterministic) 595 } else { 596 b = b[:cap(b)] 597 n, err := m.MarshalToSizedBuffer(b) 598 if err != nil { 599 return nil, err 600 } 601 return b[:n], nil 602 } 603 } 604 func (m *TransactionEvent) XXX_Merge(src proto.Message) { 605 xxx_messageInfo_TransactionEvent.Merge(m, src) 606 } 607 func (m *TransactionEvent) XXX_Size() int { 608 return m.Size() 609 } 610 func (m *TransactionEvent) XXX_DiscardUnknown() { 611 xxx_messageInfo_TransactionEvent.DiscardUnknown(m) 612 } 613 614 var xxx_messageInfo_TransactionEvent proto.InternalMessageInfo 615 616 func (m *TransactionEvent) GetType() TransactionEvent_EventType { 617 if m != nil { 618 return m.Type 619 } 620 return TransactionEvent_UNKNOWN 621 } 622 623 func (m *TransactionEvent) GetTransaction() Transaction { 624 if m != nil { 625 return m.Transaction 626 } 627 return Transaction{} 628 } 629 630 func init() { 631 proto.RegisterEnum("onos.config.v3.TransactionStrategy_Synchronicity", TransactionStrategy_Synchronicity_name, TransactionStrategy_Synchronicity_value) 632 proto.RegisterEnum("onos.config.v3.TransactionStatus_Phase", TransactionStatus_Phase_name, TransactionStatus_Phase_value) 633 proto.RegisterEnum("onos.config.v3.TransactionPhaseStatus_State", TransactionPhaseStatus_State_name, TransactionPhaseStatus_State_value) 634 proto.RegisterEnum("onos.config.v3.TransactionEvent_EventType", TransactionEvent_EventType_name, TransactionEvent_EventType_value) 635 proto.RegisterType((*TransactionID)(nil), "onos.config.v3.TransactionID") 636 proto.RegisterType((*TransactionStrategy)(nil), "onos.config.v3.TransactionStrategy") 637 proto.RegisterType((*Transaction)(nil), "onos.config.v3.Transaction") 638 proto.RegisterMapType((map[string]PathValue)(nil), "onos.config.v3.Transaction.ValuesEntry") 639 proto.RegisterType((*TransactionStatus)(nil), "onos.config.v3.TransactionStatus") 640 proto.RegisterType((*TransactionPhaseStatus)(nil), "onos.config.v3.TransactionPhaseStatus") 641 proto.RegisterType((*TransactionChangeStatus)(nil), "onos.config.v3.TransactionChangeStatus") 642 proto.RegisterType((*TransactionRollbackStatus)(nil), "onos.config.v3.TransactionRollbackStatus") 643 proto.RegisterMapType((map[string]PathValue)(nil), "onos.config.v3.TransactionRollbackStatus.ValuesEntry") 644 proto.RegisterType((*TransactionEvent)(nil), "onos.config.v3.TransactionEvent") 645 } 646 647 func init() { proto.RegisterFile("onos/config/v3/transaction.proto", fileDescriptor_f6ad97ee2134c290) } 648 649 var fileDescriptor_f6ad97ee2134c290 = []byte{ 650 // 916 bytes of a gzipped FileDescriptorProto 651 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4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 0x00, 0xff, 0xff, 0xc4, 0xd0, 0x9f, 0x93, 708 0xf1, 0x08, 0x00, 0x00, 709 } 710 711 func (m *TransactionID) Marshal() (dAtA []byte, err error) { 712 size := m.Size() 713 dAtA = make([]byte, size) 714 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 715 if err != nil { 716 return nil, err 717 } 718 return dAtA[:n], nil 719 } 720 721 func (m *TransactionID) MarshalTo(dAtA []byte) (int, error) { 722 size := m.Size() 723 return m.MarshalToSizedBuffer(dAtA[:size]) 724 } 725 726 func (m *TransactionID) MarshalToSizedBuffer(dAtA []byte) (int, error) { 727 i := len(dAtA) 728 _ = i 729 var l int 730 _ = l 731 if m.Index != 0 { 732 i = encodeVarintTransaction(dAtA, i, uint64(m.Index)) 733 i-- 734 dAtA[i] = 0x10 735 } 736 { 737 size, err := m.Target.MarshalToSizedBuffer(dAtA[:i]) 738 if err != nil { 739 return 0, err 740 } 741 i -= size 742 i = encodeVarintTransaction(dAtA, i, uint64(size)) 743 } 744 i-- 745 dAtA[i] = 0xa 746 return len(dAtA) - i, nil 747 } 748 749 func (m *TransactionStrategy) Marshal() (dAtA []byte, err error) { 750 size := m.Size() 751 dAtA = make([]byte, size) 752 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 753 if err != nil { 754 return nil, err 755 } 756 return dAtA[:n], nil 757 } 758 759 func (m *TransactionStrategy) MarshalTo(dAtA []byte) (int, error) { 760 size := m.Size() 761 return m.MarshalToSizedBuffer(dAtA[:size]) 762 } 763 764 func (m *TransactionStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { 765 i := len(dAtA) 766 _ = i 767 var l int 768 _ = l 769 if m.Synchronicity != 0 { 770 i = encodeVarintTransaction(dAtA, i, uint64(m.Synchronicity)) 771 i-- 772 dAtA[i] = 0x8 773 } 774 return len(dAtA) - i, nil 775 } 776 777 func (m *Transaction) Marshal() (dAtA []byte, err error) { 778 size := m.Size() 779 dAtA = make([]byte, size) 780 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 781 if err != nil { 782 return nil, err 783 } 784 return dAtA[:n], nil 785 } 786 787 func (m *Transaction) MarshalTo(dAtA []byte) (int, error) { 788 size := m.Size() 789 return m.MarshalToSizedBuffer(dAtA[:size]) 790 } 791 792 func (m *Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error) { 793 i := len(dAtA) 794 _ = i 795 var l int 796 _ = l 797 { 798 size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) 799 if err != nil { 800 return 0, err 801 } 802 i -= size 803 i = encodeVarintTransaction(dAtA, i, uint64(size)) 804 } 805 i-- 806 dAtA[i] = 0x22 807 if len(m.Values) > 0 { 808 for k := range m.Values { 809 v := m.Values[k] 810 baseI := i 811 { 812 size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) 813 if err != nil { 814 return 0, err 815 } 816 i -= size 817 i = encodeVarintTransaction(dAtA, i, uint64(size)) 818 } 819 i-- 820 dAtA[i] = 0x12 821 i -= len(k) 822 copy(dAtA[i:], k) 823 i = encodeVarintTransaction(dAtA, i, uint64(len(k))) 824 i-- 825 dAtA[i] = 0xa 826 i = encodeVarintTransaction(dAtA, i, uint64(baseI-i)) 827 i-- 828 dAtA[i] = 0x1a 829 } 830 } 831 { 832 size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) 833 if err != nil { 834 return 0, err 835 } 836 i -= size 837 i = encodeVarintTransaction(dAtA, i, uint64(size)) 838 } 839 i-- 840 dAtA[i] = 0x12 841 { 842 size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) 843 if err != nil { 844 return 0, err 845 } 846 i -= size 847 i = encodeVarintTransaction(dAtA, i, uint64(size)) 848 } 849 i-- 850 dAtA[i] = 0xa 851 return len(dAtA) - i, nil 852 } 853 854 func (m *TransactionStatus) Marshal() (dAtA []byte, err error) { 855 size := m.Size() 856 dAtA = make([]byte, size) 857 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 858 if err != nil { 859 return nil, err 860 } 861 return dAtA[:n], nil 862 } 863 864 func (m *TransactionStatus) MarshalTo(dAtA []byte) (int, error) { 865 size := m.Size() 866 return m.MarshalToSizedBuffer(dAtA[:size]) 867 } 868 869 func (m *TransactionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { 870 i := len(dAtA) 871 _ = i 872 var l int 873 _ = l 874 { 875 size, err := m.Rollback.MarshalToSizedBuffer(dAtA[:i]) 876 if err != nil { 877 return 0, err 878 } 879 i -= size 880 i = encodeVarintTransaction(dAtA, i, uint64(size)) 881 } 882 i-- 883 dAtA[i] = 0x1a 884 { 885 size, err := m.Change.MarshalToSizedBuffer(dAtA[:i]) 886 if err != nil { 887 return 0, err 888 } 889 i -= size 890 i = encodeVarintTransaction(dAtA, i, uint64(size)) 891 } 892 i-- 893 dAtA[i] = 0x12 894 if m.Phase != 0 { 895 i = encodeVarintTransaction(dAtA, i, uint64(m.Phase)) 896 i-- 897 dAtA[i] = 0x8 898 } 899 return len(dAtA) - i, nil 900 } 901 902 func (m *TransactionPhaseStatus) Marshal() (dAtA []byte, err error) { 903 size := m.Size() 904 dAtA = make([]byte, size) 905 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 906 if err != nil { 907 return nil, err 908 } 909 return dAtA[:n], nil 910 } 911 912 func (m *TransactionPhaseStatus) MarshalTo(dAtA []byte) (int, error) { 913 size := m.Size() 914 return m.MarshalToSizedBuffer(dAtA[:size]) 915 } 916 917 func (m *TransactionPhaseStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { 918 i := len(dAtA) 919 _ = i 920 var l int 921 _ = l 922 if m.Failure != nil { 923 { 924 size, err := m.Failure.MarshalToSizedBuffer(dAtA[:i]) 925 if err != nil { 926 return 0, err 927 } 928 i -= size 929 i = encodeVarintTransaction(dAtA, i, uint64(size)) 930 } 931 i-- 932 dAtA[i] = 0x22 933 } 934 if m.State != 0 { 935 i = encodeVarintTransaction(dAtA, i, uint64(m.State)) 936 i-- 937 dAtA[i] = 0x18 938 } 939 if m.End != nil { 940 n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.End):]) 941 if err9 != nil { 942 return 0, err9 943 } 944 i -= n9 945 i = encodeVarintTransaction(dAtA, i, uint64(n9)) 946 i-- 947 dAtA[i] = 0x12 948 } 949 if m.Start != nil { 950 n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start):]) 951 if err10 != nil { 952 return 0, err10 953 } 954 i -= n10 955 i = encodeVarintTransaction(dAtA, i, uint64(n10)) 956 i-- 957 dAtA[i] = 0xa 958 } 959 return len(dAtA) - i, nil 960 } 961 962 func (m *TransactionChangeStatus) Marshal() (dAtA []byte, err error) { 963 size := m.Size() 964 dAtA = make([]byte, size) 965 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 966 if err != nil { 967 return nil, err 968 } 969 return dAtA[:n], nil 970 } 971 972 func (m *TransactionChangeStatus) MarshalTo(dAtA []byte) (int, error) { 973 size := m.Size() 974 return m.MarshalToSizedBuffer(dAtA[:size]) 975 } 976 977 func (m *TransactionChangeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { 978 i := len(dAtA) 979 _ = i 980 var l int 981 _ = l 982 if m.Apply != nil { 983 { 984 size, err := m.Apply.MarshalToSizedBuffer(dAtA[:i]) 985 if err != nil { 986 return 0, err 987 } 988 i -= size 989 i = encodeVarintTransaction(dAtA, i, uint64(size)) 990 } 991 i-- 992 dAtA[i] = 0x1a 993 } 994 if m.Commit != nil { 995 { 996 size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) 997 if err != nil { 998 return 0, err 999 } 1000 i -= size 1001 i = encodeVarintTransaction(dAtA, i, uint64(size)) 1002 } 1003 i-- 1004 dAtA[i] = 0x12 1005 } 1006 if m.Ordinal != 0 { 1007 i = encodeVarintTransaction(dAtA, i, uint64(m.Ordinal)) 1008 i-- 1009 dAtA[i] = 0x8 1010 } 1011 return len(dAtA) - i, nil 1012 } 1013 1014 func (m *TransactionRollbackStatus) Marshal() (dAtA []byte, err error) { 1015 size := m.Size() 1016 dAtA = make([]byte, size) 1017 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1018 if err != nil { 1019 return nil, err 1020 } 1021 return dAtA[:n], nil 1022 } 1023 1024 func (m *TransactionRollbackStatus) MarshalTo(dAtA []byte) (int, error) { 1025 size := m.Size() 1026 return m.MarshalToSizedBuffer(dAtA[:size]) 1027 } 1028 1029 func (m *TransactionRollbackStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1030 i := len(dAtA) 1031 _ = i 1032 var l int 1033 _ = l 1034 if len(m.Values) > 0 { 1035 for k := range m.Values { 1036 v := m.Values[k] 1037 baseI := i 1038 { 1039 size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) 1040 if err != nil { 1041 return 0, err 1042 } 1043 i -= size 1044 i = encodeVarintTransaction(dAtA, i, uint64(size)) 1045 } 1046 i-- 1047 dAtA[i] = 0x12 1048 i -= len(k) 1049 copy(dAtA[i:], k) 1050 i = encodeVarintTransaction(dAtA, i, uint64(len(k))) 1051 i-- 1052 dAtA[i] = 0xa 1053 i = encodeVarintTransaction(dAtA, i, uint64(baseI-i)) 1054 i-- 1055 dAtA[i] = 0x2a 1056 } 1057 } 1058 if m.Index != 0 { 1059 i = encodeVarintTransaction(dAtA, i, uint64(m.Index)) 1060 i-- 1061 dAtA[i] = 0x20 1062 } 1063 if m.Apply != nil { 1064 { 1065 size, err := m.Apply.MarshalToSizedBuffer(dAtA[:i]) 1066 if err != nil { 1067 return 0, err 1068 } 1069 i -= size 1070 i = encodeVarintTransaction(dAtA, i, uint64(size)) 1071 } 1072 i-- 1073 dAtA[i] = 0x1a 1074 } 1075 if m.Commit != nil { 1076 { 1077 size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) 1078 if err != nil { 1079 return 0, err 1080 } 1081 i -= size 1082 i = encodeVarintTransaction(dAtA, i, uint64(size)) 1083 } 1084 i-- 1085 dAtA[i] = 0x12 1086 } 1087 if m.Ordinal != 0 { 1088 i = encodeVarintTransaction(dAtA, i, uint64(m.Ordinal)) 1089 i-- 1090 dAtA[i] = 0x8 1091 } 1092 return len(dAtA) - i, nil 1093 } 1094 1095 func (m *TransactionEvent) Marshal() (dAtA []byte, err error) { 1096 size := m.Size() 1097 dAtA = make([]byte, size) 1098 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1099 if err != nil { 1100 return nil, err 1101 } 1102 return dAtA[:n], nil 1103 } 1104 1105 func (m *TransactionEvent) MarshalTo(dAtA []byte) (int, error) { 1106 size := m.Size() 1107 return m.MarshalToSizedBuffer(dAtA[:size]) 1108 } 1109 1110 func (m *TransactionEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1111 i := len(dAtA) 1112 _ = i 1113 var l int 1114 _ = l 1115 { 1116 size, err := m.Transaction.MarshalToSizedBuffer(dAtA[:i]) 1117 if err != nil { 1118 return 0, err 1119 } 1120 i -= size 1121 i = encodeVarintTransaction(dAtA, i, uint64(size)) 1122 } 1123 i-- 1124 dAtA[i] = 0x12 1125 if m.Type != 0 { 1126 i = encodeVarintTransaction(dAtA, i, uint64(m.Type)) 1127 i-- 1128 dAtA[i] = 0x8 1129 } 1130 return len(dAtA) - i, nil 1131 } 1132 1133 func encodeVarintTransaction(dAtA []byte, offset int, v uint64) int { 1134 offset -= sovTransaction(v) 1135 base := offset 1136 for v >= 1<<7 { 1137 dAtA[offset] = uint8(v&0x7f | 0x80) 1138 v >>= 7 1139 offset++ 1140 } 1141 dAtA[offset] = uint8(v) 1142 return base 1143 } 1144 func (m *TransactionID) Size() (n int) { 1145 if m == nil { 1146 return 0 1147 } 1148 var l int 1149 _ = l 1150 l = m.Target.Size() 1151 n += 1 + l + sovTransaction(uint64(l)) 1152 if m.Index != 0 { 1153 n += 1 + sovTransaction(uint64(m.Index)) 1154 } 1155 return n 1156 } 1157 1158 func (m *TransactionStrategy) Size() (n int) { 1159 if m == nil { 1160 return 0 1161 } 1162 var l int 1163 _ = l 1164 if m.Synchronicity != 0 { 1165 n += 1 + sovTransaction(uint64(m.Synchronicity)) 1166 } 1167 return n 1168 } 1169 1170 func (m *Transaction) Size() (n int) { 1171 if m == nil { 1172 return 0 1173 } 1174 var l int 1175 _ = l 1176 l = m.ObjectMeta.Size() 1177 n += 1 + l + sovTransaction(uint64(l)) 1178 l = m.ID.Size() 1179 n += 1 + l + sovTransaction(uint64(l)) 1180 if len(m.Values) > 0 { 1181 for k, v := range m.Values { 1182 _ = k 1183 _ = v 1184 l = v.Size() 1185 mapEntrySize := 1 + len(k) + sovTransaction(uint64(len(k))) + 1 + l + sovTransaction(uint64(l)) 1186 n += mapEntrySize + 1 + sovTransaction(uint64(mapEntrySize)) 1187 } 1188 } 1189 l = m.Status.Size() 1190 n += 1 + l + sovTransaction(uint64(l)) 1191 return n 1192 } 1193 1194 func (m *TransactionStatus) Size() (n int) { 1195 if m == nil { 1196 return 0 1197 } 1198 var l int 1199 _ = l 1200 if m.Phase != 0 { 1201 n += 1 + sovTransaction(uint64(m.Phase)) 1202 } 1203 l = m.Change.Size() 1204 n += 1 + l + sovTransaction(uint64(l)) 1205 l = m.Rollback.Size() 1206 n += 1 + l + sovTransaction(uint64(l)) 1207 return n 1208 } 1209 1210 func (m *TransactionPhaseStatus) Size() (n int) { 1211 if m == nil { 1212 return 0 1213 } 1214 var l int 1215 _ = l 1216 if m.Start != nil { 1217 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start) 1218 n += 1 + l + sovTransaction(uint64(l)) 1219 } 1220 if m.End != nil { 1221 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.End) 1222 n += 1 + l + sovTransaction(uint64(l)) 1223 } 1224 if m.State != 0 { 1225 n += 1 + sovTransaction(uint64(m.State)) 1226 } 1227 if m.Failure != nil { 1228 l = m.Failure.Size() 1229 n += 1 + l + sovTransaction(uint64(l)) 1230 } 1231 return n 1232 } 1233 1234 func (m *TransactionChangeStatus) Size() (n int) { 1235 if m == nil { 1236 return 0 1237 } 1238 var l int 1239 _ = l 1240 if m.Ordinal != 0 { 1241 n += 1 + sovTransaction(uint64(m.Ordinal)) 1242 } 1243 if m.Commit != nil { 1244 l = m.Commit.Size() 1245 n += 1 + l + sovTransaction(uint64(l)) 1246 } 1247 if m.Apply != nil { 1248 l = m.Apply.Size() 1249 n += 1 + l + sovTransaction(uint64(l)) 1250 } 1251 return n 1252 } 1253 1254 func (m *TransactionRollbackStatus) Size() (n int) { 1255 if m == nil { 1256 return 0 1257 } 1258 var l int 1259 _ = l 1260 if m.Ordinal != 0 { 1261 n += 1 + sovTransaction(uint64(m.Ordinal)) 1262 } 1263 if m.Commit != nil { 1264 l = m.Commit.Size() 1265 n += 1 + l + sovTransaction(uint64(l)) 1266 } 1267 if m.Apply != nil { 1268 l = m.Apply.Size() 1269 n += 1 + l + sovTransaction(uint64(l)) 1270 } 1271 if m.Index != 0 { 1272 n += 1 + sovTransaction(uint64(m.Index)) 1273 } 1274 if len(m.Values) > 0 { 1275 for k, v := range m.Values { 1276 _ = k 1277 _ = v 1278 l = v.Size() 1279 mapEntrySize := 1 + len(k) + sovTransaction(uint64(len(k))) + 1 + l + sovTransaction(uint64(l)) 1280 n += mapEntrySize + 1 + sovTransaction(uint64(mapEntrySize)) 1281 } 1282 } 1283 return n 1284 } 1285 1286 func (m *TransactionEvent) Size() (n int) { 1287 if m == nil { 1288 return 0 1289 } 1290 var l int 1291 _ = l 1292 if m.Type != 0 { 1293 n += 1 + sovTransaction(uint64(m.Type)) 1294 } 1295 l = m.Transaction.Size() 1296 n += 1 + l + sovTransaction(uint64(l)) 1297 return n 1298 } 1299 1300 func sovTransaction(x uint64) (n int) { 1301 return (math_bits.Len64(x|1) + 6) / 7 1302 } 1303 func sozTransaction(x uint64) (n int) { 1304 return sovTransaction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1305 } 1306 func (m *TransactionID) Unmarshal(dAtA []byte) error { 1307 l := len(dAtA) 1308 iNdEx := 0 1309 for iNdEx < l { 1310 preIndex := iNdEx 1311 var wire uint64 1312 for shift := uint(0); ; shift += 7 { 1313 if shift >= 64 { 1314 return ErrIntOverflowTransaction 1315 } 1316 if iNdEx >= l { 1317 return io.ErrUnexpectedEOF 1318 } 1319 b := dAtA[iNdEx] 1320 iNdEx++ 1321 wire |= uint64(b&0x7F) << shift 1322 if b < 0x80 { 1323 break 1324 } 1325 } 1326 fieldNum := int32(wire >> 3) 1327 wireType := int(wire & 0x7) 1328 if wireType == 4 { 1329 return fmt.Errorf("proto: TransactionID: wiretype end group for non-group") 1330 } 1331 if fieldNum <= 0 { 1332 return fmt.Errorf("proto: TransactionID: illegal tag %d (wire type %d)", fieldNum, wire) 1333 } 1334 switch fieldNum { 1335 case 1: 1336 if wireType != 2 { 1337 return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) 1338 } 1339 var msglen int 1340 for shift := uint(0); ; shift += 7 { 1341 if shift >= 64 { 1342 return ErrIntOverflowTransaction 1343 } 1344 if iNdEx >= l { 1345 return io.ErrUnexpectedEOF 1346 } 1347 b := dAtA[iNdEx] 1348 iNdEx++ 1349 msglen |= int(b&0x7F) << shift 1350 if b < 0x80 { 1351 break 1352 } 1353 } 1354 if msglen < 0 { 1355 return ErrInvalidLengthTransaction 1356 } 1357 postIndex := iNdEx + msglen 1358 if postIndex < 0 { 1359 return ErrInvalidLengthTransaction 1360 } 1361 if postIndex > l { 1362 return io.ErrUnexpectedEOF 1363 } 1364 if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1365 return err 1366 } 1367 iNdEx = postIndex 1368 case 2: 1369 if wireType != 0 { 1370 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 1371 } 1372 m.Index = 0 1373 for shift := uint(0); ; shift += 7 { 1374 if shift >= 64 { 1375 return ErrIntOverflowTransaction 1376 } 1377 if iNdEx >= l { 1378 return io.ErrUnexpectedEOF 1379 } 1380 b := dAtA[iNdEx] 1381 iNdEx++ 1382 m.Index |= Index(b&0x7F) << shift 1383 if b < 0x80 { 1384 break 1385 } 1386 } 1387 default: 1388 iNdEx = preIndex 1389 skippy, err := skipTransaction(dAtA[iNdEx:]) 1390 if err != nil { 1391 return err 1392 } 1393 if (skippy < 0) || (iNdEx+skippy) < 0 { 1394 return ErrInvalidLengthTransaction 1395 } 1396 if (iNdEx + skippy) > l { 1397 return io.ErrUnexpectedEOF 1398 } 1399 iNdEx += skippy 1400 } 1401 } 1402 1403 if iNdEx > l { 1404 return io.ErrUnexpectedEOF 1405 } 1406 return nil 1407 } 1408 func (m *TransactionStrategy) Unmarshal(dAtA []byte) error { 1409 l := len(dAtA) 1410 iNdEx := 0 1411 for iNdEx < l { 1412 preIndex := iNdEx 1413 var wire uint64 1414 for shift := uint(0); ; shift += 7 { 1415 if shift >= 64 { 1416 return ErrIntOverflowTransaction 1417 } 1418 if iNdEx >= l { 1419 return io.ErrUnexpectedEOF 1420 } 1421 b := dAtA[iNdEx] 1422 iNdEx++ 1423 wire |= uint64(b&0x7F) << shift 1424 if b < 0x80 { 1425 break 1426 } 1427 } 1428 fieldNum := int32(wire >> 3) 1429 wireType := int(wire & 0x7) 1430 if wireType == 4 { 1431 return fmt.Errorf("proto: TransactionStrategy: wiretype end group for non-group") 1432 } 1433 if fieldNum <= 0 { 1434 return fmt.Errorf("proto: TransactionStrategy: illegal tag %d (wire type %d)", fieldNum, wire) 1435 } 1436 switch fieldNum { 1437 case 1: 1438 if wireType != 0 { 1439 return fmt.Errorf("proto: wrong wireType = %d for field Synchronicity", wireType) 1440 } 1441 m.Synchronicity = 0 1442 for shift := uint(0); ; shift += 7 { 1443 if shift >= 64 { 1444 return ErrIntOverflowTransaction 1445 } 1446 if iNdEx >= l { 1447 return io.ErrUnexpectedEOF 1448 } 1449 b := dAtA[iNdEx] 1450 iNdEx++ 1451 m.Synchronicity |= TransactionStrategy_Synchronicity(b&0x7F) << shift 1452 if b < 0x80 { 1453 break 1454 } 1455 } 1456 default: 1457 iNdEx = preIndex 1458 skippy, err := skipTransaction(dAtA[iNdEx:]) 1459 if err != nil { 1460 return err 1461 } 1462 if (skippy < 0) || (iNdEx+skippy) < 0 { 1463 return ErrInvalidLengthTransaction 1464 } 1465 if (iNdEx + skippy) > l { 1466 return io.ErrUnexpectedEOF 1467 } 1468 iNdEx += skippy 1469 } 1470 } 1471 1472 if iNdEx > l { 1473 return io.ErrUnexpectedEOF 1474 } 1475 return nil 1476 } 1477 func (m *Transaction) Unmarshal(dAtA []byte) error { 1478 l := len(dAtA) 1479 iNdEx := 0 1480 for iNdEx < l { 1481 preIndex := iNdEx 1482 var wire uint64 1483 for shift := uint(0); ; shift += 7 { 1484 if shift >= 64 { 1485 return ErrIntOverflowTransaction 1486 } 1487 if iNdEx >= l { 1488 return io.ErrUnexpectedEOF 1489 } 1490 b := dAtA[iNdEx] 1491 iNdEx++ 1492 wire |= uint64(b&0x7F) << shift 1493 if b < 0x80 { 1494 break 1495 } 1496 } 1497 fieldNum := int32(wire >> 3) 1498 wireType := int(wire & 0x7) 1499 if wireType == 4 { 1500 return fmt.Errorf("proto: Transaction: wiretype end group for non-group") 1501 } 1502 if fieldNum <= 0 { 1503 return fmt.Errorf("proto: Transaction: illegal tag %d (wire type %d)", fieldNum, wire) 1504 } 1505 switch fieldNum { 1506 case 1: 1507 if wireType != 2 { 1508 return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) 1509 } 1510 var msglen int 1511 for shift := uint(0); ; shift += 7 { 1512 if shift >= 64 { 1513 return ErrIntOverflowTransaction 1514 } 1515 if iNdEx >= l { 1516 return io.ErrUnexpectedEOF 1517 } 1518 b := dAtA[iNdEx] 1519 iNdEx++ 1520 msglen |= int(b&0x7F) << shift 1521 if b < 0x80 { 1522 break 1523 } 1524 } 1525 if msglen < 0 { 1526 return ErrInvalidLengthTransaction 1527 } 1528 postIndex := iNdEx + msglen 1529 if postIndex < 0 { 1530 return ErrInvalidLengthTransaction 1531 } 1532 if postIndex > l { 1533 return io.ErrUnexpectedEOF 1534 } 1535 if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1536 return err 1537 } 1538 iNdEx = postIndex 1539 case 2: 1540 if wireType != 2 { 1541 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 1542 } 1543 var msglen int 1544 for shift := uint(0); ; shift += 7 { 1545 if shift >= 64 { 1546 return ErrIntOverflowTransaction 1547 } 1548 if iNdEx >= l { 1549 return io.ErrUnexpectedEOF 1550 } 1551 b := dAtA[iNdEx] 1552 iNdEx++ 1553 msglen |= int(b&0x7F) << shift 1554 if b < 0x80 { 1555 break 1556 } 1557 } 1558 if msglen < 0 { 1559 return ErrInvalidLengthTransaction 1560 } 1561 postIndex := iNdEx + msglen 1562 if postIndex < 0 { 1563 return ErrInvalidLengthTransaction 1564 } 1565 if postIndex > l { 1566 return io.ErrUnexpectedEOF 1567 } 1568 if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1569 return err 1570 } 1571 iNdEx = postIndex 1572 case 3: 1573 if wireType != 2 { 1574 return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) 1575 } 1576 var msglen int 1577 for shift := uint(0); ; shift += 7 { 1578 if shift >= 64 { 1579 return ErrIntOverflowTransaction 1580 } 1581 if iNdEx >= l { 1582 return io.ErrUnexpectedEOF 1583 } 1584 b := dAtA[iNdEx] 1585 iNdEx++ 1586 msglen |= int(b&0x7F) << shift 1587 if b < 0x80 { 1588 break 1589 } 1590 } 1591 if msglen < 0 { 1592 return ErrInvalidLengthTransaction 1593 } 1594 postIndex := iNdEx + msglen 1595 if postIndex < 0 { 1596 return ErrInvalidLengthTransaction 1597 } 1598 if postIndex > l { 1599 return io.ErrUnexpectedEOF 1600 } 1601 if m.Values == nil { 1602 m.Values = make(map[string]PathValue) 1603 } 1604 var mapkey string 1605 mapvalue := &PathValue{} 1606 for iNdEx < postIndex { 1607 entryPreIndex := iNdEx 1608 var wire uint64 1609 for shift := uint(0); ; shift += 7 { 1610 if shift >= 64 { 1611 return ErrIntOverflowTransaction 1612 } 1613 if iNdEx >= l { 1614 return io.ErrUnexpectedEOF 1615 } 1616 b := dAtA[iNdEx] 1617 iNdEx++ 1618 wire |= uint64(b&0x7F) << shift 1619 if b < 0x80 { 1620 break 1621 } 1622 } 1623 fieldNum := int32(wire >> 3) 1624 if fieldNum == 1 { 1625 var stringLenmapkey uint64 1626 for shift := uint(0); ; shift += 7 { 1627 if shift >= 64 { 1628 return ErrIntOverflowTransaction 1629 } 1630 if iNdEx >= l { 1631 return io.ErrUnexpectedEOF 1632 } 1633 b := dAtA[iNdEx] 1634 iNdEx++ 1635 stringLenmapkey |= uint64(b&0x7F) << shift 1636 if b < 0x80 { 1637 break 1638 } 1639 } 1640 intStringLenmapkey := int(stringLenmapkey) 1641 if intStringLenmapkey < 0 { 1642 return ErrInvalidLengthTransaction 1643 } 1644 postStringIndexmapkey := iNdEx + intStringLenmapkey 1645 if postStringIndexmapkey < 0 { 1646 return ErrInvalidLengthTransaction 1647 } 1648 if postStringIndexmapkey > l { 1649 return io.ErrUnexpectedEOF 1650 } 1651 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1652 iNdEx = postStringIndexmapkey 1653 } else if fieldNum == 2 { 1654 var mapmsglen int 1655 for shift := uint(0); ; shift += 7 { 1656 if shift >= 64 { 1657 return ErrIntOverflowTransaction 1658 } 1659 if iNdEx >= l { 1660 return io.ErrUnexpectedEOF 1661 } 1662 b := dAtA[iNdEx] 1663 iNdEx++ 1664 mapmsglen |= int(b&0x7F) << shift 1665 if b < 0x80 { 1666 break 1667 } 1668 } 1669 if mapmsglen < 0 { 1670 return ErrInvalidLengthTransaction 1671 } 1672 postmsgIndex := iNdEx + mapmsglen 1673 if postmsgIndex < 0 { 1674 return ErrInvalidLengthTransaction 1675 } 1676 if postmsgIndex > l { 1677 return io.ErrUnexpectedEOF 1678 } 1679 mapvalue = &PathValue{} 1680 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 1681 return err 1682 } 1683 iNdEx = postmsgIndex 1684 } else { 1685 iNdEx = entryPreIndex 1686 skippy, err := skipTransaction(dAtA[iNdEx:]) 1687 if err != nil { 1688 return err 1689 } 1690 if (skippy < 0) || (iNdEx+skippy) < 0 { 1691 return ErrInvalidLengthTransaction 1692 } 1693 if (iNdEx + skippy) > postIndex { 1694 return io.ErrUnexpectedEOF 1695 } 1696 iNdEx += skippy 1697 } 1698 } 1699 m.Values[mapkey] = *mapvalue 1700 iNdEx = postIndex 1701 case 4: 1702 if wireType != 2 { 1703 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 1704 } 1705 var msglen int 1706 for shift := uint(0); ; shift += 7 { 1707 if shift >= 64 { 1708 return ErrIntOverflowTransaction 1709 } 1710 if iNdEx >= l { 1711 return io.ErrUnexpectedEOF 1712 } 1713 b := dAtA[iNdEx] 1714 iNdEx++ 1715 msglen |= int(b&0x7F) << shift 1716 if b < 0x80 { 1717 break 1718 } 1719 } 1720 if msglen < 0 { 1721 return ErrInvalidLengthTransaction 1722 } 1723 postIndex := iNdEx + msglen 1724 if postIndex < 0 { 1725 return ErrInvalidLengthTransaction 1726 } 1727 if postIndex > l { 1728 return io.ErrUnexpectedEOF 1729 } 1730 if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1731 return err 1732 } 1733 iNdEx = postIndex 1734 default: 1735 iNdEx = preIndex 1736 skippy, err := skipTransaction(dAtA[iNdEx:]) 1737 if err != nil { 1738 return err 1739 } 1740 if (skippy < 0) || (iNdEx+skippy) < 0 { 1741 return ErrInvalidLengthTransaction 1742 } 1743 if (iNdEx + skippy) > l { 1744 return io.ErrUnexpectedEOF 1745 } 1746 iNdEx += skippy 1747 } 1748 } 1749 1750 if iNdEx > l { 1751 return io.ErrUnexpectedEOF 1752 } 1753 return nil 1754 } 1755 func (m *TransactionStatus) Unmarshal(dAtA []byte) error { 1756 l := len(dAtA) 1757 iNdEx := 0 1758 for iNdEx < l { 1759 preIndex := iNdEx 1760 var wire uint64 1761 for shift := uint(0); ; shift += 7 { 1762 if shift >= 64 { 1763 return ErrIntOverflowTransaction 1764 } 1765 if iNdEx >= l { 1766 return io.ErrUnexpectedEOF 1767 } 1768 b := dAtA[iNdEx] 1769 iNdEx++ 1770 wire |= uint64(b&0x7F) << shift 1771 if b < 0x80 { 1772 break 1773 } 1774 } 1775 fieldNum := int32(wire >> 3) 1776 wireType := int(wire & 0x7) 1777 if wireType == 4 { 1778 return fmt.Errorf("proto: TransactionStatus: wiretype end group for non-group") 1779 } 1780 if fieldNum <= 0 { 1781 return fmt.Errorf("proto: TransactionStatus: illegal tag %d (wire type %d)", fieldNum, wire) 1782 } 1783 switch fieldNum { 1784 case 1: 1785 if wireType != 0 { 1786 return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) 1787 } 1788 m.Phase = 0 1789 for shift := uint(0); ; shift += 7 { 1790 if shift >= 64 { 1791 return ErrIntOverflowTransaction 1792 } 1793 if iNdEx >= l { 1794 return io.ErrUnexpectedEOF 1795 } 1796 b := dAtA[iNdEx] 1797 iNdEx++ 1798 m.Phase |= TransactionStatus_Phase(b&0x7F) << shift 1799 if b < 0x80 { 1800 break 1801 } 1802 } 1803 case 2: 1804 if wireType != 2 { 1805 return fmt.Errorf("proto: wrong wireType = %d for field Change", wireType) 1806 } 1807 var msglen int 1808 for shift := uint(0); ; shift += 7 { 1809 if shift >= 64 { 1810 return ErrIntOverflowTransaction 1811 } 1812 if iNdEx >= l { 1813 return io.ErrUnexpectedEOF 1814 } 1815 b := dAtA[iNdEx] 1816 iNdEx++ 1817 msglen |= int(b&0x7F) << shift 1818 if b < 0x80 { 1819 break 1820 } 1821 } 1822 if msglen < 0 { 1823 return ErrInvalidLengthTransaction 1824 } 1825 postIndex := iNdEx + msglen 1826 if postIndex < 0 { 1827 return ErrInvalidLengthTransaction 1828 } 1829 if postIndex > l { 1830 return io.ErrUnexpectedEOF 1831 } 1832 if err := m.Change.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1833 return err 1834 } 1835 iNdEx = postIndex 1836 case 3: 1837 if wireType != 2 { 1838 return fmt.Errorf("proto: wrong wireType = %d for field Rollback", wireType) 1839 } 1840 var msglen int 1841 for shift := uint(0); ; shift += 7 { 1842 if shift >= 64 { 1843 return ErrIntOverflowTransaction 1844 } 1845 if iNdEx >= l { 1846 return io.ErrUnexpectedEOF 1847 } 1848 b := dAtA[iNdEx] 1849 iNdEx++ 1850 msglen |= int(b&0x7F) << shift 1851 if b < 0x80 { 1852 break 1853 } 1854 } 1855 if msglen < 0 { 1856 return ErrInvalidLengthTransaction 1857 } 1858 postIndex := iNdEx + msglen 1859 if postIndex < 0 { 1860 return ErrInvalidLengthTransaction 1861 } 1862 if postIndex > l { 1863 return io.ErrUnexpectedEOF 1864 } 1865 if err := m.Rollback.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1866 return err 1867 } 1868 iNdEx = postIndex 1869 default: 1870 iNdEx = preIndex 1871 skippy, err := skipTransaction(dAtA[iNdEx:]) 1872 if err != nil { 1873 return err 1874 } 1875 if (skippy < 0) || (iNdEx+skippy) < 0 { 1876 return ErrInvalidLengthTransaction 1877 } 1878 if (iNdEx + skippy) > l { 1879 return io.ErrUnexpectedEOF 1880 } 1881 iNdEx += skippy 1882 } 1883 } 1884 1885 if iNdEx > l { 1886 return io.ErrUnexpectedEOF 1887 } 1888 return nil 1889 } 1890 func (m *TransactionPhaseStatus) Unmarshal(dAtA []byte) error { 1891 l := len(dAtA) 1892 iNdEx := 0 1893 for iNdEx < l { 1894 preIndex := iNdEx 1895 var wire uint64 1896 for shift := uint(0); ; shift += 7 { 1897 if shift >= 64 { 1898 return ErrIntOverflowTransaction 1899 } 1900 if iNdEx >= l { 1901 return io.ErrUnexpectedEOF 1902 } 1903 b := dAtA[iNdEx] 1904 iNdEx++ 1905 wire |= uint64(b&0x7F) << shift 1906 if b < 0x80 { 1907 break 1908 } 1909 } 1910 fieldNum := int32(wire >> 3) 1911 wireType := int(wire & 0x7) 1912 if wireType == 4 { 1913 return fmt.Errorf("proto: TransactionPhaseStatus: wiretype end group for non-group") 1914 } 1915 if fieldNum <= 0 { 1916 return fmt.Errorf("proto: TransactionPhaseStatus: illegal tag %d (wire type %d)", fieldNum, wire) 1917 } 1918 switch fieldNum { 1919 case 1: 1920 if wireType != 2 { 1921 return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) 1922 } 1923 var msglen int 1924 for shift := uint(0); ; shift += 7 { 1925 if shift >= 64 { 1926 return ErrIntOverflowTransaction 1927 } 1928 if iNdEx >= l { 1929 return io.ErrUnexpectedEOF 1930 } 1931 b := dAtA[iNdEx] 1932 iNdEx++ 1933 msglen |= int(b&0x7F) << shift 1934 if b < 0x80 { 1935 break 1936 } 1937 } 1938 if msglen < 0 { 1939 return ErrInvalidLengthTransaction 1940 } 1941 postIndex := iNdEx + msglen 1942 if postIndex < 0 { 1943 return ErrInvalidLengthTransaction 1944 } 1945 if postIndex > l { 1946 return io.ErrUnexpectedEOF 1947 } 1948 if m.Start == nil { 1949 m.Start = new(time.Time) 1950 } 1951 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Start, dAtA[iNdEx:postIndex]); err != nil { 1952 return err 1953 } 1954 iNdEx = postIndex 1955 case 2: 1956 if wireType != 2 { 1957 return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) 1958 } 1959 var msglen int 1960 for shift := uint(0); ; shift += 7 { 1961 if shift >= 64 { 1962 return ErrIntOverflowTransaction 1963 } 1964 if iNdEx >= l { 1965 return io.ErrUnexpectedEOF 1966 } 1967 b := dAtA[iNdEx] 1968 iNdEx++ 1969 msglen |= int(b&0x7F) << shift 1970 if b < 0x80 { 1971 break 1972 } 1973 } 1974 if msglen < 0 { 1975 return ErrInvalidLengthTransaction 1976 } 1977 postIndex := iNdEx + msglen 1978 if postIndex < 0 { 1979 return ErrInvalidLengthTransaction 1980 } 1981 if postIndex > l { 1982 return io.ErrUnexpectedEOF 1983 } 1984 if m.End == nil { 1985 m.End = new(time.Time) 1986 } 1987 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.End, dAtA[iNdEx:postIndex]); err != nil { 1988 return err 1989 } 1990 iNdEx = postIndex 1991 case 3: 1992 if wireType != 0 { 1993 return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) 1994 } 1995 m.State = 0 1996 for shift := uint(0); ; shift += 7 { 1997 if shift >= 64 { 1998 return ErrIntOverflowTransaction 1999 } 2000 if iNdEx >= l { 2001 return io.ErrUnexpectedEOF 2002 } 2003 b := dAtA[iNdEx] 2004 iNdEx++ 2005 m.State |= TransactionPhaseStatus_State(b&0x7F) << shift 2006 if b < 0x80 { 2007 break 2008 } 2009 } 2010 case 4: 2011 if wireType != 2 { 2012 return fmt.Errorf("proto: wrong wireType = %d for field Failure", wireType) 2013 } 2014 var msglen int 2015 for shift := uint(0); ; shift += 7 { 2016 if shift >= 64 { 2017 return ErrIntOverflowTransaction 2018 } 2019 if iNdEx >= l { 2020 return io.ErrUnexpectedEOF 2021 } 2022 b := dAtA[iNdEx] 2023 iNdEx++ 2024 msglen |= int(b&0x7F) << shift 2025 if b < 0x80 { 2026 break 2027 } 2028 } 2029 if msglen < 0 { 2030 return ErrInvalidLengthTransaction 2031 } 2032 postIndex := iNdEx + msglen 2033 if postIndex < 0 { 2034 return ErrInvalidLengthTransaction 2035 } 2036 if postIndex > l { 2037 return io.ErrUnexpectedEOF 2038 } 2039 if m.Failure == nil { 2040 m.Failure = &Failure{} 2041 } 2042 if err := m.Failure.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2043 return err 2044 } 2045 iNdEx = postIndex 2046 default: 2047 iNdEx = preIndex 2048 skippy, err := skipTransaction(dAtA[iNdEx:]) 2049 if err != nil { 2050 return err 2051 } 2052 if (skippy < 0) || (iNdEx+skippy) < 0 { 2053 return ErrInvalidLengthTransaction 2054 } 2055 if (iNdEx + skippy) > l { 2056 return io.ErrUnexpectedEOF 2057 } 2058 iNdEx += skippy 2059 } 2060 } 2061 2062 if iNdEx > l { 2063 return io.ErrUnexpectedEOF 2064 } 2065 return nil 2066 } 2067 func (m *TransactionChangeStatus) Unmarshal(dAtA []byte) error { 2068 l := len(dAtA) 2069 iNdEx := 0 2070 for iNdEx < l { 2071 preIndex := iNdEx 2072 var wire uint64 2073 for shift := uint(0); ; shift += 7 { 2074 if shift >= 64 { 2075 return ErrIntOverflowTransaction 2076 } 2077 if iNdEx >= l { 2078 return io.ErrUnexpectedEOF 2079 } 2080 b := dAtA[iNdEx] 2081 iNdEx++ 2082 wire |= uint64(b&0x7F) << shift 2083 if b < 0x80 { 2084 break 2085 } 2086 } 2087 fieldNum := int32(wire >> 3) 2088 wireType := int(wire & 0x7) 2089 if wireType == 4 { 2090 return fmt.Errorf("proto: TransactionChangeStatus: wiretype end group for non-group") 2091 } 2092 if fieldNum <= 0 { 2093 return fmt.Errorf("proto: TransactionChangeStatus: illegal tag %d (wire type %d)", fieldNum, wire) 2094 } 2095 switch fieldNum { 2096 case 1: 2097 if wireType != 0 { 2098 return fmt.Errorf("proto: wrong wireType = %d for field Ordinal", wireType) 2099 } 2100 m.Ordinal = 0 2101 for shift := uint(0); ; shift += 7 { 2102 if shift >= 64 { 2103 return ErrIntOverflowTransaction 2104 } 2105 if iNdEx >= l { 2106 return io.ErrUnexpectedEOF 2107 } 2108 b := dAtA[iNdEx] 2109 iNdEx++ 2110 m.Ordinal |= Ordinal(b&0x7F) << shift 2111 if b < 0x80 { 2112 break 2113 } 2114 } 2115 case 2: 2116 if wireType != 2 { 2117 return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) 2118 } 2119 var msglen int 2120 for shift := uint(0); ; shift += 7 { 2121 if shift >= 64 { 2122 return ErrIntOverflowTransaction 2123 } 2124 if iNdEx >= l { 2125 return io.ErrUnexpectedEOF 2126 } 2127 b := dAtA[iNdEx] 2128 iNdEx++ 2129 msglen |= int(b&0x7F) << shift 2130 if b < 0x80 { 2131 break 2132 } 2133 } 2134 if msglen < 0 { 2135 return ErrInvalidLengthTransaction 2136 } 2137 postIndex := iNdEx + msglen 2138 if postIndex < 0 { 2139 return ErrInvalidLengthTransaction 2140 } 2141 if postIndex > l { 2142 return io.ErrUnexpectedEOF 2143 } 2144 if m.Commit == nil { 2145 m.Commit = &TransactionPhaseStatus{} 2146 } 2147 if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2148 return err 2149 } 2150 iNdEx = postIndex 2151 case 3: 2152 if wireType != 2 { 2153 return fmt.Errorf("proto: wrong wireType = %d for field Apply", wireType) 2154 } 2155 var msglen int 2156 for shift := uint(0); ; shift += 7 { 2157 if shift >= 64 { 2158 return ErrIntOverflowTransaction 2159 } 2160 if iNdEx >= l { 2161 return io.ErrUnexpectedEOF 2162 } 2163 b := dAtA[iNdEx] 2164 iNdEx++ 2165 msglen |= int(b&0x7F) << shift 2166 if b < 0x80 { 2167 break 2168 } 2169 } 2170 if msglen < 0 { 2171 return ErrInvalidLengthTransaction 2172 } 2173 postIndex := iNdEx + msglen 2174 if postIndex < 0 { 2175 return ErrInvalidLengthTransaction 2176 } 2177 if postIndex > l { 2178 return io.ErrUnexpectedEOF 2179 } 2180 if m.Apply == nil { 2181 m.Apply = &TransactionPhaseStatus{} 2182 } 2183 if err := m.Apply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2184 return err 2185 } 2186 iNdEx = postIndex 2187 default: 2188 iNdEx = preIndex 2189 skippy, err := skipTransaction(dAtA[iNdEx:]) 2190 if err != nil { 2191 return err 2192 } 2193 if (skippy < 0) || (iNdEx+skippy) < 0 { 2194 return ErrInvalidLengthTransaction 2195 } 2196 if (iNdEx + skippy) > l { 2197 return io.ErrUnexpectedEOF 2198 } 2199 iNdEx += skippy 2200 } 2201 } 2202 2203 if iNdEx > l { 2204 return io.ErrUnexpectedEOF 2205 } 2206 return nil 2207 } 2208 func (m *TransactionRollbackStatus) Unmarshal(dAtA []byte) error { 2209 l := len(dAtA) 2210 iNdEx := 0 2211 for iNdEx < l { 2212 preIndex := iNdEx 2213 var wire uint64 2214 for shift := uint(0); ; shift += 7 { 2215 if shift >= 64 { 2216 return ErrIntOverflowTransaction 2217 } 2218 if iNdEx >= l { 2219 return io.ErrUnexpectedEOF 2220 } 2221 b := dAtA[iNdEx] 2222 iNdEx++ 2223 wire |= uint64(b&0x7F) << shift 2224 if b < 0x80 { 2225 break 2226 } 2227 } 2228 fieldNum := int32(wire >> 3) 2229 wireType := int(wire & 0x7) 2230 if wireType == 4 { 2231 return fmt.Errorf("proto: TransactionRollbackStatus: wiretype end group for non-group") 2232 } 2233 if fieldNum <= 0 { 2234 return fmt.Errorf("proto: TransactionRollbackStatus: illegal tag %d (wire type %d)", fieldNum, wire) 2235 } 2236 switch fieldNum { 2237 case 1: 2238 if wireType != 0 { 2239 return fmt.Errorf("proto: wrong wireType = %d for field Ordinal", wireType) 2240 } 2241 m.Ordinal = 0 2242 for shift := uint(0); ; shift += 7 { 2243 if shift >= 64 { 2244 return ErrIntOverflowTransaction 2245 } 2246 if iNdEx >= l { 2247 return io.ErrUnexpectedEOF 2248 } 2249 b := dAtA[iNdEx] 2250 iNdEx++ 2251 m.Ordinal |= Ordinal(b&0x7F) << shift 2252 if b < 0x80 { 2253 break 2254 } 2255 } 2256 case 2: 2257 if wireType != 2 { 2258 return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) 2259 } 2260 var msglen int 2261 for shift := uint(0); ; shift += 7 { 2262 if shift >= 64 { 2263 return ErrIntOverflowTransaction 2264 } 2265 if iNdEx >= l { 2266 return io.ErrUnexpectedEOF 2267 } 2268 b := dAtA[iNdEx] 2269 iNdEx++ 2270 msglen |= int(b&0x7F) << shift 2271 if b < 0x80 { 2272 break 2273 } 2274 } 2275 if msglen < 0 { 2276 return ErrInvalidLengthTransaction 2277 } 2278 postIndex := iNdEx + msglen 2279 if postIndex < 0 { 2280 return ErrInvalidLengthTransaction 2281 } 2282 if postIndex > l { 2283 return io.ErrUnexpectedEOF 2284 } 2285 if m.Commit == nil { 2286 m.Commit = &TransactionPhaseStatus{} 2287 } 2288 if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2289 return err 2290 } 2291 iNdEx = postIndex 2292 case 3: 2293 if wireType != 2 { 2294 return fmt.Errorf("proto: wrong wireType = %d for field Apply", wireType) 2295 } 2296 var msglen int 2297 for shift := uint(0); ; shift += 7 { 2298 if shift >= 64 { 2299 return ErrIntOverflowTransaction 2300 } 2301 if iNdEx >= l { 2302 return io.ErrUnexpectedEOF 2303 } 2304 b := dAtA[iNdEx] 2305 iNdEx++ 2306 msglen |= int(b&0x7F) << shift 2307 if b < 0x80 { 2308 break 2309 } 2310 } 2311 if msglen < 0 { 2312 return ErrInvalidLengthTransaction 2313 } 2314 postIndex := iNdEx + msglen 2315 if postIndex < 0 { 2316 return ErrInvalidLengthTransaction 2317 } 2318 if postIndex > l { 2319 return io.ErrUnexpectedEOF 2320 } 2321 if m.Apply == nil { 2322 m.Apply = &TransactionPhaseStatus{} 2323 } 2324 if err := m.Apply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2325 return err 2326 } 2327 iNdEx = postIndex 2328 case 4: 2329 if wireType != 0 { 2330 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 2331 } 2332 m.Index = 0 2333 for shift := uint(0); ; shift += 7 { 2334 if shift >= 64 { 2335 return ErrIntOverflowTransaction 2336 } 2337 if iNdEx >= l { 2338 return io.ErrUnexpectedEOF 2339 } 2340 b := dAtA[iNdEx] 2341 iNdEx++ 2342 m.Index |= Index(b&0x7F) << shift 2343 if b < 0x80 { 2344 break 2345 } 2346 } 2347 case 5: 2348 if wireType != 2 { 2349 return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) 2350 } 2351 var msglen int 2352 for shift := uint(0); ; shift += 7 { 2353 if shift >= 64 { 2354 return ErrIntOverflowTransaction 2355 } 2356 if iNdEx >= l { 2357 return io.ErrUnexpectedEOF 2358 } 2359 b := dAtA[iNdEx] 2360 iNdEx++ 2361 msglen |= int(b&0x7F) << shift 2362 if b < 0x80 { 2363 break 2364 } 2365 } 2366 if msglen < 0 { 2367 return ErrInvalidLengthTransaction 2368 } 2369 postIndex := iNdEx + msglen 2370 if postIndex < 0 { 2371 return ErrInvalidLengthTransaction 2372 } 2373 if postIndex > l { 2374 return io.ErrUnexpectedEOF 2375 } 2376 if m.Values == nil { 2377 m.Values = make(map[string]PathValue) 2378 } 2379 var mapkey string 2380 mapvalue := &PathValue{} 2381 for iNdEx < postIndex { 2382 entryPreIndex := iNdEx 2383 var wire uint64 2384 for shift := uint(0); ; shift += 7 { 2385 if shift >= 64 { 2386 return ErrIntOverflowTransaction 2387 } 2388 if iNdEx >= l { 2389 return io.ErrUnexpectedEOF 2390 } 2391 b := dAtA[iNdEx] 2392 iNdEx++ 2393 wire |= uint64(b&0x7F) << shift 2394 if b < 0x80 { 2395 break 2396 } 2397 } 2398 fieldNum := int32(wire >> 3) 2399 if fieldNum == 1 { 2400 var stringLenmapkey uint64 2401 for shift := uint(0); ; shift += 7 { 2402 if shift >= 64 { 2403 return ErrIntOverflowTransaction 2404 } 2405 if iNdEx >= l { 2406 return io.ErrUnexpectedEOF 2407 } 2408 b := dAtA[iNdEx] 2409 iNdEx++ 2410 stringLenmapkey |= uint64(b&0x7F) << shift 2411 if b < 0x80 { 2412 break 2413 } 2414 } 2415 intStringLenmapkey := int(stringLenmapkey) 2416 if intStringLenmapkey < 0 { 2417 return ErrInvalidLengthTransaction 2418 } 2419 postStringIndexmapkey := iNdEx + intStringLenmapkey 2420 if postStringIndexmapkey < 0 { 2421 return ErrInvalidLengthTransaction 2422 } 2423 if postStringIndexmapkey > l { 2424 return io.ErrUnexpectedEOF 2425 } 2426 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 2427 iNdEx = postStringIndexmapkey 2428 } else if fieldNum == 2 { 2429 var mapmsglen int 2430 for shift := uint(0); ; shift += 7 { 2431 if shift >= 64 { 2432 return ErrIntOverflowTransaction 2433 } 2434 if iNdEx >= l { 2435 return io.ErrUnexpectedEOF 2436 } 2437 b := dAtA[iNdEx] 2438 iNdEx++ 2439 mapmsglen |= int(b&0x7F) << shift 2440 if b < 0x80 { 2441 break 2442 } 2443 } 2444 if mapmsglen < 0 { 2445 return ErrInvalidLengthTransaction 2446 } 2447 postmsgIndex := iNdEx + mapmsglen 2448 if postmsgIndex < 0 { 2449 return ErrInvalidLengthTransaction 2450 } 2451 if postmsgIndex > l { 2452 return io.ErrUnexpectedEOF 2453 } 2454 mapvalue = &PathValue{} 2455 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 2456 return err 2457 } 2458 iNdEx = postmsgIndex 2459 } else { 2460 iNdEx = entryPreIndex 2461 skippy, err := skipTransaction(dAtA[iNdEx:]) 2462 if err != nil { 2463 return err 2464 } 2465 if (skippy < 0) || (iNdEx+skippy) < 0 { 2466 return ErrInvalidLengthTransaction 2467 } 2468 if (iNdEx + skippy) > postIndex { 2469 return io.ErrUnexpectedEOF 2470 } 2471 iNdEx += skippy 2472 } 2473 } 2474 m.Values[mapkey] = *mapvalue 2475 iNdEx = postIndex 2476 default: 2477 iNdEx = preIndex 2478 skippy, err := skipTransaction(dAtA[iNdEx:]) 2479 if err != nil { 2480 return err 2481 } 2482 if (skippy < 0) || (iNdEx+skippy) < 0 { 2483 return ErrInvalidLengthTransaction 2484 } 2485 if (iNdEx + skippy) > l { 2486 return io.ErrUnexpectedEOF 2487 } 2488 iNdEx += skippy 2489 } 2490 } 2491 2492 if iNdEx > l { 2493 return io.ErrUnexpectedEOF 2494 } 2495 return nil 2496 } 2497 func (m *TransactionEvent) Unmarshal(dAtA []byte) error { 2498 l := len(dAtA) 2499 iNdEx := 0 2500 for iNdEx < l { 2501 preIndex := iNdEx 2502 var wire uint64 2503 for shift := uint(0); ; shift += 7 { 2504 if shift >= 64 { 2505 return ErrIntOverflowTransaction 2506 } 2507 if iNdEx >= l { 2508 return io.ErrUnexpectedEOF 2509 } 2510 b := dAtA[iNdEx] 2511 iNdEx++ 2512 wire |= uint64(b&0x7F) << shift 2513 if b < 0x80 { 2514 break 2515 } 2516 } 2517 fieldNum := int32(wire >> 3) 2518 wireType := int(wire & 0x7) 2519 if wireType == 4 { 2520 return fmt.Errorf("proto: TransactionEvent: wiretype end group for non-group") 2521 } 2522 if fieldNum <= 0 { 2523 return fmt.Errorf("proto: TransactionEvent: illegal tag %d (wire type %d)", fieldNum, wire) 2524 } 2525 switch fieldNum { 2526 case 1: 2527 if wireType != 0 { 2528 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2529 } 2530 m.Type = 0 2531 for shift := uint(0); ; shift += 7 { 2532 if shift >= 64 { 2533 return ErrIntOverflowTransaction 2534 } 2535 if iNdEx >= l { 2536 return io.ErrUnexpectedEOF 2537 } 2538 b := dAtA[iNdEx] 2539 iNdEx++ 2540 m.Type |= TransactionEvent_EventType(b&0x7F) << shift 2541 if b < 0x80 { 2542 break 2543 } 2544 } 2545 case 2: 2546 if wireType != 2 { 2547 return fmt.Errorf("proto: wrong wireType = %d for field Transaction", wireType) 2548 } 2549 var msglen int 2550 for shift := uint(0); ; shift += 7 { 2551 if shift >= 64 { 2552 return ErrIntOverflowTransaction 2553 } 2554 if iNdEx >= l { 2555 return io.ErrUnexpectedEOF 2556 } 2557 b := dAtA[iNdEx] 2558 iNdEx++ 2559 msglen |= int(b&0x7F) << shift 2560 if b < 0x80 { 2561 break 2562 } 2563 } 2564 if msglen < 0 { 2565 return ErrInvalidLengthTransaction 2566 } 2567 postIndex := iNdEx + msglen 2568 if postIndex < 0 { 2569 return ErrInvalidLengthTransaction 2570 } 2571 if postIndex > l { 2572 return io.ErrUnexpectedEOF 2573 } 2574 if err := m.Transaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2575 return err 2576 } 2577 iNdEx = postIndex 2578 default: 2579 iNdEx = preIndex 2580 skippy, err := skipTransaction(dAtA[iNdEx:]) 2581 if err != nil { 2582 return err 2583 } 2584 if (skippy < 0) || (iNdEx+skippy) < 0 { 2585 return ErrInvalidLengthTransaction 2586 } 2587 if (iNdEx + skippy) > l { 2588 return io.ErrUnexpectedEOF 2589 } 2590 iNdEx += skippy 2591 } 2592 } 2593 2594 if iNdEx > l { 2595 return io.ErrUnexpectedEOF 2596 } 2597 return nil 2598 } 2599 func skipTransaction(dAtA []byte) (n int, err error) { 2600 l := len(dAtA) 2601 iNdEx := 0 2602 depth := 0 2603 for iNdEx < l { 2604 var wire uint64 2605 for shift := uint(0); ; shift += 7 { 2606 if shift >= 64 { 2607 return 0, ErrIntOverflowTransaction 2608 } 2609 if iNdEx >= l { 2610 return 0, io.ErrUnexpectedEOF 2611 } 2612 b := dAtA[iNdEx] 2613 iNdEx++ 2614 wire |= (uint64(b) & 0x7F) << shift 2615 if b < 0x80 { 2616 break 2617 } 2618 } 2619 wireType := int(wire & 0x7) 2620 switch wireType { 2621 case 0: 2622 for shift := uint(0); ; shift += 7 { 2623 if shift >= 64 { 2624 return 0, ErrIntOverflowTransaction 2625 } 2626 if iNdEx >= l { 2627 return 0, io.ErrUnexpectedEOF 2628 } 2629 iNdEx++ 2630 if dAtA[iNdEx-1] < 0x80 { 2631 break 2632 } 2633 } 2634 case 1: 2635 iNdEx += 8 2636 case 2: 2637 var length int 2638 for shift := uint(0); ; shift += 7 { 2639 if shift >= 64 { 2640 return 0, ErrIntOverflowTransaction 2641 } 2642 if iNdEx >= l { 2643 return 0, io.ErrUnexpectedEOF 2644 } 2645 b := dAtA[iNdEx] 2646 iNdEx++ 2647 length |= (int(b) & 0x7F) << shift 2648 if b < 0x80 { 2649 break 2650 } 2651 } 2652 if length < 0 { 2653 return 0, ErrInvalidLengthTransaction 2654 } 2655 iNdEx += length 2656 case 3: 2657 depth++ 2658 case 4: 2659 if depth == 0 { 2660 return 0, ErrUnexpectedEndOfGroupTransaction 2661 } 2662 depth-- 2663 case 5: 2664 iNdEx += 4 2665 default: 2666 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2667 } 2668 if iNdEx < 0 { 2669 return 0, ErrInvalidLengthTransaction 2670 } 2671 if depth == 0 { 2672 return iNdEx, nil 2673 } 2674 } 2675 return 0, io.ErrUnexpectedEOF 2676 } 2677 2678 var ( 2679 ErrInvalidLengthTransaction = fmt.Errorf("proto: negative length found during unmarshaling") 2680 ErrIntOverflowTransaction = fmt.Errorf("proto: integer overflow") 2681 ErrUnexpectedEndOfGroupTransaction = fmt.Errorf("proto: unexpected end of group") 2682 )