forked from husobee/grpc_v_rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.pb.go
152 lines (127 loc) · 5.27 KB
/
info.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Code generated by protoc-gen-go.
// source: info.proto
// DO NOT EDIT!
/*
Package main is a generated protocol buffer package.
It is generated from these files:
info.proto
It has these top-level messages:
InfoRequest
InfoReply
*/
package main
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
// The request message containing the user's name.
type InfoRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Age int64 `protobuf:"varint,2,opt,name=age" json:"age,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=height" json:"height,omitempty"`
}
func (m *InfoRequest) Reset() { *m = InfoRequest{} }
func (m *InfoRequest) String() string { return proto.CompactTextString(m) }
func (*InfoRequest) ProtoMessage() {}
func (*InfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// The response message containing the greetings
type InfoReply struct {
Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"`
}
func (m *InfoReply) Reset() { *m = InfoReply{} }
func (m *InfoReply) String() string { return proto.CompactTextString(m) }
func (*InfoReply) ProtoMessage() {}
func (*InfoReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func init() {
proto.RegisterType((*InfoRequest)(nil), "main.InfoRequest")
proto.RegisterType((*InfoReply)(nil), "main.InfoReply")
}
// 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.SupportPackageIsVersion2
// Client API for InfoServer service
type InfoServerClient interface {
// Sends a greeting
SetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoReply, error)
}
type infoServerClient struct {
cc *grpc.ClientConn
}
func NewInfoServerClient(cc *grpc.ClientConn) InfoServerClient {
return &infoServerClient{cc}
}
func (c *infoServerClient) SetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoReply, error) {
out := new(InfoReply)
err := grpc.Invoke(ctx, "/main.InfoServer/SetInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for InfoServer service
type InfoServerServer interface {
// Sends a greeting
SetInfo(context.Context, *InfoRequest) (*InfoReply, error)
}
func RegisterInfoServerServer(s *grpc.Server, srv InfoServerServer) {
s.RegisterService(&_InfoServer_serviceDesc, srv)
}
func _InfoServer_SetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InfoServerServer).SetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/main.InfoServer/SetInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InfoServerServer).SetInfo(ctx, req.(*InfoRequest))
}
return interceptor(ctx, in, info, handler)
}
var _InfoServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "main.InfoServer",
HandlerType: (*InfoServerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SetInfo",
Handler: _InfoServer_SetInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
}
var fileDescriptor0 = []byte{
// 185 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x8f, 0xc1, 0xce, 0x82, 0x30,
0x10, 0x84, 0x7f, 0x7e, 0x08, 0xc8, 0x7a, 0x50, 0xf7, 0x60, 0x1a, 0x4f, 0x86, 0x93, 0x27, 0x4c,
0xf4, 0xcc, 0x03, 0x18, 0x6f, 0xe5, 0x09, 0x2a, 0x59, 0x81, 0x44, 0x5a, 0x6c, 0x8b, 0x89, 0x6f,
0x2f, 0xad, 0x98, 0x70, 0x9b, 0xf9, 0x92, 0x99, 0x9d, 0x05, 0x68, 0xe5, 0x5d, 0xe5, 0xbd, 0x56,
0x56, 0x61, 0xd4, 0x89, 0x56, 0x66, 0x57, 0x58, 0x5e, 0x46, 0xc6, 0xe9, 0x39, 0x90, 0xb1, 0x88,
0x10, 0x49, 0xd1, 0x11, 0x0b, 0xf6, 0xc1, 0x21, 0xe5, 0x5e, 0xe3, 0x1a, 0x42, 0x51, 0x13, 0xfb,
0x1f, 0x51, 0xc8, 0x9d, 0xc4, 0x2d, 0xc4, 0x0d, 0xb5, 0x75, 0x63, 0x59, 0xe8, 0xe1, 0xe4, 0xb2,
0x02, 0xd2, 0x6f, 0x59, 0xff, 0x78, 0x23, 0x83, 0xc4, 0x0c, 0x55, 0x45, 0xc6, 0xf8, 0xb6, 0x05,
0xff, 0x59, 0x17, 0xd7, 0x24, 0x8c, 0x92, 0xbe, 0x33, 0xe5, 0x93, 0x3b, 0x15, 0x00, 0x2e, 0x5e,
0x92, 0x7e, 0x91, 0xc6, 0x23, 0x24, 0x25, 0x59, 0x07, 0x70, 0x93, 0xbb, 0xad, 0xf9, 0x6c, 0xe8,
0x6e, 0x35, 0x47, 0xe3, 0xb9, 0xec, 0xef, 0x16, 0xfb, 0xbf, 0xce, 0x9f, 0x00, 0x00, 0x00, 0xff,
0xff, 0x05, 0xe0, 0xea, 0x0b, 0xe5, 0x00, 0x00, 0x00,
}