224 lines
8.3 KiB
Go
224 lines
8.3 KiB
Go
|
// Code generated by protoc-gen-go.
|
||
|
// source: payloads.proto
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
package grpc_testing
|
||
|
|
||
|
import proto "github.com/golang/protobuf/proto"
|
||
|
import fmt "fmt"
|
||
|
import math "math"
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ = proto.Marshal
|
||
|
var _ = fmt.Errorf
|
||
|
var _ = math.Inf
|
||
|
|
||
|
type ByteBufferParams struct {
|
||
|
ReqSize int32 `protobuf:"varint,1,opt,name=req_size,json=reqSize" json:"req_size,omitempty"`
|
||
|
RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize" json:"resp_size,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *ByteBufferParams) Reset() { *m = ByteBufferParams{} }
|
||
|
func (m *ByteBufferParams) String() string { return proto.CompactTextString(m) }
|
||
|
func (*ByteBufferParams) ProtoMessage() {}
|
||
|
func (*ByteBufferParams) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
||
|
|
||
|
type SimpleProtoParams struct {
|
||
|
ReqSize int32 `protobuf:"varint,1,opt,name=req_size,json=reqSize" json:"req_size,omitempty"`
|
||
|
RespSize int32 `protobuf:"varint,2,opt,name=resp_size,json=respSize" json:"resp_size,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *SimpleProtoParams) Reset() { *m = SimpleProtoParams{} }
|
||
|
func (m *SimpleProtoParams) String() string { return proto.CompactTextString(m) }
|
||
|
func (*SimpleProtoParams) ProtoMessage() {}
|
||
|
func (*SimpleProtoParams) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
||
|
|
||
|
type ComplexProtoParams struct {
|
||
|
}
|
||
|
|
||
|
func (m *ComplexProtoParams) Reset() { *m = ComplexProtoParams{} }
|
||
|
func (m *ComplexProtoParams) String() string { return proto.CompactTextString(m) }
|
||
|
func (*ComplexProtoParams) ProtoMessage() {}
|
||
|
func (*ComplexProtoParams) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
|
||
|
|
||
|
type PayloadConfig struct {
|
||
|
// Types that are valid to be assigned to Payload:
|
||
|
// *PayloadConfig_BytebufParams
|
||
|
// *PayloadConfig_SimpleParams
|
||
|
// *PayloadConfig_ComplexParams
|
||
|
Payload isPayloadConfig_Payload `protobuf_oneof:"payload"`
|
||
|
}
|
||
|
|
||
|
func (m *PayloadConfig) Reset() { *m = PayloadConfig{} }
|
||
|
func (m *PayloadConfig) String() string { return proto.CompactTextString(m) }
|
||
|
func (*PayloadConfig) ProtoMessage() {}
|
||
|
func (*PayloadConfig) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
|
||
|
|
||
|
type isPayloadConfig_Payload interface {
|
||
|
isPayloadConfig_Payload()
|
||
|
}
|
||
|
|
||
|
type PayloadConfig_BytebufParams struct {
|
||
|
BytebufParams *ByteBufferParams `protobuf:"bytes,1,opt,name=bytebuf_params,json=bytebufParams,oneof"`
|
||
|
}
|
||
|
type PayloadConfig_SimpleParams struct {
|
||
|
SimpleParams *SimpleProtoParams `protobuf:"bytes,2,opt,name=simple_params,json=simpleParams,oneof"`
|
||
|
}
|
||
|
type PayloadConfig_ComplexParams struct {
|
||
|
ComplexParams *ComplexProtoParams `protobuf:"bytes,3,opt,name=complex_params,json=complexParams,oneof"`
|
||
|
}
|
||
|
|
||
|
func (*PayloadConfig_BytebufParams) isPayloadConfig_Payload() {}
|
||
|
func (*PayloadConfig_SimpleParams) isPayloadConfig_Payload() {}
|
||
|
func (*PayloadConfig_ComplexParams) isPayloadConfig_Payload() {}
|
||
|
|
||
|
func (m *PayloadConfig) GetPayload() isPayloadConfig_Payload {
|
||
|
if m != nil {
|
||
|
return m.Payload
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *PayloadConfig) GetBytebufParams() *ByteBufferParams {
|
||
|
if x, ok := m.GetPayload().(*PayloadConfig_BytebufParams); ok {
|
||
|
return x.BytebufParams
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *PayloadConfig) GetSimpleParams() *SimpleProtoParams {
|
||
|
if x, ok := m.GetPayload().(*PayloadConfig_SimpleParams); ok {
|
||
|
return x.SimpleParams
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *PayloadConfig) GetComplexParams() *ComplexProtoParams {
|
||
|
if x, ok := m.GetPayload().(*PayloadConfig_ComplexParams); ok {
|
||
|
return x.ComplexParams
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
||
|
func (*PayloadConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||
|
return _PayloadConfig_OneofMarshaler, _PayloadConfig_OneofUnmarshaler, _PayloadConfig_OneofSizer, []interface{}{
|
||
|
(*PayloadConfig_BytebufParams)(nil),
|
||
|
(*PayloadConfig_SimpleParams)(nil),
|
||
|
(*PayloadConfig_ComplexParams)(nil),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func _PayloadConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
||
|
m := msg.(*PayloadConfig)
|
||
|
// payload
|
||
|
switch x := m.Payload.(type) {
|
||
|
case *PayloadConfig_BytebufParams:
|
||
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
||
|
if err := b.EncodeMessage(x.BytebufParams); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
case *PayloadConfig_SimpleParams:
|
||
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
||
|
if err := b.EncodeMessage(x.SimpleParams); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
case *PayloadConfig_ComplexParams:
|
||
|
b.EncodeVarint(3<<3 | proto.WireBytes)
|
||
|
if err := b.EncodeMessage(x.ComplexParams); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
case nil:
|
||
|
default:
|
||
|
return fmt.Errorf("PayloadConfig.Payload has unexpected type %T", x)
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func _PayloadConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
||
|
m := msg.(*PayloadConfig)
|
||
|
switch tag {
|
||
|
case 1: // payload.bytebuf_params
|
||
|
if wire != proto.WireBytes {
|
||
|
return true, proto.ErrInternalBadWireType
|
||
|
}
|
||
|
msg := new(ByteBufferParams)
|
||
|
err := b.DecodeMessage(msg)
|
||
|
m.Payload = &PayloadConfig_BytebufParams{msg}
|
||
|
return true, err
|
||
|
case 2: // payload.simple_params
|
||
|
if wire != proto.WireBytes {
|
||
|
return true, proto.ErrInternalBadWireType
|
||
|
}
|
||
|
msg := new(SimpleProtoParams)
|
||
|
err := b.DecodeMessage(msg)
|
||
|
m.Payload = &PayloadConfig_SimpleParams{msg}
|
||
|
return true, err
|
||
|
case 3: // payload.complex_params
|
||
|
if wire != proto.WireBytes {
|
||
|
return true, proto.ErrInternalBadWireType
|
||
|
}
|
||
|
msg := new(ComplexProtoParams)
|
||
|
err := b.DecodeMessage(msg)
|
||
|
m.Payload = &PayloadConfig_ComplexParams{msg}
|
||
|
return true, err
|
||
|
default:
|
||
|
return false, nil
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func _PayloadConfig_OneofSizer(msg proto.Message) (n int) {
|
||
|
m := msg.(*PayloadConfig)
|
||
|
// payload
|
||
|
switch x := m.Payload.(type) {
|
||
|
case *PayloadConfig_BytebufParams:
|
||
|
s := proto.Size(x.BytebufParams)
|
||
|
n += proto.SizeVarint(1<<3 | proto.WireBytes)
|
||
|
n += proto.SizeVarint(uint64(s))
|
||
|
n += s
|
||
|
case *PayloadConfig_SimpleParams:
|
||
|
s := proto.Size(x.SimpleParams)
|
||
|
n += proto.SizeVarint(2<<3 | proto.WireBytes)
|
||
|
n += proto.SizeVarint(uint64(s))
|
||
|
n += s
|
||
|
case *PayloadConfig_ComplexParams:
|
||
|
s := proto.Size(x.ComplexParams)
|
||
|
n += proto.SizeVarint(3<<3 | proto.WireBytes)
|
||
|
n += proto.SizeVarint(uint64(s))
|
||
|
n += s
|
||
|
case nil:
|
||
|
default:
|
||
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*ByteBufferParams)(nil), "grpc.testing.ByteBufferParams")
|
||
|
proto.RegisterType((*SimpleProtoParams)(nil), "grpc.testing.SimpleProtoParams")
|
||
|
proto.RegisterType((*ComplexProtoParams)(nil), "grpc.testing.ComplexProtoParams")
|
||
|
proto.RegisterType((*PayloadConfig)(nil), "grpc.testing.PayloadConfig")
|
||
|
}
|
||
|
|
||
|
func init() { proto.RegisterFile("payloads.proto", fileDescriptor2) }
|
||
|
|
||
|
var fileDescriptor2 = []byte{
|
||
|
// 250 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x48, 0xac, 0xcc,
|
||
|
0xc9, 0x4f, 0x4c, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x49, 0x2f, 0x2a, 0x48,
|
||
|
0xd6, 0x2b, 0x49, 0x2d, 0x2e, 0xc9, 0xcc, 0x4b, 0x57, 0xf2, 0xe2, 0x12, 0x70, 0xaa, 0x2c, 0x49,
|
||
|
0x75, 0x2a, 0x4d, 0x4b, 0x4b, 0x2d, 0x0a, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0x16, 0x92, 0xe4, 0xe2,
|
||
|
0x28, 0x4a, 0x2d, 0x8c, 0x2f, 0xce, 0xac, 0x4a, 0x95, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0d, 0x62,
|
||
|
0x07, 0xf2, 0x83,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