/
guid.pb.go
140 lines (115 loc) · 3.7 KB
/
guid.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
// Code generated by protoc-gen-go.
// source: guid.proto
// DO NOT EDIT!
/*
Package server is a generated protocol buffer package.
It is generated from these files:
guid.proto
It has these top-level messages:
Req
Resp
*/
package server
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
type Req struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *Req) Reset() { *m = Req{} }
func (m *Req) String() string { return proto.CompactTextString(m) }
func (*Req) ProtoMessage() {}
func (*Req) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type Resp struct {
Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"`
Guid *uint64 `protobuf:"varint,2,req,name=guid" json:"guid,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Resp) Reset() { *m = Resp{} }
func (m *Resp) String() string { return proto.CompactTextString(m) }
func (*Resp) ProtoMessage() {}
func (*Resp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Resp) GetCode() int32 {
if m != nil && m.Code != nil {
return *m.Code
}
return 0
}
func (m *Resp) GetGuid() uint64 {
if m != nil && m.Guid != nil {
return *m.Guid
}
return 0
}
func init() {
proto.RegisterType((*Req)(nil), "server.Req")
proto.RegisterType((*Resp)(nil), "server.Resp")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// Client API for Guid service
type GuidClient interface {
GetGuid(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error)
}
type guidClient struct {
cc *grpc.ClientConn
}
func NewGuidClient(cc *grpc.ClientConn) GuidClient {
return &guidClient{cc}
}
func (c *guidClient) GetGuid(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error) {
out := new(Resp)
err := grpc.Invoke(ctx, "/server.Guid/GetGuid", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Guid service
type GuidServer interface {
GetGuid(context.Context, *Req) (*Resp, error)
}
func RegisterGuidServer(s *grpc.Server, srv GuidServer) {
s.RegisterService(&_Guid_serviceDesc, srv)
}
func _Guid_GetGuid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(Req)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(GuidServer).GetGuid(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
var _Guid_serviceDesc = grpc.ServiceDesc{
ServiceName: "server.Guid",
HandlerType: (*GuidServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetGuid",
Handler: _Guid_GetGuid_Handler,
},
},
Streams: []grpc.StreamDesc{},
}
var fileDescriptor0 = []byte{
// 110 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2f, 0xcd, 0x4c,
0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2b, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0x52, 0x62,
0xe5, 0x62, 0x0e, 0x4a, 0x2d, 0x54, 0x52, 0xe2, 0x62, 0x09, 0x4a, 0x2d, 0x2e, 0x10, 0xe2, 0xe1,
0x62, 0x49, 0xce, 0x4f, 0x49, 0x95, 0x60, 0x54, 0x60, 0xd2, 0x60, 0x05, 0xf1, 0x40, 0x5a, 0x24,
0x98, 0x80, 0x3c, 0x16, 0x23, 0x1d, 0x2e, 0x16, 0x77, 0x20, 0x4f, 0x48, 0x85, 0x8b, 0xdd, 0x3d,
0xb5, 0x04, 0xcc, 0xe4, 0xd6, 0x83, 0x18, 0xa3, 0x07, 0x34, 0x43, 0x8a, 0x07, 0xc1, 0x29, 0x2e,
0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x93, 0x9a, 0xe5, 0x6d, 0x00, 0x00, 0x00,
}