// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: data.proto package data import ( bytes "bytes" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MyMessage struct { MyData uint32 `protobuf:"varint,1,opt,name=my_data,json=myData,proto3" json:"my_data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *MyMessage) Reset() { *m = MyMessage{} } func (*MyMessage) ProtoMessage() {} func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptor_871986018790d2fd, []int{0} } func (m *MyMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *MyMessage) XXX_Merge(src proto.Message) { xxx_messageInfo_MyMessage.Merge(m, src) } func (m *MyMessage) XXX_Size() int { return m.Size() } func (m *MyMessage) XXX_DiscardUnknown() { xxx_messageInfo_MyMessage.DiscardUnknown(m) } var xxx_messageInfo_MyMessage proto.InternalMessageInfo func (m *MyMessage) GetMyData() uint32 { if m != nil { return m.MyData } return 0 } func init() { proto.RegisterType((*MyMessage)(nil), "data.MyMessage") } func init() { proto.RegisterFile("data.proto", fileDescriptor_871986018790d2fd) } var fileDescriptor_871986018790d2fd = []byte{ // 160 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x49, 0x2c, 0x49, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x70, 0x71, 0xfa, 0x56, 0xfa, 0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x73, 0xb1, 0xe7, 0x56, 0xc6, 0x83, 0x8c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0x62, 0xcb, 0xad, 0x74, 0x49, 0x2c, 0x49, 0x74, 0xd2, 0xb9, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x49, 0x6c, 0x60, 0xa3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x4f, 0xfb, 0xa7, 0x9d, 0x00, 0x00, 0x00, } func (this *MyMessage) VerboseEqual(that interface{}) error { if that == nil { if this == nil { return nil } return fmt.Errorf("that == nil && this != nil") } that1, ok := that.(*MyMessage) if !ok { that2, ok := that.(MyMessage) if ok { that1 = &that2 } else { return fmt.Errorf("that is not of type *MyMessage") } } if that1 == nil { if this == nil { return nil } return fmt.Errorf("that is type *MyMessage but is nil && this != nil") } else if this == nil { return fmt.Errorf("that is type *MyMessage but is not nil && this == nil") } if this.MyData != that1.MyData { return fmt.Errorf("MyData this(%v) Not Equal that(%v)", this.MyData, that1.MyData) } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } func (this *MyMessage) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*MyMessage) if !ok { that2, ok := that.(MyMessage) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if this.MyData != that1.MyData { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } return true } func (this *MyMessage) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 5) s = append(s, "&data.MyMessage{") s = append(s, "MyData: "+fmt.Sprintf("%#v", this.MyData)+",\n") if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } s = append(s, "}") return strings.Join(s, "") } func valueToGoStringData(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) } func (m *MyMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MyMessage) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MyMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if m.MyData != 0 { i = encodeVarintData(dAtA, i, uint64(m.MyData)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintData(dAtA []byte, offset int, v uint64) int { offset -= sovData(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func NewPopulatedMyMessage(r randyData, easy bool) *MyMessage { this := &MyMessage{} this.MyData = uint32(r.Uint32()) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedData(r, 2) } return this } type randyData interface { Float32() float32 Float64() float64 Int63() int64 Int31() int32 Uint32() uint32 Intn(n int) int } func randUTF8RuneData(r randyData) rune { ru := r.Intn(62) if ru < 10 { return rune(ru + 48) } else if ru < 36 { return rune(ru + 55) } return rune(ru + 61) } func randStringData(r randyData) string { v1 := r.Intn(100) tmps := make([]rune, v1) for i := 0; i < v1; i++ { tmps[i] = randUTF8RuneData(r) } return string(tmps) } func randUnrecognizedData(r randyData, maxFieldNumber int) (dAtA []byte) { l := r.Intn(5) for i := 0; i < l; i++ { wire := r.Intn(4) if wire == 3 { wire = 5 } fieldNumber := maxFieldNumber + r.Intn(100) dAtA = randFieldData(dAtA, r, fieldNumber, wire) } return dAtA } func randFieldData(dAtA []byte, r randyData, fieldNumber int, wire int) []byte { key := uint32(fieldNumber)<<3 | uint32(wire) switch wire { case 0: dAtA = encodeVarintPopulateData(dAtA, uint64(key)) v2 := r.Int63() if r.Intn(2) == 0 { v2 *= -1 } dAtA = encodeVarintPopulateData(dAtA, uint64(v2)) case 1: dAtA = encodeVarintPopulateData(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) case 2: dAtA = encodeVarintPopulateData(dAtA, uint64(key)) ll := r.Intn(100) dAtA = encodeVarintPopulateData(dAtA, uint64(ll)) for j := 0; j < ll; j++ { dAtA = append(dAtA, byte(r.Intn(256))) } default: dAtA = encodeVarintPopulateData(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) } return dAtA } func encodeVarintPopulateData(dAtA []byte, v uint64) []byte { for v >= 1<<7 { dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) v >>= 7 } dAtA = append(dAtA, uint8(v)) return dAtA } func (m *MyMessage) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.MyData != 0 { n += 1 + sovData(uint64(m.MyData)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovData(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozData(x uint64) (n int) { return sovData(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *MyMessage) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&MyMessage{`, `MyData:` + fmt.Sprintf("%v", this.MyData) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s } func valueToStringData(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *MyMessage) 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 ErrIntOverflowData } 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: MyMessage: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MyMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MyData", wireType) } m.MyData = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowData } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MyData |= uint32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipData(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthData } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipData(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowData } 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, ErrIntOverflowData } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowData } 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, ErrInvalidLengthData } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupData } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthData } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowData = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupData = fmt.Errorf("proto: unexpected end of group") )