// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: networking/v1/http_2_rpc.proto package v1 import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" io "io" _ "istio.io/gogo-genproto/googleapis/google/api" math "math" math_bits "math/bits" ) // 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 Http2Rpc struct { // Types that are valid to be assigned to Destination: // *Http2Rpc_Dubbo // *Http2Rpc_Grpc Destination isHttp2Rpc_Destination `protobuf_oneof:"destination"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Http2Rpc) Reset() { *m = Http2Rpc{} } func (m *Http2Rpc) String() string { return proto.CompactTextString(m) } func (*Http2Rpc) ProtoMessage() {} func (*Http2Rpc) Descriptor() ([]byte, []int) { return fileDescriptor_dc706c3b890c1c84, []int{0} } func (m *Http2Rpc) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Http2Rpc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Http2Rpc.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 *Http2Rpc) XXX_Merge(src proto.Message) { xxx_messageInfo_Http2Rpc.Merge(m, src) } func (m *Http2Rpc) XXX_Size() int { return m.Size() } func (m *Http2Rpc) XXX_DiscardUnknown() { xxx_messageInfo_Http2Rpc.DiscardUnknown(m) } var xxx_messageInfo_Http2Rpc proto.InternalMessageInfo type isHttp2Rpc_Destination interface { isHttp2Rpc_Destination() MarshalTo([]byte) (int, error) Size() int } type Http2Rpc_Dubbo struct { Dubbo *DubboService `protobuf:"bytes,1,opt,name=dubbo,proto3,oneof" json:"dubbo,omitempty"` } type Http2Rpc_Grpc struct { Grpc *GrpcService `protobuf:"bytes,2,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"` } func (*Http2Rpc_Dubbo) isHttp2Rpc_Destination() {} func (*Http2Rpc_Grpc) isHttp2Rpc_Destination() {} func (m *Http2Rpc) GetDestination() isHttp2Rpc_Destination { if m != nil { return m.Destination } return nil } func (m *Http2Rpc) GetDubbo() *DubboService { if x, ok := m.GetDestination().(*Http2Rpc_Dubbo); ok { return x.Dubbo } return nil } func (m *Http2Rpc) GetGrpc() *GrpcService { if x, ok := m.GetDestination().(*Http2Rpc_Grpc); ok { return x.Grpc } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*Http2Rpc) XXX_OneofWrappers() []interface{} { return []interface{}{ (*Http2Rpc_Dubbo)(nil), (*Http2Rpc_Grpc)(nil), } } type DubboService struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` Methods []*Method `protobuf:"bytes,4,rep,name=methods,proto3" json:"methods,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *DubboService) Reset() { *m = DubboService{} } func (m *DubboService) String() string { return proto.CompactTextString(m) } func (*DubboService) ProtoMessage() {} func (*DubboService) Descriptor() ([]byte, []int) { return fileDescriptor_dc706c3b890c1c84, []int{1} } func (m *DubboService) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DubboService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DubboService.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 *DubboService) XXX_Merge(src proto.Message) { xxx_messageInfo_DubboService.Merge(m, src) } func (m *DubboService) XXX_Size() int { return m.Size() } func (m *DubboService) XXX_DiscardUnknown() { xxx_messageInfo_DubboService.DiscardUnknown(m) } var xxx_messageInfo_DubboService proto.InternalMessageInfo func (m *DubboService) GetService() string { if m != nil { return m.Service } return "" } func (m *DubboService) GetVersion() string { if m != nil { return m.Version } return "" } func (m *DubboService) GetGroup() string { if m != nil { return m.Group } return "" } func (m *DubboService) GetMethods() []*Method { if m != nil { return m.Methods } return nil } type Method struct { ServiceMethod string `protobuf:"bytes,1,opt,name=service_method,json=serviceMethod,proto3" json:"service_method,omitempty"` HeadersAttach string `protobuf:"bytes,2,opt,name=headers_attach,json=headersAttach,proto3" json:"headers_attach,omitempty"` HttpPath string `protobuf:"bytes,3,opt,name=http_path,json=httpPath,proto3" json:"http_path,omitempty"` HttpMethods []string `protobuf:"bytes,4,rep,name=http_methods,json=httpMethods,proto3" json:"http_methods,omitempty"` Params []*Param `protobuf:"bytes,5,rep,name=params,proto3" json:"params,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Method) Reset() { *m = Method{} } func (m *Method) String() string { return proto.CompactTextString(m) } func (*Method) ProtoMessage() {} func (*Method) Descriptor() ([]byte, []int) { return fileDescriptor_dc706c3b890c1c84, []int{2} } func (m *Method) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Method.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 *Method) XXX_Merge(src proto.Message) { xxx_messageInfo_Method.Merge(m, src) } func (m *Method) XXX_Size() int { return m.Size() } func (m *Method) XXX_DiscardUnknown() { xxx_messageInfo_Method.DiscardUnknown(m) } var xxx_messageInfo_Method proto.InternalMessageInfo func (m *Method) GetServiceMethod() string { if m != nil { return m.ServiceMethod } return "" } func (m *Method) GetHeadersAttach() string { if m != nil { return m.HeadersAttach } return "" } func (m *Method) GetHttpPath() string { if m != nil { return m.HttpPath } return "" } func (m *Method) GetHttpMethods() []string { if m != nil { return m.HttpMethods } return nil } func (m *Method) GetParams() []*Param { if m != nil { return m.Params } return nil } type Param struct { ParamSource string `protobuf:"bytes,1,opt,name=param_source,json=paramSource,proto3" json:"param_source,omitempty"` ParamKey string `protobuf:"bytes,2,opt,name=param_key,json=paramKey,proto3" json:"param_key,omitempty"` ParamType string `protobuf:"bytes,3,opt,name=param_type,json=paramType,proto3" json:"param_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Param) Reset() { *m = Param{} } func (m *Param) String() string { return proto.CompactTextString(m) } func (*Param) ProtoMessage() {} func (*Param) Descriptor() ([]byte, []int) { return fileDescriptor_dc706c3b890c1c84, []int{3} } func (m *Param) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Param) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Param.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 *Param) XXX_Merge(src proto.Message) { xxx_messageInfo_Param.Merge(m, src) } func (m *Param) XXX_Size() int { return m.Size() } func (m *Param) XXX_DiscardUnknown() { xxx_messageInfo_Param.DiscardUnknown(m) } var xxx_messageInfo_Param proto.InternalMessageInfo func (m *Param) GetParamSource() string { if m != nil { return m.ParamSource } return "" } func (m *Param) GetParamKey() string { if m != nil { return m.ParamKey } return "" } func (m *Param) GetParamType() string { if m != nil { return m.ParamType } return "" } type GrpcService struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *GrpcService) Reset() { *m = GrpcService{} } func (m *GrpcService) String() string { return proto.CompactTextString(m) } func (*GrpcService) ProtoMessage() {} func (*GrpcService) Descriptor() ([]byte, []int) { return fileDescriptor_dc706c3b890c1c84, []int{4} } func (m *GrpcService) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GrpcService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GrpcService.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 *GrpcService) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService.Merge(m, src) } func (m *GrpcService) XXX_Size() int { return m.Size() } func (m *GrpcService) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService.DiscardUnknown(m) } var xxx_messageInfo_GrpcService proto.InternalMessageInfo func init() { proto.RegisterType((*Http2Rpc)(nil), "higress.networking.v1.Http2Rpc") proto.RegisterType((*DubboService)(nil), "higress.networking.v1.DubboService") proto.RegisterType((*Method)(nil), "higress.networking.v1.Method") proto.RegisterType((*Param)(nil), "higress.networking.v1.Param") proto.RegisterType((*GrpcService)(nil), "higress.networking.v1.GrpcService") } func init() { proto.RegisterFile("networking/v1/http_2_rpc.proto", fileDescriptor_dc706c3b890c1c84) } var fileDescriptor_dc706c3b890c1c84 = []byte{ // 463 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcf, 0x8a, 0xd3, 0x40, 0x18, 0x77, 0xba, 0x6d, 0xb7, 0xfb, 0x65, 0xeb, 0x61, 0x40, 0x08, 0x8b, 0xc6, 0x35, 0x7b, 0x70, 0x41, 0x49, 0xd8, 0xea, 0x41, 0x14, 0x0f, 0x5b, 0x04, 0x17, 0x44, 0x58, 0xb2, 0x9e, 0xbc, 0x84, 0x49, 0x32, 0x66, 0x86, 0x6d, 0x33, 0xc3, 0xcc, 0x34, 0xda, 0xb7, 0xf0, 0x35, 0x7c, 0x13, 0x8f, 0x3e, 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0x9e, 0x91, 0x8c, 0xc4, 0x6d, 0x1d, 0x7b, 0xf1, 0xbd, 0x7f, 0x26, 0x1b, 0xdb, 0x8b, 0x7f, 0xf1, 0x37, 0x00, 0x00, 0xff, 0xff, 0x75, 0x5c, 0x9e, 0x28, 0x4b, 0x03, 0x00, 0x00, } func (m *Http2Rpc) 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 *Http2Rpc) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Http2Rpc) 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.Destination != nil { { size := m.Destination.Size() i -= size if _, err := m.Destination.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *Http2Rpc_Dubbo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Http2Rpc_Dubbo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.Dubbo != nil { { size, err := m.Dubbo.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintHttp_2Rpc(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Http2Rpc_Grpc) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Http2Rpc_Grpc) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.Grpc != nil { { size, err := m.Grpc.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintHttp_2Rpc(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *DubboService) 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 *DubboService) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DubboService) 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 len(m.Methods) > 0 { for iNdEx := len(m.Methods) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Methods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintHttp_2Rpc(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } if len(m.Group) > 0 { i -= len(m.Group) copy(dAtA[i:], m.Group) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.Group))) i-- dAtA[i] = 0x1a } if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 } if len(m.Service) > 0 { i -= len(m.Service) copy(dAtA[i:], m.Service) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.Service))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Method) 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 *Method) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Method) 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 len(m.Params) > 0 { for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Params[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintHttp_2Rpc(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } } if len(m.HttpMethods) > 0 { for iNdEx := len(m.HttpMethods) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.HttpMethods[iNdEx]) copy(dAtA[i:], m.HttpMethods[iNdEx]) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.HttpMethods[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.HttpPath) > 0 { i -= len(m.HttpPath) copy(dAtA[i:], m.HttpPath) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.HttpPath))) i-- dAtA[i] = 0x1a } if len(m.HeadersAttach) > 0 { i -= len(m.HeadersAttach) copy(dAtA[i:], m.HeadersAttach) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.HeadersAttach))) i-- dAtA[i] = 0x12 } if len(m.ServiceMethod) > 0 { i -= len(m.ServiceMethod) copy(dAtA[i:], m.ServiceMethod) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.ServiceMethod))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Param) 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 *Param) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Param) 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 len(m.ParamType) > 0 { i -= len(m.ParamType) copy(dAtA[i:], m.ParamType) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.ParamType))) i-- dAtA[i] = 0x1a } if len(m.ParamKey) > 0 { i -= len(m.ParamKey) copy(dAtA[i:], m.ParamKey) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.ParamKey))) i-- dAtA[i] = 0x12 } if len(m.ParamSource) > 0 { i -= len(m.ParamSource) copy(dAtA[i:], m.ParamSource) i = encodeVarintHttp_2Rpc(dAtA, i, uint64(len(m.ParamSource))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *GrpcService) 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 *GrpcService) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *GrpcService) 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) } return len(dAtA) - i, nil } func encodeVarintHttp_2Rpc(dAtA []byte, offset int, v uint64) int { offset -= sovHttp_2Rpc(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Http2Rpc) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Destination != nil { n += m.Destination.Size() } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *Http2Rpc_Dubbo) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Dubbo != nil { l = m.Dubbo.Size() n += 1 + l + sovHttp_2Rpc(uint64(l)) } return n } func (m *Http2Rpc_Grpc) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Grpc != nil { l = m.Grpc.Size() n += 1 + l + sovHttp_2Rpc(uint64(l)) } return n } func (m *DubboService) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Service) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } l = len(m.Version) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } l = len(m.Group) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } if len(m.Methods) > 0 { for _, e := range m.Methods { l = e.Size() n += 1 + l + sovHttp_2Rpc(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *Method) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ServiceMethod) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } l = len(m.HeadersAttach) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } l = len(m.HttpPath) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } if len(m.HttpMethods) > 0 { for _, s := range m.HttpMethods { l = len(s) n += 1 + l + sovHttp_2Rpc(uint64(l)) } } if len(m.Params) > 0 { for _, e := range m.Params { l = e.Size() n += 1 + l + sovHttp_2Rpc(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *Param) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ParamSource) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } l = len(m.ParamKey) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } l = len(m.ParamType) if l > 0 { n += 1 + l + sovHttp_2Rpc(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *GrpcService) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovHttp_2Rpc(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozHttp_2Rpc(x uint64) (n int) { return sovHttp_2Rpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Http2Rpc) 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 ErrIntOverflowHttp_2Rpc } 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: Http2Rpc: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Http2Rpc: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Dubbo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } v := &DubboService{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Destination = &Http2Rpc_Dubbo{v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Grpc", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } v := &GrpcService{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Destination = &Http2Rpc_Grpc{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttp_2Rpc(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHttp_2Rpc } 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 (m *DubboService) 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 ErrIntOverflowHttp_2Rpc } 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: DubboService: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DubboService: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.Service = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.Group = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.Methods = append(m.Methods, &Method{}) if err := m.Methods[len(m.Methods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttp_2Rpc(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHttp_2Rpc } 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 (m *Method) 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 ErrIntOverflowHttp_2Rpc } 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: Method: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Method: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ServiceMethod", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.ServiceMethod = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HeadersAttach", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.HeadersAttach = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HttpPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.HttpPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HttpMethods", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.HttpMethods = append(m.HttpMethods, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.Params = append(m.Params, &Param{}) if err := m.Params[len(m.Params)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttp_2Rpc(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHttp_2Rpc } 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 (m *Param) 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 ErrIntOverflowHttp_2Rpc } 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: Param: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Param: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParamSource", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.ParamSource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParamKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.ParamKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParamType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHttp_2Rpc } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthHttp_2Rpc } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthHttp_2Rpc } if postIndex > l { return io.ErrUnexpectedEOF } m.ParamType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttp_2Rpc(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHttp_2Rpc } 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 (m *GrpcService) 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 ErrIntOverflowHttp_2Rpc } 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: GrpcService: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GrpcService: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := skipHttp_2Rpc(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHttp_2Rpc } 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 skipHttp_2Rpc(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, ErrIntOverflowHttp_2Rpc } 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, ErrIntOverflowHttp_2Rpc } 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, ErrIntOverflowHttp_2Rpc } 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, ErrInvalidLengthHttp_2Rpc } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupHttp_2Rpc } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthHttp_2Rpc } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthHttp_2Rpc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHttp_2Rpc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupHttp_2Rpc = fmt.Errorf("proto: unexpected end of group") )