github.com/Minish144/prototool-arm64@v1.3.0/example/gen/proto/go/sub/sub.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: sub/sub.proto 3 4 package subpb 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 10 import strings "strings" 11 import reflect "reflect" 12 13 import io "io" 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 25 26 // Dep is a dep. 27 type Dep struct { 28 Hello int64 `protobuf:"varint,1,opt,name=hello,proto3" json:"hello,omitempty"` 29 XXX_NoUnkeyedLiteral struct{} `json:"-"` 30 XXX_sizecache int32 `json:"-"` 31 } 32 33 func (m *Dep) Reset() { *m = Dep{} } 34 func (*Dep) ProtoMessage() {} 35 func (*Dep) Descriptor() ([]byte, []int) { 36 return fileDescriptor_sub_4dda5344527a46df, []int{0} 37 } 38 func (m *Dep) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40 } 41 func (m *Dep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 if deterministic { 43 return xxx_messageInfo_Dep.Marshal(b, m, deterministic) 44 } else { 45 b = b[:cap(b)] 46 n, err := m.MarshalTo(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52 } 53 func (dst *Dep) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_Dep.Merge(dst, src) 55 } 56 func (m *Dep) XXX_Size() int { 57 return m.Size() 58 } 59 func (m *Dep) XXX_DiscardUnknown() { 60 xxx_messageInfo_Dep.DiscardUnknown(m) 61 } 62 63 var xxx_messageInfo_Dep proto.InternalMessageInfo 64 65 func (m *Dep) GetHello() int64 { 66 if m != nil { 67 return m.Hello 68 } 69 return 0 70 } 71 72 func init() { 73 proto.RegisterType((*Dep)(nil), "sub.Dep") 74 } 75 func (this *Dep) Equal(that interface{}) bool { 76 if that == nil { 77 return this == nil 78 } 79 80 that1, ok := that.(*Dep) 81 if !ok { 82 that2, ok := that.(Dep) 83 if ok { 84 that1 = &that2 85 } else { 86 return false 87 } 88 } 89 if that1 == nil { 90 return this == nil 91 } else if this == nil { 92 return false 93 } 94 if this.Hello != that1.Hello { 95 return false 96 } 97 return true 98 } 99 func (this *Dep) GoString() string { 100 if this == nil { 101 return "nil" 102 } 103 s := make([]string, 0, 5) 104 s = append(s, "&subpb.Dep{") 105 s = append(s, "Hello: "+fmt.Sprintf("%#v", this.Hello)+",\n") 106 s = append(s, "}") 107 return strings.Join(s, "") 108 } 109 func valueToGoStringSub(v interface{}, typ string) string { 110 rv := reflect.ValueOf(v) 111 if rv.IsNil() { 112 return "nil" 113 } 114 pv := reflect.Indirect(rv).Interface() 115 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 116 } 117 func (m *Dep) Marshal() (dAtA []byte, err error) { 118 size := m.Size() 119 dAtA = make([]byte, size) 120 n, err := m.MarshalTo(dAtA) 121 if err != nil { 122 return nil, err 123 } 124 return dAtA[:n], nil 125 } 126 127 func (m *Dep) MarshalTo(dAtA []byte) (int, error) { 128 var i int 129 _ = i 130 var l int 131 _ = l 132 if m.Hello != 0 { 133 dAtA[i] = 0x8 134 i++ 135 i = encodeVarintSub(dAtA, i, uint64(m.Hello)) 136 } 137 return i, nil 138 } 139 140 func encodeVarintSub(dAtA []byte, offset int, v uint64) int { 141 for v >= 1<<7 { 142 dAtA[offset] = uint8(v&0x7f | 0x80) 143 v >>= 7 144 offset++ 145 } 146 dAtA[offset] = uint8(v) 147 return offset + 1 148 } 149 func (m *Dep) Size() (n int) { 150 var l int 151 _ = l 152 if m.Hello != 0 { 153 n += 1 + sovSub(uint64(m.Hello)) 154 } 155 return n 156 } 157 158 func sovSub(x uint64) (n int) { 159 for { 160 n++ 161 x >>= 7 162 if x == 0 { 163 break 164 } 165 } 166 return n 167 } 168 func sozSub(x uint64) (n int) { 169 return sovSub(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 170 } 171 func (this *Dep) String() string { 172 if this == nil { 173 return "nil" 174 } 175 s := strings.Join([]string{`&Dep{`, 176 `Hello:` + fmt.Sprintf("%v", this.Hello) + `,`, 177 `}`, 178 }, "") 179 return s 180 } 181 func valueToStringSub(v interface{}) string { 182 rv := reflect.ValueOf(v) 183 if rv.IsNil() { 184 return "nil" 185 } 186 pv := reflect.Indirect(rv).Interface() 187 return fmt.Sprintf("*%v", pv) 188 } 189 func (m *Dep) Unmarshal(dAtA []byte) error { 190 l := len(dAtA) 191 iNdEx := 0 192 for iNdEx < l { 193 preIndex := iNdEx 194 var wire uint64 195 for shift := uint(0); ; shift += 7 { 196 if shift >= 64 { 197 return ErrIntOverflowSub 198 } 199 if iNdEx >= l { 200 return io.ErrUnexpectedEOF 201 } 202 b := dAtA[iNdEx] 203 iNdEx++ 204 wire |= (uint64(b) & 0x7F) << shift 205 if b < 0x80 { 206 break 207 } 208 } 209 fieldNum := int32(wire >> 3) 210 wireType := int(wire & 0x7) 211 if wireType == 4 { 212 return fmt.Errorf("proto: Dep: wiretype end group for non-group") 213 } 214 if fieldNum <= 0 { 215 return fmt.Errorf("proto: Dep: illegal tag %d (wire type %d)", fieldNum, wire) 216 } 217 switch fieldNum { 218 case 1: 219 if wireType != 0 { 220 return fmt.Errorf("proto: wrong wireType = %d for field Hello", wireType) 221 } 222 m.Hello = 0 223 for shift := uint(0); ; shift += 7 { 224 if shift >= 64 { 225 return ErrIntOverflowSub 226 } 227 if iNdEx >= l { 228 return io.ErrUnexpectedEOF 229 } 230 b := dAtA[iNdEx] 231 iNdEx++ 232 m.Hello |= (int64(b) & 0x7F) << shift 233 if b < 0x80 { 234 break 235 } 236 } 237 default: 238 iNdEx = preIndex 239 skippy, err := skipSub(dAtA[iNdEx:]) 240 if err != nil { 241 return err 242 } 243 if skippy < 0 { 244 return ErrInvalidLengthSub 245 } 246 if (iNdEx + skippy) > l { 247 return io.ErrUnexpectedEOF 248 } 249 iNdEx += skippy 250 } 251 } 252 253 if iNdEx > l { 254 return io.ErrUnexpectedEOF 255 } 256 return nil 257 } 258 func skipSub(dAtA []byte) (n int, err error) { 259 l := len(dAtA) 260 iNdEx := 0 261 for iNdEx < l { 262 var wire uint64 263 for shift := uint(0); ; shift += 7 { 264 if shift >= 64 { 265 return 0, ErrIntOverflowSub 266 } 267 if iNdEx >= l { 268 return 0, io.ErrUnexpectedEOF 269 } 270 b := dAtA[iNdEx] 271 iNdEx++ 272 wire |= (uint64(b) & 0x7F) << shift 273 if b < 0x80 { 274 break 275 } 276 } 277 wireType := int(wire & 0x7) 278 switch wireType { 279 case 0: 280 for shift := uint(0); ; shift += 7 { 281 if shift >= 64 { 282 return 0, ErrIntOverflowSub 283 } 284 if iNdEx >= l { 285 return 0, io.ErrUnexpectedEOF 286 } 287 iNdEx++ 288 if dAtA[iNdEx-1] < 0x80 { 289 break 290 } 291 } 292 return iNdEx, nil 293 case 1: 294 iNdEx += 8 295 return iNdEx, nil 296 case 2: 297 var length int 298 for shift := uint(0); ; shift += 7 { 299 if shift >= 64 { 300 return 0, ErrIntOverflowSub 301 } 302 if iNdEx >= l { 303 return 0, io.ErrUnexpectedEOF 304 } 305 b := dAtA[iNdEx] 306 iNdEx++ 307 length |= (int(b) & 0x7F) << shift 308 if b < 0x80 { 309 break 310 } 311 } 312 iNdEx += length 313 if length < 0 { 314 return 0, ErrInvalidLengthSub 315 } 316 return iNdEx, nil 317 case 3: 318 for { 319 var innerWire uint64 320 var start int = iNdEx 321 for shift := uint(0); ; shift += 7 { 322 if shift >= 64 { 323 return 0, ErrIntOverflowSub 324 } 325 if iNdEx >= l { 326 return 0, io.ErrUnexpectedEOF 327 } 328 b := dAtA[iNdEx] 329 iNdEx++ 330 innerWire |= (uint64(b) & 0x7F) << shift 331 if b < 0x80 { 332 break 333 } 334 } 335 innerWireType := int(innerWire & 0x7) 336 if innerWireType == 4 { 337 break 338 } 339 next, err := skipSub(dAtA[start:]) 340 if err != nil { 341 return 0, err 342 } 343 iNdEx = start + next 344 } 345 return iNdEx, nil 346 case 4: 347 return iNdEx, nil 348 case 5: 349 iNdEx += 4 350 return iNdEx, nil 351 default: 352 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 353 } 354 } 355 panic("unreachable") 356 } 357 358 var ( 359 ErrInvalidLengthSub = fmt.Errorf("proto: negative length found during unmarshaling") 360 ErrIntOverflowSub = fmt.Errorf("proto: integer overflow") 361 ) 362 363 func init() { proto.RegisterFile("sub/sub.proto", fileDescriptor_sub_4dda5344527a46df) } 364 365 var fileDescriptor_sub_4dda5344527a46df = []byte{ 366 // 149 bytes of a gzipped FileDescriptorProto 367 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x2e, 0x4d, 0xd2, 368 0x2f, 0x2e, 0x4d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2e, 0x2e, 0x4d, 0x52, 0x92, 369 0xe6, 0x62, 0x76, 0x49, 0x2d, 0x10, 0x12, 0xe1, 0x62, 0xcd, 0x48, 0xcd, 0xc9, 0xc9, 0x97, 0x60, 370 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x82, 0x70, 0x9c, 0x3c, 0x2e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 371 0x8e, 0xe1, 0xc3, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 372 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x31, 0x7c, 373 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x03, 0x17, 0x7b, 0x72, 0x7e, 0xae, 0x5e, 0x71, 0x69, 374 0x92, 0x13, 0x47, 0x70, 0x69, 0x52, 0x00, 0xc8, 0x8a, 0x00, 0xc6, 0x28, 0xd6, 0xe2, 0xd2, 0xa4, 375 0x82, 0xa4, 0x24, 0x36, 0xb0, 0x95, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0xa4, 0xf4, 376 0x5e, 0x83, 0x00, 0x00, 0x00, 377 }