github.com/qiuhoude/go-web@v0.0.0-20220223060959-ab545e78f20d/prepare/23_proto_actor/distributedchannels/messages/protos.pb.go (about) 1 package messages 2 3 import proto "github.com/gogo/protobuf/proto" 4 import fmt "fmt" 5 import math "math" 6 import _ "github.com/AsynkronIT/protoactor-go/actor" 7 8 import strings "strings" 9 import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" 10 import sort "sort" 11 import strconv "strconv" 12 import reflect "reflect" 13 14 import io "io" 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 26 27 type MyMessage struct { 28 Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` 29 } 30 31 func (m *MyMessage) Reset() { *m = MyMessage{} } 32 func (*MyMessage) ProtoMessage() {} 33 func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptorProtos, []int{0} } 34 35 func init() { 36 proto.RegisterType((*MyMessage)(nil), "messages.MyMessage") 37 } 38 func (this *MyMessage) Equal(that interface{}) bool { 39 if that == nil { 40 if this == nil { 41 return true 42 } 43 return false 44 } 45 46 that1, ok := that.(*MyMessage) 47 if !ok { 48 that2, ok := that.(MyMessage) 49 if ok { 50 that1 = &that2 51 } else { 52 return false 53 } 54 } 55 if that1 == nil { 56 if this == nil { 57 return true 58 } 59 return false 60 } else if this == nil { 61 return false 62 } 63 if this.Message != that1.Message { 64 return false 65 } 66 return true 67 } 68 func (this *MyMessage) GoString() string { 69 if this == nil { 70 return "nil" 71 } 72 s := make([]string, 0, 5) 73 s = append(s, "&messages.MyMessage{") 74 s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n") 75 s = append(s, "}") 76 return strings.Join(s, "") 77 } 78 func valueToGoStringProtos(v interface{}, typ string) string { 79 rv := reflect.ValueOf(v) 80 if rv.IsNil() { 81 return "nil" 82 } 83 pv := reflect.Indirect(rv).Interface() 84 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 85 } 86 func extensionToGoStringProtos(m github_com_gogo_protobuf_proto.Message) string { 87 e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) 88 if e == nil { 89 return "nil" 90 } 91 s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" 92 keys := make([]int, 0, len(e)) 93 for k := range e { 94 keys = append(keys, int(k)) 95 } 96 sort.Ints(keys) 97 ss := []string{} 98 for _, k := range keys { 99 ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) 100 } 101 s += strings.Join(ss, ",") + "})" 102 return s 103 } 104 func (m *MyMessage) Marshal() (dAtA []byte, err error) { 105 size := m.Size() 106 dAtA = make([]byte, size) 107 n, err := m.MarshalTo(dAtA) 108 if err != nil { 109 return nil, err 110 } 111 return dAtA[:n], nil 112 } 113 114 func (m *MyMessage) MarshalTo(dAtA []byte) (int, error) { 115 var i int 116 _ = i 117 var l int 118 _ = l 119 if len(m.Message) > 0 { 120 dAtA[i] = 0xa 121 i++ 122 i = encodeVarintProtos(dAtA, i, uint64(len(m.Message))) 123 i += copy(dAtA[i:], m.Message) 124 } 125 return i, nil 126 } 127 128 func encodeFixed64Protos(dAtA []byte, offset int, v uint64) int { 129 dAtA[offset] = uint8(v) 130 dAtA[offset+1] = uint8(v >> 8) 131 dAtA[offset+2] = uint8(v >> 16) 132 dAtA[offset+3] = uint8(v >> 24) 133 dAtA[offset+4] = uint8(v >> 32) 134 dAtA[offset+5] = uint8(v >> 40) 135 dAtA[offset+6] = uint8(v >> 48) 136 dAtA[offset+7] = uint8(v >> 56) 137 return offset + 8 138 } 139 func encodeFixed32Protos(dAtA []byte, offset int, v uint32) int { 140 dAtA[offset] = uint8(v) 141 dAtA[offset+1] = uint8(v >> 8) 142 dAtA[offset+2] = uint8(v >> 16) 143 dAtA[offset+3] = uint8(v >> 24) 144 return offset + 4 145 } 146 func encodeVarintProtos(dAtA []byte, offset int, v uint64) int { 147 for v >= 1<<7 { 148 dAtA[offset] = uint8(v&0x7f | 0x80) 149 v >>= 7 150 offset++ 151 } 152 dAtA[offset] = uint8(v) 153 return offset + 1 154 } 155 func (m *MyMessage) Size() (n int) { 156 var l int 157 _ = l 158 l = len(m.Message) 159 if l > 0 { 160 n += 1 + l + sovProtos(uint64(l)) 161 } 162 return n 163 } 164 165 func sovProtos(x uint64) (n int) { 166 for { 167 n++ 168 x >>= 7 169 if x == 0 { 170 break 171 } 172 } 173 return n 174 } 175 func sozProtos(x uint64) (n int) { 176 return sovProtos(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 177 } 178 func (this *MyMessage) String() string { 179 if this == nil { 180 return "nil" 181 } 182 s := strings.Join([]string{`&MyMessage{`, 183 `Message:` + fmt.Sprintf("%v", this.Message) + `,`, 184 `}`, 185 }, "") 186 return s 187 } 188 func valueToStringProtos(v interface{}) string { 189 rv := reflect.ValueOf(v) 190 if rv.IsNil() { 191 return "nil" 192 } 193 pv := reflect.Indirect(rv).Interface() 194 return fmt.Sprintf("*%v", pv) 195 } 196 func (m *MyMessage) Unmarshal(dAtA []byte) error { 197 l := len(dAtA) 198 iNdEx := 0 199 for iNdEx < l { 200 preIndex := iNdEx 201 var wire uint64 202 for shift := uint(0); ; shift += 7 { 203 if shift >= 64 { 204 return ErrIntOverflowProtos 205 } 206 if iNdEx >= l { 207 return io.ErrUnexpectedEOF 208 } 209 b := dAtA[iNdEx] 210 iNdEx++ 211 wire |= (uint64(b) & 0x7F) << shift 212 if b < 0x80 { 213 break 214 } 215 } 216 fieldNum := int32(wire >> 3) 217 wireType := int(wire & 0x7) 218 if wireType == 4 { 219 return fmt.Errorf("proto: MyMessage: wiretype end group for non-group") 220 } 221 if fieldNum <= 0 { 222 return fmt.Errorf("proto: MyMessage: illegal tag %d (wire type %d)", fieldNum, wire) 223 } 224 switch fieldNum { 225 case 1: 226 if wireType != 2 { 227 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 228 } 229 var stringLen uint64 230 for shift := uint(0); ; shift += 7 { 231 if shift >= 64 { 232 return ErrIntOverflowProtos 233 } 234 if iNdEx >= l { 235 return io.ErrUnexpectedEOF 236 } 237 b := dAtA[iNdEx] 238 iNdEx++ 239 stringLen |= (uint64(b) & 0x7F) << shift 240 if b < 0x80 { 241 break 242 } 243 } 244 intStringLen := int(stringLen) 245 if intStringLen < 0 { 246 return ErrInvalidLengthProtos 247 } 248 postIndex := iNdEx + intStringLen 249 if postIndex > l { 250 return io.ErrUnexpectedEOF 251 } 252 m.Message = string(dAtA[iNdEx:postIndex]) 253 iNdEx = postIndex 254 default: 255 iNdEx = preIndex 256 skippy, err := skipProtos(dAtA[iNdEx:]) 257 if err != nil { 258 return err 259 } 260 if skippy < 0 { 261 return ErrInvalidLengthProtos 262 } 263 if (iNdEx + skippy) > l { 264 return io.ErrUnexpectedEOF 265 } 266 iNdEx += skippy 267 } 268 } 269 270 if iNdEx > l { 271 return io.ErrUnexpectedEOF 272 } 273 return nil 274 } 275 func skipProtos(dAtA []byte) (n int, err error) { 276 l := len(dAtA) 277 iNdEx := 0 278 for iNdEx < l { 279 var wire uint64 280 for shift := uint(0); ; shift += 7 { 281 if shift >= 64 { 282 return 0, ErrIntOverflowProtos 283 } 284 if iNdEx >= l { 285 return 0, io.ErrUnexpectedEOF 286 } 287 b := dAtA[iNdEx] 288 iNdEx++ 289 wire |= (uint64(b) & 0x7F) << shift 290 if b < 0x80 { 291 break 292 } 293 } 294 wireType := int(wire & 0x7) 295 switch wireType { 296 case 0: 297 for shift := uint(0); ; shift += 7 { 298 if shift >= 64 { 299 return 0, ErrIntOverflowProtos 300 } 301 if iNdEx >= l { 302 return 0, io.ErrUnexpectedEOF 303 } 304 iNdEx++ 305 if dAtA[iNdEx-1] < 0x80 { 306 break 307 } 308 } 309 return iNdEx, nil 310 case 1: 311 iNdEx += 8 312 return iNdEx, nil 313 case 2: 314 var length int 315 for shift := uint(0); ; shift += 7 { 316 if shift >= 64 { 317 return 0, ErrIntOverflowProtos 318 } 319 if iNdEx >= l { 320 return 0, io.ErrUnexpectedEOF 321 } 322 b := dAtA[iNdEx] 323 iNdEx++ 324 length |= (int(b) & 0x7F) << shift 325 if b < 0x80 { 326 break 327 } 328 } 329 iNdEx += length 330 if length < 0 { 331 return 0, ErrInvalidLengthProtos 332 } 333 return iNdEx, nil 334 case 3: 335 for { 336 var innerWire uint64 337 var start int = iNdEx 338 for shift := uint(0); ; shift += 7 { 339 if shift >= 64 { 340 return 0, ErrIntOverflowProtos 341 } 342 if iNdEx >= l { 343 return 0, io.ErrUnexpectedEOF 344 } 345 b := dAtA[iNdEx] 346 iNdEx++ 347 innerWire |= (uint64(b) & 0x7F) << shift 348 if b < 0x80 { 349 break 350 } 351 } 352 innerWireType := int(innerWire & 0x7) 353 if innerWireType == 4 { 354 break 355 } 356 next, err := skipProtos(dAtA[start:]) 357 if err != nil { 358 return 0, err 359 } 360 iNdEx = start + next 361 } 362 return iNdEx, nil 363 case 4: 364 return iNdEx, nil 365 case 5: 366 iNdEx += 4 367 return iNdEx, nil 368 default: 369 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 370 } 371 } 372 panic("unreachable") 373 } 374 375 var ( 376 ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling") 377 ErrIntOverflowProtos = fmt.Errorf("proto: integer overflow") 378 ) 379 380 func init() { proto.RegisterFile("protos.proto", fileDescriptorProtos) } 381 382 var fileDescriptorProtos = []byte{ 383 // 162 bytes of a gzipped FileDescriptorProto 384 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, 385 0xc9, 0x2f, 0xd6, 0x03, 0x53, 0x42, 0x1c, 0xb9, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0xc5, 0x52, 386 0x66, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x8e, 0xc5, 0x95, 0x79, 387 0xd9, 0x45, 0xf9, 0x79, 0x9e, 0x21, 0xfa, 0x60, 0x65, 0x89, 0xc9, 0x25, 0xf9, 0x45, 0xba, 0xe9, 388 0xf9, 0xfa, 0x60, 0x86, 0x3e, 0xb2, 0x09, 0x4a, 0xaa, 0x5c, 0x9c, 0xbe, 0x95, 0xbe, 0x10, 0x53, 389 0x84, 0x24, 0xb8, 0xd8, 0xa1, 0x4c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x18, 0xd7, 0x49, 390 0xe7, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x3e, 0x3c, 0x94, 0x63, 0x6c, 0x78, 0x24, 391 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 392 0x24, 0xc7, 0xf8, 0xe2, 0x91, 0x1c, 0xc3, 0x87, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x24, 393 0xb1, 0x81, 0xcd, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x74, 0x11, 0xee, 0x45, 0xad, 0x00, 394 0x00, 0x00, 395 }