deal.pb.go
6.06 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: deal.proto
/*
Package rpc_cf is a generated protocol buffer package.
It is generated from these files:
deal.proto
It has these top-level messages:
DeckRequest
DeckReply
*/
package rpc_cf
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
// 请求的消息包含用户名
type DeckRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
CardType int32 `protobuf:"varint,2,opt,name=card_type,json=cardType" json:"card_type,omitempty"`
Roomid int64 `protobuf:"varint,3,opt,name=roomid" json:"roomid,omitempty"`
}
func (m *DeckRequest) Reset() { *m = DeckRequest{} }
func (m *DeckRequest) String() string { return proto.CompactTextString(m) }
func (*DeckRequest) ProtoMessage() {}
func (*DeckRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *DeckRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *DeckRequest) GetCardType() int32 {
if m != nil {
return m.CardType
}
return 0
}
func (m *DeckRequest) GetRoomid() int64 {
if m != nil {
return m.Roomid
}
return 0
}
// 响应的消息包含发牌序列
type DeckReply struct {
UuidCard string `protobuf:"bytes,1,opt,name=uuid_card,json=uuidCard" json:"uuid_card,omitempty"`
Deck []uint32 `protobuf:"varint,2,rep,packed,name=deck" json:"deck,omitempty"`
// uint32 deck = 1;
UuidInt uint64 `protobuf:"varint,3,opt,name=uuid_int,json=uuidInt" json:"uuid_int,omitempty"`
}
func (m *DeckReply) Reset() { *m = DeckReply{} }
func (m *DeckReply) String() string { return proto.CompactTextString(m) }
func (*DeckReply) ProtoMessage() {}
func (*DeckReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *DeckReply) GetUuidCard() string {
if m != nil {
return m.UuidCard
}
return ""
}
func (m *DeckReply) GetDeck() []uint32 {
if m != nil {
return m.Deck
}
return nil
}
func (m *DeckReply) GetUuidInt() uint64 {
if m != nil {
return m.UuidInt
}
return 0
}
func init() {
proto.RegisterType((*DeckRequest)(nil), "rpc_cf.DeckRequest")
proto.RegisterType((*DeckReply)(nil), "rpc_cf.DeckReply")
}
// 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
// Client API for Deck service
type DeckClient interface {
// 发送一个发牌序列
Deck(ctx context.Context, in *DeckRequest, opts ...grpc.CallOption) (*DeckReply, error)
}
type deckClient struct {
cc *grpc.ClientConn
}
func NewDeckClient(cc *grpc.ClientConn) DeckClient {
return &deckClient{cc}
}
func (c *deckClient) Deck(ctx context.Context, in *DeckRequest, opts ...grpc.CallOption) (*DeckReply, error) {
out := new(DeckReply)
err := grpc.Invoke(ctx, "/rpc_cf.Deck/Deck", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Deck service
type DeckServer interface {
// 发送一个发牌序列
Deck(context.Context, *DeckRequest) (*DeckReply, error)
}
func RegisterDeckServer(s *grpc.Server, srv DeckServer) {
s.RegisterService(&_Deck_serviceDesc, srv)
}
func _Deck_Deck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeckRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeckServer).Deck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/rpc_cf.Deck/Deck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeckServer).Deck(ctx, req.(*DeckRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Deck_serviceDesc = grpc.ServiceDesc{
ServiceName: "rpc_cf.Deck",
HandlerType: (*DeckServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Deck",
Handler: _Deck_Deck_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "deal.proto",
}
func init() { proto.RegisterFile("deal.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 210 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0xbf, 0x4f, 0xc7, 0x20,
0x10, 0xc5, 0xe5, 0xdb, 0x5a, 0xbf, 0x3d, 0xe3, 0x20, 0x26, 0x06, 0x75, 0x21, 0x9d, 0x98, 0x1a,
0xa3, 0x8b, 0xbb, 0x2e, 0xae, 0xc4, 0xe8, 0x48, 0x10, 0xce, 0xa4, 0xe9, 0x0f, 0x10, 0xe9, 0xc0,
0x7f, 0x6f, 0xa0, 0x1d, 0x74, 0xba, 0xf7, 0xde, 0xe5, 0x3e, 0x97, 0x07, 0x60, 0x51, 0x4f, 0xbd,
0x0f, 0x2e, 0x3a, 0xda, 0x04, 0x6f, 0x94,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