blob: 983f410466211fd28bd94a297338454080840e03 [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go.chromium.org/luci/grpc/prpc/helloworld_test.proto
package prpc
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
math "math"
)
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
// The request message containing the user's name.
type HelloRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HelloRequest) Reset() { *m = HelloRequest{} }
func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
func (*HelloRequest) ProtoMessage() {}
func (*HelloRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a601d72b9fd9e561, []int{0}
}
func (m *HelloRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HelloRequest.Unmarshal(m, b)
}
func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HelloRequest.Marshal(b, m, deterministic)
}
func (m *HelloRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_HelloRequest.Merge(m, src)
}
func (m *HelloRequest) XXX_Size() int {
return xxx_messageInfo_HelloRequest.Size(m)
}
func (m *HelloRequest) XXX_DiscardUnknown() {
xxx_messageInfo_HelloRequest.DiscardUnknown(m)
}
var xxx_messageInfo_HelloRequest proto.InternalMessageInfo
func (m *HelloRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The response message containing the greetings
type HelloReply struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HelloReply) Reset() { *m = HelloReply{} }
func (m *HelloReply) String() string { return proto.CompactTextString(m) }
func (*HelloReply) ProtoMessage() {}
func (*HelloReply) Descriptor() ([]byte, []int) {
return fileDescriptor_a601d72b9fd9e561, []int{1}
}
func (m *HelloReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HelloReply.Unmarshal(m, b)
}
func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HelloReply.Marshal(b, m, deterministic)
}
func (m *HelloReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_HelloReply.Merge(m, src)
}
func (m *HelloReply) XXX_Size() int {
return xxx_messageInfo_HelloReply.Size(m)
}
func (m *HelloReply) XXX_DiscardUnknown() {
xxx_messageInfo_HelloReply.DiscardUnknown(m)
}
var xxx_messageInfo_HelloReply proto.InternalMessageInfo
func (m *HelloReply) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
type MultiplyRequest struct {
X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MultiplyRequest) Reset() { *m = MultiplyRequest{} }
func (m *MultiplyRequest) String() string { return proto.CompactTextString(m) }
func (*MultiplyRequest) ProtoMessage() {}
func (*MultiplyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a601d72b9fd9e561, []int{2}
}
func (m *MultiplyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MultiplyRequest.Unmarshal(m, b)
}
func (m *MultiplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MultiplyRequest.Marshal(b, m, deterministic)
}
func (m *MultiplyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_MultiplyRequest.Merge(m, src)
}
func (m *MultiplyRequest) XXX_Size() int {
return xxx_messageInfo_MultiplyRequest.Size(m)
}
func (m *MultiplyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_MultiplyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_MultiplyRequest proto.InternalMessageInfo
func (m *MultiplyRequest) GetX() int32 {
if m != nil {
return m.X
}
return 0
}
func (m *MultiplyRequest) GetY() int32 {
if m != nil {
return m.Y
}
return 0
}
type MultiplyResponse struct {
Z int32 `protobuf:"varint,1,opt,name=z,proto3" json:"z,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MultiplyResponse) Reset() { *m = MultiplyResponse{} }
func (m *MultiplyResponse) String() string { return proto.CompactTextString(m) }
func (*MultiplyResponse) ProtoMessage() {}
func (*MultiplyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a601d72b9fd9e561, []int{3}
}
func (m *MultiplyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MultiplyResponse.Unmarshal(m, b)
}
func (m *MultiplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MultiplyResponse.Marshal(b, m, deterministic)
}
func (m *MultiplyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MultiplyResponse.Merge(m, src)
}
func (m *MultiplyResponse) XXX_Size() int {
return xxx_messageInfo_MultiplyResponse.Size(m)
}
func (m *MultiplyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MultiplyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_MultiplyResponse proto.InternalMessageInfo
func (m *MultiplyResponse) GetZ() int32 {
if m != nil {
return m.Z
}
return 0
}
func init() {
proto.RegisterType((*HelloRequest)(nil), "prpc.HelloRequest")
proto.RegisterType((*HelloReply)(nil), "prpc.HelloReply")
proto.RegisterType((*MultiplyRequest)(nil), "prpc.MultiplyRequest")
proto.RegisterType((*MultiplyResponse)(nil), "prpc.MultiplyResponse")
}
func init() {
proto.RegisterFile("go.chromium.org/luci/grpc/prpc/helloworld_test.proto", fileDescriptor_a601d72b9fd9e561)
}
var fileDescriptor_a601d72b9fd9e561 = []byte{
// 246 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x41, 0x4b, 0xc3, 0x30,
0x14, 0xc7, 0x57, 0xa9, 0x6e, 0x3e, 0x06, 0x8e, 0x07, 0x4a, 0xd9, 0x69, 0xe4, 0x20, 0x5e, 0x4c,
0xa1, 0x7a, 0x13, 0x4f, 0x3b, 0xe8, 0xc5, 0x4b, 0xfd, 0x00, 0x52, 0xeb, 0xa3, 0x2b, 0xbc, 0x2e,
0x31, 0x49, 0x71, 0xd9, 0xa7, 0x97, 0xb4, 0x06, 0xb5, 0x97, 0x90, 0xff, 0xfb, 0xff, 0x48, 0x7e,
0x3c, 0xb8, 0x6f, 0x94, 0xac, 0x77, 0x46, 0x75, 0x6d, 0xdf, 0x49, 0x65, 0x9a, 0x9c, 0xfb, 0xba,
0xcd, 0x1b, 0xa3, 0xeb, 0x5c, 0x87, 0x63, 0x47, 0xcc, 0xea, 0x4b, 0x19, 0xfe, 0x78, 0x73, 0x64,
0x9d, 0xd4, 0x46, 0x39, 0x85, 0x69, 0xe8, 0x84, 0x80, 0xe5, 0x73, 0xa8, 0x4b, 0xfa, 0xec, 0xc9,
0x3a, 0x44, 0x48, 0xf7, 0x55, 0x47, 0x59, 0xb2, 0x49, 0x6e, 0xce, 0xcb, 0xe1, 0x2e, 0xae, 0x01,
0x7e, 0x18, 0xcd, 0x1e, 0x33, 0x98, 0x77, 0x64, 0x6d, 0xd5, 0x44, 0x28, 0x46, 0x71, 0x0b, 0x17,
0x2f, 0x3d, 0xbb, 0x56, 0xb3, 0x8f, 0xcf, 0x2d, 0x21, 0x39, 0x0c, 0xd8, 0x69, 0x99, 0x1c, 0x42,
0xf2, 0xd9, 0xc9, 0x98, 0xbc, 0xd8, 0xc0, 0xea, 0x17, 0xb7, 0x5a, 0xed, 0x2d, 0x05, 0xe2, 0x18,
0xf9, 0x63, 0xf1, 0x08, 0xf3, 0x27, 0x43, 0xe4, 0xc8, 0x60, 0x01, 0x8b, 0xd7, 0xca, 0x0f, 0x1a,
0x88, 0x32, 0xa8, 0xcb, 0xbf, 0xde, 0xeb, 0xd5, 0xbf, 0x99, 0x66, 0x2f, 0x66, 0xc5, 0x16, 0xd2,
0x6d, 0xc5, 0x35, 0x3e, 0xc0, 0x22, 0x7e, 0x84, 0x97, 0x23, 0x37, 0xf1, 0x5c, 0x5f, 0x4d, 0xc7,
0xa3, 0x8f, 0x98, 0xbd, 0x9f, 0x0d, 0xdb, 0xba, 0xfb, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xda, 0x14,
0x82, 0x53, 0x65, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// GreeterClient is the client API for Greeter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GreeterClient interface {
// Sends a greeting
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}
type greeterPRPCClient struct {
client *Client
}
func NewGreeterPRPCClient(client *Client) GreeterClient {
return &greeterPRPCClient{client}
}
func (c *greeterPRPCClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
out := new(HelloReply)
err := c.client.Call(ctx, "prpc.Greeter", "SayHello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type greeterClient struct {
cc *grpc.ClientConn
}
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient {
return &greeterClient{cc}
}
func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
out := new(HelloReply)
err := c.cc.Invoke(ctx, "/prpc.Greeter/SayHello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GreeterServer is the server API for Greeter service.
type GreeterServer interface {
// Sends a greeting
SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}
func RegisterGreeterServer(s Registrar, srv GreeterServer) {
s.RegisterService(&_Greeter_serviceDesc, srv)
}
func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HelloRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).SayHello(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/prpc.Greeter/SayHello",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Greeter_serviceDesc = grpc.ServiceDesc{
ServiceName: "prpc.Greeter",
HandlerType: (*GreeterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SayHello",
Handler: _Greeter_SayHello_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/grpc/prpc/helloworld_test.proto",
}
// CalcClient is the client API for Calc service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CalcClient interface {
Multiply(ctx context.Context, in *MultiplyRequest, opts ...grpc.CallOption) (*MultiplyResponse, error)
}
type calcPRPCClient struct {
client *Client
}
func NewCalcPRPCClient(client *Client) CalcClient {
return &calcPRPCClient{client}
}
func (c *calcPRPCClient) Multiply(ctx context.Context, in *MultiplyRequest, opts ...grpc.CallOption) (*MultiplyResponse, error) {
out := new(MultiplyResponse)
err := c.client.Call(ctx, "prpc.Calc", "Multiply", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type calcClient struct {
cc *grpc.ClientConn
}
func NewCalcClient(cc *grpc.ClientConn) CalcClient {
return &calcClient{cc}
}
func (c *calcClient) Multiply(ctx context.Context, in *MultiplyRequest, opts ...grpc.CallOption) (*MultiplyResponse, error) {
out := new(MultiplyResponse)
err := c.cc.Invoke(ctx, "/prpc.Calc/Multiply", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CalcServer is the server API for Calc service.
type CalcServer interface {
Multiply(context.Context, *MultiplyRequest) (*MultiplyResponse, error)
}
func RegisterCalcServer(s Registrar, srv CalcServer) {
s.RegisterService(&_Calc_serviceDesc, srv)
}
func _Calc_Multiply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MultiplyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CalcServer).Multiply(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/prpc.Calc/Multiply",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CalcServer).Multiply(ctx, req.(*MultiplyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Calc_serviceDesc = grpc.ServiceDesc{
ServiceName: "prpc.Calc",
HandlerType: (*CalcServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Multiply",
Handler: _Calc_Multiply_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/grpc/prpc/helloworld_test.proto",
}