// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: commit.proto package pb import ( fmt "fmt" io "io" math "math" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var ( _ = proto.Marshal _ = fmt.Errorf _ = math.Inf ) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type CommitEvent struct { Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` LocalList []bool `protobuf:"varint,2,rep,packed,name=local_list,json=localList,proto3" json:"local_list,omitempty"` } func (m *CommitEvent) Reset() { *m = CommitEvent{} } func (m *CommitEvent) String() string { return proto.CompactTextString(m) } func (*CommitEvent) ProtoMessage() {} func (*CommitEvent) Descriptor() ([]byte, []int) { return fileDescriptor_db7163399a465f48, []int{0} } func (m *CommitEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CommitEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CommitEvent.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (m *CommitEvent) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitEvent.Merge(m, src) } func (m *CommitEvent) XXX_Size() int { return m.Size() } func (m *CommitEvent) XXX_DiscardUnknown() { xxx_messageInfo_CommitEvent.DiscardUnknown(m) } var xxx_messageInfo_CommitEvent proto.InternalMessageInfo func (m *CommitEvent) GetBlock() *Block { if m != nil { return m.Block } return nil } func (m *CommitEvent) GetLocalList() []bool { if m != nil { return m.LocalList } return nil } func init() { proto.RegisterType((*CommitEvent)(nil), "pb.commit_event") } func init() { proto.RegisterFile("commit.proto", fileDescriptor_db7163399a465f48) } var fileDescriptor_db7163399a465f48 = []byte{ // 175 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xce, 0xcf, 0xcd, 0xcd, 0x2c, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x4b, 0x25, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0x22, 0xc5, 0x9d, 0x94, 0x93, 0x9f, 0x9c, 0x0d, 0xe1, 0x28, 0xf9, 0xc1, 0xcc, 0x8b, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x11, 0x92, 0xe7, 0x62, 0x05, 0x4b, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x71, 0xea, 0x15, 0x24, 0xe9, 0x39, 0x81, 0x04, 0x82, 0x20, 0xe2, 0x42, 0xb2, 0x5c, 0x5c, 0x39, 0xf9, 0xc9, 0x89, 0x39, 0xf1, 0x39, 0x99, 0xc5, 0x25, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0x1c, 0x41, 0x9c, 0x60, 0x11, 0x9f, 0xcc, 0xe2, 0x12, 0x27, 0x89, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0x5b, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x77, 0xeb, 0x72, 0x1d, 0xc0, 0x00, 0x00, 0x00, } func (m *CommitEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CommitEvent) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Block != nil { dAtA[i] = 0xa i++ i = encodeVarintCommit(dAtA, i, uint64(m.Block.Size())) n1, err := m.Block.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if len(m.LocalList) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintCommit(dAtA, i, uint64(len(m.LocalList))) for _, b := range m.LocalList { if b { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } } return i, nil } func encodeVarintCommit(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *CommitEvent) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Block != nil { l = m.Block.Size() n += 1 + l + sovCommit(uint64(l)) } if len(m.LocalList) > 0 { n += 1 + sovCommit(uint64(len(m.LocalList))) + len(m.LocalList)*1 } return n } func sovCommit(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozCommit(x uint64) (n int) { return sovCommit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *CommitEvent) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommit } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: commit_event: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: commit_event: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommit } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthCommit } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthCommit } if postIndex > l { return io.ErrUnexpectedEOF } if m.Block == nil { m.Block = &Block{} } if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommit } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.LocalList = append(m.LocalList, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommit } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return ErrInvalidLengthCommit } postIndex := iNdEx + packedLen if postIndex < 0 { return ErrInvalidLengthCommit } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.LocalList) == 0 { m.LocalList = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommit } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.LocalList = append(m.LocalList, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field LocalList", wireType) } default: iNdEx = preIndex skippy, err := skipCommit(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthCommit } if (iNdEx + skippy) < 0 { return ErrInvalidLengthCommit } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipCommit(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowCommit } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowCommit } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowCommit } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthCommit } iNdEx += length if iNdEx < 0 { return 0, ErrInvalidLengthCommit } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowCommit } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipCommit(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next if iNdEx < 0 { return 0, ErrInvalidLengthCommit } } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthCommit = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCommit = fmt.Errorf("proto: integer overflow") )