data_workshop/people.pb.go
2020-05-13 14:57:57 +08:00

280 lines
9.6 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: people.proto
package main
import (
context "context"
fmt "fmt"
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"
)
// 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 NameRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NameRequest) Reset() { *m = NameRequest{} }
func (m *NameRequest) String() string { return proto.CompactTextString(m) }
func (*NameRequest) ProtoMessage() {}
func (*NameRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_09461903b56db210, []int{0}
}
func (m *NameRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NameRequest.Unmarshal(m, b)
}
func (m *NameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NameRequest.Marshal(b, m, deterministic)
}
func (m *NameRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NameRequest.Merge(m, src)
}
func (m *NameRequest) XXX_Size() int {
return xxx_messageInfo_NameRequest.Size(m)
}
func (m *NameRequest) XXX_DiscardUnknown() {
xxx_messageInfo_NameRequest.DiscardUnknown(m)
}
var xxx_messageInfo_NameRequest proto.InternalMessageInfo
// The response message containing the greetings
type NameReply 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 *NameReply) Reset() { *m = NameReply{} }
func (m *NameReply) String() string { return proto.CompactTextString(m) }
func (*NameReply) ProtoMessage() {}
func (*NameReply) Descriptor() ([]byte, []int) {
return fileDescriptor_09461903b56db210, []int{1}
}
func (m *NameReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NameReply.Unmarshal(m, b)
}
func (m *NameReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NameReply.Marshal(b, m, deterministic)
}
func (m *NameReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_NameReply.Merge(m, src)
}
func (m *NameReply) XXX_Size() int {
return xxx_messageInfo_NameReply.Size(m)
}
func (m *NameReply) XXX_DiscardUnknown() {
xxx_messageInfo_NameReply.DiscardUnknown(m)
}
var xxx_messageInfo_NameReply proto.InternalMessageInfo
func (m *NameReply) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func init() {
proto.RegisterType((*NameRequest)(nil), "main.NameRequest")
proto.RegisterType((*NameReply)(nil), "main.NameReply")
}
func init() {
proto.RegisterFile("people.proto", fileDescriptor_09461903b56db210)
}
var fileDescriptor_09461903b56db210 = []byte{
// 220 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, 0x51, 0xe2, 0xe5, 0xe2, 0xf6, 0x4b, 0xcc, 0x4d,
0x0d, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x51, 0x52, 0xe5, 0xe2, 0x84, 0x70, 0x0b, 0x72, 0x2a,
0x85, 0x24, 0xb8, 0xd8, 0x73, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35,
0x38, 0x83, 0x60, 0x5c, 0xa3, 0x4f, 0x8c, 0x5c, 0x2c, 0x20, 0x75, 0x42, 0x7e, 0x5c, 0x9c, 0x6e,
0x99, 0x45, 0xc5, 0x25, 0x60, 0x8e, 0xa0, 0x1e, 0xc8, 0x42, 0x3d, 0x24, 0xf3, 0xa4, 0xf8, 0x91,
0x85, 0x0a, 0x72, 0x2a, 0x95, 0x64, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0x24, 0xae, 0x24, 0xa4, 0x5f,
0x66, 0xa8, 0x9f, 0x97, 0x98, 0x9b, 0xaa, 0x9f, 0x06, 0xd2, 0x0f, 0x62, 0x59, 0x31, 0x6a, 0x09,
0xf9, 0x70, 0x71, 0xf8, 0x24, 0x92, 0x60, 0x9c, 0x0c, 0xd8, 0x38, 0x31, 0x25, 0x41, 0xb8, 0x71,
0x39, 0x89, 0x28, 0xa6, 0xb9, 0x95, 0xe6, 0xe4, 0x50, 0x60, 0x5a, 0x5a, 0x69, 0x4e, 0x0e, 0xd4,
0x34, 0x27, 0x8e, 0x28, 0x36, 0x3d, 0x6b, 0x90, 0x8e, 0x24, 0x36, 0x70, 0xd8, 0x19, 0x03, 0x02,
0x00, 0x00, 0xff, 0xff, 0x59, 0xe5, 0x6d, 0xa1, 0x6f, 0x01, 0x00, 0x00,
}
// 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
FirstName(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*NameReply, error)
LastName(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*NameReply, error)
FullName(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*NameReply, error)
}
type nameClient struct {
cc grpc.ClientConnInterface
}
func NewNameClient(cc grpc.ClientConnInterface) NameClient {
return &nameClient{cc}
}
func (c *nameClient) FirstName(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*NameReply, error) {
out := new(NameReply)
err := c.cc.Invoke(ctx, "/main.Name/FirstName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nameClient) LastName(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*NameReply, error) {
out := new(NameReply)
err := c.cc.Invoke(ctx, "/main.Name/LastName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nameClient) FullName(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*NameReply, error) {
out := new(NameReply)
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
FirstName(context.Context, *NameRequest) (*NameReply, error)
LastName(context.Context, *NameRequest) (*NameReply, error)
FullName(context.Context, *NameRequest) (*NameReply, error)
}
// UnimplementedNameServer can be embedded to have forward compatible implementations.
type UnimplementedNameServer struct {
}
func (*UnimplementedNameServer) FirstName(ctx context.Context, req *NameRequest) (*NameReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method FirstName not implemented")
}
func (*UnimplementedNameServer) LastName(ctx context.Context, req *NameRequest) (*NameReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method LastName not implemented")
}
func (*UnimplementedNameServer) FullName(ctx context.Context, req *NameRequest) (*NameReply, error) {
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) {
in := new(NameRequest)
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) {
return srv.(NameServer).FirstName(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Name_LastName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
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) {
return srv.(NameServer).LastName(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Name_FullName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
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) {
return srv.(NameServer).FullName(ctx, req.(*NameRequest))
}
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",
}