data_workshop/people.pb.go

201 lines
6.9 KiB
Go
Raw Permalink Normal View History

2020-05-13 06:57:57 +00:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: people.proto
package main
import (
context "context"
fmt "fmt"
2020-05-13 06:57:57 +00:00
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
2020-05-13 06:57:57 +00:00
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
2020-05-19 10:12:18 +00:00
// 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
func init() {
proto.RegisterFile("people.proto", fileDescriptor_09461903b56db210)
}
var fileDescriptor_09461903b56db210 = []byte{
// 190 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x48, 0xcd, 0x2f,
0xc8, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc, 0x93, 0x92,
0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f,
0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0xa8, 0x91, 0xe2, 0x4a, 0x4a, 0x2c, 0x86, 0xaa, 0x37,
0xba, 0xc5, 0xc8, 0xc5, 0xe2, 0x97, 0x98, 0x9b, 0x2a, 0xe4, 0xc6, 0xc5, 0xe9, 0x96, 0x59, 0x54,
0x5c, 0x02, 0xe6, 0xf0, 0xea, 0x81, 0x8c, 0xd1, 0x0b, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x91,
0xe2, 0x86, 0x71, 0x0b, 0x72, 0x2a, 0x95, 0x64, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0x24, 0xae, 0x24,
0xa4, 0x5f, 0x66, 0xa8, 0x9f, 0x97, 0x98, 0x9b, 0xaa, 0x9f, 0x06, 0xd2, 0x07, 0x62, 0x59, 0x31,
0x6a, 0x09, 0xb9, 0x70, 0x71, 0xf8, 0x24, 0x12, 0x61, 0x8c, 0x0c, 0xd8, 0x18, 0x31, 0x25, 0x41,
0xb8, 0x31, 0x39, 0x89, 0x28, 0xa6, 0xb8, 0x95, 0xe6, 0xe4, 0x90, 0x61, 0x4a, 0x5a, 0x69, 0x4e,
0x0e, 0xd4, 0x14, 0x27, 0x8e, 0x28, 0x36, 0x3d, 0x6b, 0x90, 0xea, 0x24, 0x36, 0xb0, 0x6f, 0x8d,
0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x0c, 0x50, 0xa2, 0x2d, 0x01, 0x00, 0x00,
2020-05-13 06:57:57 +00:00
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// NameClient is the client API for Name service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NameClient interface {
// Sends a greeting
2020-05-19 10:12:18 +00:00
FirstName(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
LastName(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
FullName(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
2020-05-13 06:57:57 +00:00
}
type nameClient struct {
cc grpc.ClientConnInterface
}
func NewNameClient(cc grpc.ClientConnInterface) NameClient {
return &nameClient{cc}
}
2020-05-19 10:12:18 +00:00
func (c *nameClient) FirstName(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) {
out := new(Reply)
2020-05-13 06:57:57 +00:00
err := c.cc.Invoke(ctx, "/main.Name/FirstName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2020-05-19 10:12:18 +00:00
func (c *nameClient) LastName(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) {
out := new(Reply)
2020-05-13 06:57:57 +00:00
err := c.cc.Invoke(ctx, "/main.Name/LastName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2020-05-19 10:12:18 +00:00
func (c *nameClient) FullName(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) {
out := new(Reply)
2020-05-13 06:57:57 +00:00
err := c.cc.Invoke(ctx, "/main.Name/FullName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NameServer is the server API for Name service.
type NameServer interface {
// Sends a greeting
2020-05-19 10:12:18 +00:00
FirstName(context.Context, *Request) (*Reply, error)
LastName(context.Context, *Request) (*Reply, error)
FullName(context.Context, *Request) (*Reply, error)
2020-05-13 06:57:57 +00:00
}
// UnimplementedNameServer can be embedded to have forward compatible implementations.
type UnimplementedNameServer struct {
}
func (*UnimplementedNameServer) FirstName(ctx context.Context, req *Request) (*Reply, error) {
2020-05-13 06:57:57 +00:00
return nil, status.Errorf(codes.Unimplemented, "method FirstName not implemented")
}
func (*UnimplementedNameServer) LastName(ctx context.Context, req *Request) (*Reply, error) {
2020-05-13 06:57:57 +00:00
return nil, status.Errorf(codes.Unimplemented, "method LastName not implemented")
}
func (*UnimplementedNameServer) FullName(ctx context.Context, req *Request) (*Reply, error) {
2020-05-13 06:57:57 +00:00
return nil, status.Errorf(codes.Unimplemented, "method FullName not implemented")
}
func RegisterNameServer(s *grpc.Server, srv NameServer) {
s.RegisterService(&_Name_serviceDesc, srv)
}
func _Name_FirstName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2020-05-19 10:12:18 +00:00
in := new(Request)
2020-05-13 06:57:57 +00:00
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NameServer).FirstName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/main.Name/FirstName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2020-05-19 10:12:18 +00:00
return srv.(NameServer).FirstName(ctx, req.(*Request))
2020-05-13 06:57:57 +00:00
}
return interceptor(ctx, in, info, handler)
}
func _Name_LastName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2020-05-19 10:12:18 +00:00
in := new(Request)
2020-05-13 06:57:57 +00:00
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NameServer).LastName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/main.Name/LastName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2020-05-19 10:12:18 +00:00
return srv.(NameServer).LastName(ctx, req.(*Request))
2020-05-13 06:57:57 +00:00
}
return interceptor(ctx, in, info, handler)
}
func _Name_FullName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2020-05-19 10:12:18 +00:00
in := new(Request)
2020-05-13 06:57:57 +00:00
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NameServer).FullName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/main.Name/FullName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2020-05-19 10:12:18 +00:00
return srv.(NameServer).FullName(ctx, req.(*Request))
2020-05-13 06:57:57 +00:00
}
return interceptor(ctx, in, info, handler)
}
var _Name_serviceDesc = grpc.ServiceDesc{
ServiceName: "main.Name",
HandlerType: (*NameServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "FirstName",
Handler: _Name_FirstName_Handler,
},
{
MethodName: "LastName",
Handler: _Name_LastName_Handler,
},
{
MethodName: "FullName",
Handler: _Name_FullName_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "people.proto",
}