Commit d6a818682c30ae75706f9a373a74cbc4dd67ad33
1 parent
c5578efb
protos change to submodule
Showing
12 changed files
with
5 additions
and
1364 deletions
Show diff stats
.gitignore
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +Subproject commit 8c6dec4572d3c2835209d5f44e6ef7d772af48d0 |
protos/account.proto deleted
@@ -1,34 +0,0 @@ | @@ -1,34 +0,0 @@ | ||
1 | -syntax = "proto3"; | ||
2 | -option go_package = "./pb;pb"; | ||
3 | - | ||
4 | -package account; | ||
5 | -import "public.proto"; | ||
6 | - | ||
7 | -message ServiceInfo { | ||
8 | - string id = 1; | ||
9 | - string name = 2; | ||
10 | - string address = 3; | ||
11 | -} | ||
12 | - | ||
13 | -message AccountInfo{ | ||
14 | - string phone = 2; | ||
15 | - string password = 3; | ||
16 | - int64 uid = 4; | ||
17 | - string device = 5; | ||
18 | -} | ||
19 | - | ||
20 | -message CreateTokenRsp { | ||
21 | - string token = 1; | ||
22 | - ServiceInfo game_service = 2; | ||
23 | -} | ||
24 | - | ||
25 | -message Register { | ||
26 | - string phone = 1; | ||
27 | - string password = 2; | ||
28 | - int32 code = 3; | ||
29 | -} | ||
30 | - | ||
31 | -service Account{ | ||
32 | - rpc RegisterHandler(Register) returns (public.PubRsp) {} | ||
33 | - rpc CreateTokenHandler(AccountInfo) returns (CreateTokenRsp) {} | ||
34 | -} | ||
35 | \ No newline at end of file | 0 | \ No newline at end of file |
protos/game.proto deleted
@@ -1,28 +0,0 @@ | @@ -1,28 +0,0 @@ | ||
1 | -syntax = "proto3"; | ||
2 | -option go_package = "./pb;pb"; | ||
3 | - | ||
4 | -package game; | ||
5 | -import "public.proto"; | ||
6 | - | ||
7 | -message Role{ | ||
8 | - string id = 1; | ||
9 | - int32 level = 3; | ||
10 | - int64 login_time = 4; | ||
11 | - string device = 5; | ||
12 | - int64 uid = 6; | ||
13 | -} | ||
14 | - | ||
15 | -message Token { | ||
16 | - string token = 1; | ||
17 | -} | ||
18 | - | ||
19 | -message RoleRsp { | ||
20 | - public.PubRsp rsp = 1; | ||
21 | - Role role = 2; | ||
22 | -} | ||
23 | - | ||
24 | -service Game{ | ||
25 | - rpc HeartBeatHandler(Token) returns (public.PubRsp) {} | ||
26 | - rpc LoginHandler(Token) returns (RoleRsp) {} | ||
27 | - rpc CreateRoleHandler(Token) returns (RoleRsp) {} | ||
28 | -} | ||
29 | \ No newline at end of file | 0 | \ No newline at end of file |
protos/generate.sh deleted
protos/pb/account.pb.go deleted
@@ -1,422 +0,0 @@ | @@ -1,422 +0,0 @@ | ||
1 | -// Code generated by protoc-gen-go. DO NOT EDIT. | ||
2 | -// versions: | ||
3 | -// protoc-gen-go v1.26.0 | ||
4 | -// protoc v3.17.3 | ||
5 | -// source: account.proto | ||
6 | - | ||
7 | -package pb | ||
8 | - | ||
9 | -import ( | ||
10 | - protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||
11 | - protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||
12 | - reflect "reflect" | ||
13 | - sync "sync" | ||
14 | -) | ||
15 | - | ||
16 | -const ( | ||
17 | - // Verify that this generated code is sufficiently up-to-date. | ||
18 | - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) | ||
19 | - // Verify that runtime/protoimpl is sufficiently up-to-date. | ||
20 | - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||
21 | -) | ||
22 | - | ||
23 | -type ServiceInfo struct { | ||
24 | - state protoimpl.MessageState | ||
25 | - sizeCache protoimpl.SizeCache | ||
26 | - unknownFields protoimpl.UnknownFields | ||
27 | - | ||
28 | - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | ||
29 | - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` | ||
30 | - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` | ||
31 | -} | ||
32 | - | ||
33 | -func (x *ServiceInfo) Reset() { | ||
34 | - *x = ServiceInfo{} | ||
35 | - if protoimpl.UnsafeEnabled { | ||
36 | - mi := &file_account_proto_msgTypes[0] | ||
37 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
38 | - ms.StoreMessageInfo(mi) | ||
39 | - } | ||
40 | -} | ||
41 | - | ||
42 | -func (x *ServiceInfo) String() string { | ||
43 | - return protoimpl.X.MessageStringOf(x) | ||
44 | -} | ||
45 | - | ||
46 | -func (*ServiceInfo) ProtoMessage() {} | ||
47 | - | ||
48 | -func (x *ServiceInfo) ProtoReflect() protoreflect.Message { | ||
49 | - mi := &file_account_proto_msgTypes[0] | ||
50 | - if protoimpl.UnsafeEnabled && x != nil { | ||
51 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
52 | - if ms.LoadMessageInfo() == nil { | ||
53 | - ms.StoreMessageInfo(mi) | ||
54 | - } | ||
55 | - return ms | ||
56 | - } | ||
57 | - return mi.MessageOf(x) | ||
58 | -} | ||
59 | - | ||
60 | -// Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead. | ||
61 | -func (*ServiceInfo) Descriptor() ([]byte, []int) { | ||
62 | - return file_account_proto_rawDescGZIP(), []int{0} | ||
63 | -} | ||
64 | - | ||
65 | -func (x *ServiceInfo) GetId() string { | ||
66 | - if x != nil { | ||
67 | - return x.Id | ||
68 | - } | ||
69 | - return "" | ||
70 | -} | ||
71 | - | ||
72 | -func (x *ServiceInfo) GetName() string { | ||
73 | - if x != nil { | ||
74 | - return x.Name | ||
75 | - } | ||
76 | - return "" | ||
77 | -} | ||
78 | - | ||
79 | -func (x *ServiceInfo) GetAddress() string { | ||
80 | - if x != nil { | ||
81 | - return x.Address | ||
82 | - } | ||
83 | - return "" | ||
84 | -} | ||
85 | - | ||
86 | -type AccountInfo struct { | ||
87 | - state protoimpl.MessageState | ||
88 | - sizeCache protoimpl.SizeCache | ||
89 | - unknownFields protoimpl.UnknownFields | ||
90 | - | ||
91 | - Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` | ||
92 | - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` | ||
93 | - Uid int64 `protobuf:"varint,4,opt,name=uid,proto3" json:"uid,omitempty"` | ||
94 | - Device string `protobuf:"bytes,5,opt,name=device,proto3" json:"device,omitempty"` | ||
95 | -} | ||
96 | - | ||
97 | -func (x *AccountInfo) Reset() { | ||
98 | - *x = AccountInfo{} | ||
99 | - if protoimpl.UnsafeEnabled { | ||
100 | - mi := &file_account_proto_msgTypes[1] | ||
101 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
102 | - ms.StoreMessageInfo(mi) | ||
103 | - } | ||
104 | -} | ||
105 | - | ||
106 | -func (x *AccountInfo) String() string { | ||
107 | - return protoimpl.X.MessageStringOf(x) | ||
108 | -} | ||
109 | - | ||
110 | -func (*AccountInfo) ProtoMessage() {} | ||
111 | - | ||
112 | -func (x *AccountInfo) ProtoReflect() protoreflect.Message { | ||
113 | - mi := &file_account_proto_msgTypes[1] | ||
114 | - if protoimpl.UnsafeEnabled && x != nil { | ||
115 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
116 | - if ms.LoadMessageInfo() == nil { | ||
117 | - ms.StoreMessageInfo(mi) | ||
118 | - } | ||
119 | - return ms | ||
120 | - } | ||
121 | - return mi.MessageOf(x) | ||
122 | -} | ||
123 | - | ||
124 | -// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. | ||
125 | -func (*AccountInfo) Descriptor() ([]byte, []int) { | ||
126 | - return file_account_proto_rawDescGZIP(), []int{1} | ||
127 | -} | ||
128 | - | ||
129 | -func (x *AccountInfo) GetPhone() string { | ||
130 | - if x != nil { | ||
131 | - return x.Phone | ||
132 | - } | ||
133 | - return "" | ||
134 | -} | ||
135 | - | ||
136 | -func (x *AccountInfo) GetPassword() string { | ||
137 | - if x != nil { | ||
138 | - return x.Password | ||
139 | - } | ||
140 | - return "" | ||
141 | -} | ||
142 | - | ||
143 | -func (x *AccountInfo) GetUid() int64 { | ||
144 | - if x != nil { | ||
145 | - return x.Uid | ||
146 | - } | ||
147 | - return 0 | ||
148 | -} | ||
149 | - | ||
150 | -func (x *AccountInfo) GetDevice() string { | ||
151 | - if x != nil { | ||
152 | - return x.Device | ||
153 | - } | ||
154 | - return "" | ||
155 | -} | ||
156 | - | ||
157 | -type CreateTokenRsp struct { | ||
158 | - state protoimpl.MessageState | ||
159 | - sizeCache protoimpl.SizeCache | ||
160 | - unknownFields protoimpl.UnknownFields | ||
161 | - | ||
162 | - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` | ||
163 | - GameService *ServiceInfo `protobuf:"bytes,2,opt,name=game_service,json=gameService,proto3" json:"game_service,omitempty"` | ||
164 | -} | ||
165 | - | ||
166 | -func (x *CreateTokenRsp) Reset() { | ||
167 | - *x = CreateTokenRsp{} | ||
168 | - if protoimpl.UnsafeEnabled { | ||
169 | - mi := &file_account_proto_msgTypes[2] | ||
170 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
171 | - ms.StoreMessageInfo(mi) | ||
172 | - } | ||
173 | -} | ||
174 | - | ||
175 | -func (x *CreateTokenRsp) String() string { | ||
176 | - return protoimpl.X.MessageStringOf(x) | ||
177 | -} | ||
178 | - | ||
179 | -func (*CreateTokenRsp) ProtoMessage() {} | ||
180 | - | ||
181 | -func (x *CreateTokenRsp) ProtoReflect() protoreflect.Message { | ||
182 | - mi := &file_account_proto_msgTypes[2] | ||
183 | - if protoimpl.UnsafeEnabled && x != nil { | ||
184 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
185 | - if ms.LoadMessageInfo() == nil { | ||
186 | - ms.StoreMessageInfo(mi) | ||
187 | - } | ||
188 | - return ms | ||
189 | - } | ||
190 | - return mi.MessageOf(x) | ||
191 | -} | ||
192 | - | ||
193 | -// Deprecated: Use CreateTokenRsp.ProtoReflect.Descriptor instead. | ||
194 | -func (*CreateTokenRsp) Descriptor() ([]byte, []int) { | ||
195 | - return file_account_proto_rawDescGZIP(), []int{2} | ||
196 | -} | ||
197 | - | ||
198 | -func (x *CreateTokenRsp) GetToken() string { | ||
199 | - if x != nil { | ||
200 | - return x.Token | ||
201 | - } | ||
202 | - return "" | ||
203 | -} | ||
204 | - | ||
205 | -func (x *CreateTokenRsp) GetGameService() *ServiceInfo { | ||
206 | - if x != nil { | ||
207 | - return x.GameService | ||
208 | - } | ||
209 | - return nil | ||
210 | -} | ||
211 | - | ||
212 | -type Register struct { | ||
213 | - state protoimpl.MessageState | ||
214 | - sizeCache protoimpl.SizeCache | ||
215 | - unknownFields protoimpl.UnknownFields | ||
216 | - | ||
217 | - Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` | ||
218 | - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` | ||
219 | - Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` | ||
220 | -} | ||
221 | - | ||
222 | -func (x *Register) Reset() { | ||
223 | - *x = Register{} | ||
224 | - if protoimpl.UnsafeEnabled { | ||
225 | - mi := &file_account_proto_msgTypes[3] | ||
226 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
227 | - ms.StoreMessageInfo(mi) | ||
228 | - } | ||
229 | -} | ||
230 | - | ||
231 | -func (x *Register) String() string { | ||
232 | - return protoimpl.X.MessageStringOf(x) | ||
233 | -} | ||
234 | - | ||
235 | -func (*Register) ProtoMessage() {} | ||
236 | - | ||
237 | -func (x *Register) ProtoReflect() protoreflect.Message { | ||
238 | - mi := &file_account_proto_msgTypes[3] | ||
239 | - if protoimpl.UnsafeEnabled && x != nil { | ||
240 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
241 | - if ms.LoadMessageInfo() == nil { | ||
242 | - ms.StoreMessageInfo(mi) | ||
243 | - } | ||
244 | - return ms | ||
245 | - } | ||
246 | - return mi.MessageOf(x) | ||
247 | -} | ||
248 | - | ||
249 | -// Deprecated: Use Register.ProtoReflect.Descriptor instead. | ||
250 | -func (*Register) Descriptor() ([]byte, []int) { | ||
251 | - return file_account_proto_rawDescGZIP(), []int{3} | ||
252 | -} | ||
253 | - | ||
254 | -func (x *Register) GetPhone() string { | ||
255 | - if x != nil { | ||
256 | - return x.Phone | ||
257 | - } | ||
258 | - return "" | ||
259 | -} | ||
260 | - | ||
261 | -func (x *Register) GetPassword() string { | ||
262 | - if x != nil { | ||
263 | - return x.Password | ||
264 | - } | ||
265 | - return "" | ||
266 | -} | ||
267 | - | ||
268 | -func (x *Register) GetCode() int32 { | ||
269 | - if x != nil { | ||
270 | - return x.Code | ||
271 | - } | ||
272 | - return 0 | ||
273 | -} | ||
274 | - | ||
275 | -var File_account_proto protoreflect.FileDescriptor | ||
276 | - | ||
277 | -var file_account_proto_rawDesc = []byte{ | ||
278 | - 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, | ||
279 | - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, | ||
280 | - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, | ||
281 | - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, | ||
282 | - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, | ||
283 | - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, | ||
284 | - 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, | ||
285 | - 0x65, 0x73, 0x73, 0x22, 0x69, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, | ||
286 | - 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, | ||
287 | - 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, | ||
288 | - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, | ||
289 | - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, | ||
290 | - 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, | ||
291 | - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x5f, | ||
292 | - 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x73, 0x70, | ||
293 | - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, | ||
294 | - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, | ||
295 | - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, | ||
296 | - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, | ||
297 | - 0x66, 0x6f, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, | ||
298 | - 0x50, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, | ||
299 | - 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, | ||
300 | - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, | ||
301 | - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, | ||
302 | - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, | ||
303 | - 0x65, 0x32, 0x88, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, | ||
304 | - 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, | ||
305 | - 0x12, 0x11, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, | ||
306 | - 0x74, 0x65, 0x72, 0x1a, 0x0e, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x50, 0x75, 0x62, | ||
307 | - 0x52, 0x73, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, | ||
308 | - 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x61, 0x63, | ||
309 | - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, | ||
310 | - 0x6f, 0x1a, 0x17, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, | ||
311 | - 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x73, 0x70, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, | ||
312 | - 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||
313 | -} | ||
314 | - | ||
315 | -var ( | ||
316 | - file_account_proto_rawDescOnce sync.Once | ||
317 | - file_account_proto_rawDescData = file_account_proto_rawDesc | ||
318 | -) | ||
319 | - | ||
320 | -func file_account_proto_rawDescGZIP() []byte { | ||
321 | - file_account_proto_rawDescOnce.Do(func() { | ||
322 | - file_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_account_proto_rawDescData) | ||
323 | - }) | ||
324 | - return file_account_proto_rawDescData | ||
325 | -} | ||
326 | - | ||
327 | -var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 4) | ||
328 | -var file_account_proto_goTypes = []interface{}{ | ||
329 | - (*ServiceInfo)(nil), // 0: account.ServiceInfo | ||
330 | - (*AccountInfo)(nil), // 1: account.AccountInfo | ||
331 | - (*CreateTokenRsp)(nil), // 2: account.CreateTokenRsp | ||
332 | - (*Register)(nil), // 3: account.Register | ||
333 | - (*PubRsp)(nil), // 4: public.PubRsp | ||
334 | -} | ||
335 | -var file_account_proto_depIdxs = []int32{ | ||
336 | - 0, // 0: account.CreateTokenRsp.game_service:type_name -> account.ServiceInfo | ||
337 | - 3, // 1: account.Account.RegisterHandler:input_type -> account.Register | ||
338 | - 1, // 2: account.Account.CreateTokenHandler:input_type -> account.AccountInfo | ||
339 | - 4, // 3: account.Account.RegisterHandler:output_type -> public.PubRsp | ||
340 | - 2, // 4: account.Account.CreateTokenHandler:output_type -> account.CreateTokenRsp | ||
341 | - 3, // [3:5] is the sub-list for method output_type | ||
342 | - 1, // [1:3] is the sub-list for method input_type | ||
343 | - 1, // [1:1] is the sub-list for extension type_name | ||
344 | - 1, // [1:1] is the sub-list for extension extendee | ||
345 | - 0, // [0:1] is the sub-list for field type_name | ||
346 | -} | ||
347 | - | ||
348 | -func init() { file_account_proto_init() } | ||
349 | -func file_account_proto_init() { | ||
350 | - if File_account_proto != nil { | ||
351 | - return | ||
352 | - } | ||
353 | - file_public_proto_init() | ||
354 | - if !protoimpl.UnsafeEnabled { | ||
355 | - file_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { | ||
356 | - switch v := v.(*ServiceInfo); i { | ||
357 | - case 0: | ||
358 | - return &v.state | ||
359 | - case 1: | ||
360 | - return &v.sizeCache | ||
361 | - case 2: | ||
362 | - return &v.unknownFields | ||
363 | - default: | ||
364 | - return nil | ||
365 | - } | ||
366 | - } | ||
367 | - file_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { | ||
368 | - switch v := v.(*AccountInfo); i { | ||
369 | - case 0: | ||
370 | - return &v.state | ||
371 | - case 1: | ||
372 | - return &v.sizeCache | ||
373 | - case 2: | ||
374 | - return &v.unknownFields | ||
375 | - default: | ||
376 | - return nil | ||
377 | - } | ||
378 | - } | ||
379 | - file_account_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { | ||
380 | - switch v := v.(*CreateTokenRsp); i { | ||
381 | - case 0: | ||
382 | - return &v.state | ||
383 | - case 1: | ||
384 | - return &v.sizeCache | ||
385 | - case 2: | ||
386 | - return &v.unknownFields | ||
387 | - default: | ||
388 | - return nil | ||
389 | - } | ||
390 | - } | ||
391 | - file_account_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { | ||
392 | - switch v := v.(*Register); i { | ||
393 | - case 0: | ||
394 | - return &v.state | ||
395 | - case 1: | ||
396 | - return &v.sizeCache | ||
397 | - case 2: | ||
398 | - return &v.unknownFields | ||
399 | - default: | ||
400 | - return nil | ||
401 | - } | ||
402 | - } | ||
403 | - } | ||
404 | - type x struct{} | ||
405 | - out := protoimpl.TypeBuilder{ | ||
406 | - File: protoimpl.DescBuilder{ | ||
407 | - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||
408 | - RawDescriptor: file_account_proto_rawDesc, | ||
409 | - NumEnums: 0, | ||
410 | - NumMessages: 4, | ||
411 | - NumExtensions: 0, | ||
412 | - NumServices: 1, | ||
413 | - }, | ||
414 | - GoTypes: file_account_proto_goTypes, | ||
415 | - DependencyIndexes: file_account_proto_depIdxs, | ||
416 | - MessageInfos: file_account_proto_msgTypes, | ||
417 | - }.Build() | ||
418 | - File_account_proto = out.File | ||
419 | - file_account_proto_rawDesc = nil | ||
420 | - file_account_proto_goTypes = nil | ||
421 | - file_account_proto_depIdxs = nil | ||
422 | -} |
protos/pb/account_grpc.pb.go deleted
@@ -1,141 +0,0 @@ | @@ -1,141 +0,0 @@ | ||
1 | -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. | ||
2 | -// versions: | ||
3 | -// - protoc-gen-go-grpc v1.2.0 | ||
4 | -// - protoc v3.17.3 | ||
5 | -// source: account.proto | ||
6 | - | ||
7 | -package pb | ||
8 | - | ||
9 | -import ( | ||
10 | - context "context" | ||
11 | - grpc "google.golang.org/grpc" | ||
12 | - codes "google.golang.org/grpc/codes" | ||
13 | - status "google.golang.org/grpc/status" | ||
14 | -) | ||
15 | - | ||
16 | -// This is a compile-time assertion to ensure that this generated file | ||
17 | -// is compatible with the grpc package it is being compiled against. | ||
18 | -// Requires gRPC-Go v1.32.0 or later. | ||
19 | -const _ = grpc.SupportPackageIsVersion7 | ||
20 | - | ||
21 | -// AccountClient is the client API for Account service. | ||
22 | -// | ||
23 | -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. | ||
24 | -type AccountClient interface { | ||
25 | - RegisterHandler(ctx context.Context, in *Register, opts ...grpc.CallOption) (*PubRsp, error) | ||
26 | - CreateTokenHandler(ctx context.Context, in *AccountInfo, opts ...grpc.CallOption) (*CreateTokenRsp, error) | ||
27 | -} | ||
28 | - | ||
29 | -type accountClient struct { | ||
30 | - cc grpc.ClientConnInterface | ||
31 | -} | ||
32 | - | ||
33 | -func NewAccountClient(cc grpc.ClientConnInterface) AccountClient { | ||
34 | - return &accountClient{cc} | ||
35 | -} | ||
36 | - | ||
37 | -func (c *accountClient) RegisterHandler(ctx context.Context, in *Register, opts ...grpc.CallOption) (*PubRsp, error) { | ||
38 | - out := new(PubRsp) | ||
39 | - err := c.cc.Invoke(ctx, "/account.Account/RegisterHandler", in, out, opts...) | ||
40 | - if err != nil { | ||
41 | - return nil, err | ||
42 | - } | ||
43 | - return out, nil | ||
44 | -} | ||
45 | - | ||
46 | -func (c *accountClient) CreateTokenHandler(ctx context.Context, in *AccountInfo, opts ...grpc.CallOption) (*CreateTokenRsp, error) { | ||
47 | - out := new(CreateTokenRsp) | ||
48 | - err := c.cc.Invoke(ctx, "/account.Account/CreateTokenHandler", in, out, opts...) | ||
49 | - if err != nil { | ||
50 | - return nil, err | ||
51 | - } | ||
52 | - return out, nil | ||
53 | -} | ||
54 | - | ||
55 | -// AccountServer is the server API for Account service. | ||
56 | -// All implementations must embed UnimplementedAccountServer | ||
57 | -// for forward compatibility | ||
58 | -type AccountServer interface { | ||
59 | - RegisterHandler(context.Context, *Register) (*PubRsp, error) | ||
60 | - CreateTokenHandler(context.Context, *AccountInfo) (*CreateTokenRsp, error) | ||
61 | - mustEmbedUnimplementedAccountServer() | ||
62 | -} | ||
63 | - | ||
64 | -// UnimplementedAccountServer must be embedded to have forward compatible implementations. | ||
65 | -type UnimplementedAccountServer struct { | ||
66 | -} | ||
67 | - | ||
68 | -func (UnimplementedAccountServer) RegisterHandler(context.Context, *Register) (*PubRsp, error) { | ||
69 | - return nil, status.Errorf(codes.Unimplemented, "method RegisterHandler not implemented") | ||
70 | -} | ||
71 | -func (UnimplementedAccountServer) CreateTokenHandler(context.Context, *AccountInfo) (*CreateTokenRsp, error) { | ||
72 | - return nil, status.Errorf(codes.Unimplemented, "method CreateTokenHandler not implemented") | ||
73 | -} | ||
74 | -func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {} | ||
75 | - | ||
76 | -// UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. | ||
77 | -// Use of this interface is not recommended, as added methods to AccountServer will | ||
78 | -// result in compilation errors. | ||
79 | -type UnsafeAccountServer interface { | ||
80 | - mustEmbedUnimplementedAccountServer() | ||
81 | -} | ||
82 | - | ||
83 | -func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) { | ||
84 | - s.RegisterService(&Account_ServiceDesc, srv) | ||
85 | -} | ||
86 | - | ||
87 | -func _Account_RegisterHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | ||
88 | - in := new(Register) | ||
89 | - if err := dec(in); err != nil { | ||
90 | - return nil, err | ||
91 | - } | ||
92 | - if interceptor == nil { | ||
93 | - return srv.(AccountServer).RegisterHandler(ctx, in) | ||
94 | - } | ||
95 | - info := &grpc.UnaryServerInfo{ | ||
96 | - Server: srv, | ||
97 | - FullMethod: "/account.Account/RegisterHandler", | ||
98 | - } | ||
99 | - handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||
100 | - return srv.(AccountServer).RegisterHandler(ctx, req.(*Register)) | ||
101 | - } | ||
102 | - return interceptor(ctx, in, info, handler) | ||
103 | -} | ||
104 | - | ||
105 | -func _Account_CreateTokenHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | ||
106 | - in := new(AccountInfo) | ||
107 | - if err := dec(in); err != nil { | ||
108 | - return nil, err | ||
109 | - } | ||
110 | - if interceptor == nil { | ||
111 | - return srv.(AccountServer).CreateTokenHandler(ctx, in) | ||
112 | - } | ||
113 | - info := &grpc.UnaryServerInfo{ | ||
114 | - Server: srv, | ||
115 | - FullMethod: "/account.Account/CreateTokenHandler", | ||
116 | - } | ||
117 | - handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||
118 | - return srv.(AccountServer).CreateTokenHandler(ctx, req.(*AccountInfo)) | ||
119 | - } | ||
120 | - return interceptor(ctx, in, info, handler) | ||
121 | -} | ||
122 | - | ||
123 | -// Account_ServiceDesc is the grpc.ServiceDesc for Account service. | ||
124 | -// It's only intended for direct use with grpc.RegisterService, | ||
125 | -// and not to be introspected or modified (even as a copy) | ||
126 | -var Account_ServiceDesc = grpc.ServiceDesc{ | ||
127 | - ServiceName: "account.Account", | ||
128 | - HandlerType: (*AccountServer)(nil), | ||
129 | - Methods: []grpc.MethodDesc{ | ||
130 | - { | ||
131 | - MethodName: "RegisterHandler", | ||
132 | - Handler: _Account_RegisterHandler_Handler, | ||
133 | - }, | ||
134 | - { | ||
135 | - MethodName: "CreateTokenHandler", | ||
136 | - Handler: _Account_CreateTokenHandler_Handler, | ||
137 | - }, | ||
138 | - }, | ||
139 | - Streams: []grpc.StreamDesc{}, | ||
140 | - Metadata: "account.proto", | ||
141 | -} |
protos/pb/game.pb.go deleted
@@ -1,334 +0,0 @@ | @@ -1,334 +0,0 @@ | ||
1 | -// Code generated by protoc-gen-go. DO NOT EDIT. | ||
2 | -// versions: | ||
3 | -// protoc-gen-go v1.26.0 | ||
4 | -// protoc v3.17.3 | ||
5 | -// source: game.proto | ||
6 | - | ||
7 | -package pb | ||
8 | - | ||
9 | -import ( | ||
10 | - protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||
11 | - protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||
12 | - reflect "reflect" | ||
13 | - sync "sync" | ||
14 | -) | ||
15 | - | ||
16 | -const ( | ||
17 | - // Verify that this generated code is sufficiently up-to-date. | ||
18 | - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) | ||
19 | - // Verify that runtime/protoimpl is sufficiently up-to-date. | ||
20 | - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||
21 | -) | ||
22 | - | ||
23 | -type Role struct { | ||
24 | - state protoimpl.MessageState | ||
25 | - sizeCache protoimpl.SizeCache | ||
26 | - unknownFields protoimpl.UnknownFields | ||
27 | - | ||
28 | - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | ||
29 | - Level int32 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` | ||
30 | - LoginTime int64 `protobuf:"varint,4,opt,name=login_time,json=loginTime,proto3" json:"login_time,omitempty"` | ||
31 | - Device string `protobuf:"bytes,5,opt,name=device,proto3" json:"device,omitempty"` | ||
32 | - Uid int64 `protobuf:"varint,6,opt,name=uid,proto3" json:"uid,omitempty"` | ||
33 | -} | ||
34 | - | ||
35 | -func (x *Role) Reset() { | ||
36 | - *x = Role{} | ||
37 | - if protoimpl.UnsafeEnabled { | ||
38 | - mi := &file_game_proto_msgTypes[0] | ||
39 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
40 | - ms.StoreMessageInfo(mi) | ||
41 | - } | ||
42 | -} | ||
43 | - | ||
44 | -func (x *Role) String() string { | ||
45 | - return protoimpl.X.MessageStringOf(x) | ||
46 | -} | ||
47 | - | ||
48 | -func (*Role) ProtoMessage() {} | ||
49 | - | ||
50 | -func (x *Role) ProtoReflect() protoreflect.Message { | ||
51 | - mi := &file_game_proto_msgTypes[0] | ||
52 | - if protoimpl.UnsafeEnabled && x != nil { | ||
53 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
54 | - if ms.LoadMessageInfo() == nil { | ||
55 | - ms.StoreMessageInfo(mi) | ||
56 | - } | ||
57 | - return ms | ||
58 | - } | ||
59 | - return mi.MessageOf(x) | ||
60 | -} | ||
61 | - | ||
62 | -// Deprecated: Use Role.ProtoReflect.Descriptor instead. | ||
63 | -func (*Role) Descriptor() ([]byte, []int) { | ||
64 | - return file_game_proto_rawDescGZIP(), []int{0} | ||
65 | -} | ||
66 | - | ||
67 | -func (x *Role) GetId() string { | ||
68 | - if x != nil { | ||
69 | - return x.Id | ||
70 | - } | ||
71 | - return "" | ||
72 | -} | ||
73 | - | ||
74 | -func (x *Role) GetLevel() int32 { | ||
75 | - if x != nil { | ||
76 | - return x.Level | ||
77 | - } | ||
78 | - return 0 | ||
79 | -} | ||
80 | - | ||
81 | -func (x *Role) GetLoginTime() int64 { | ||
82 | - if x != nil { | ||
83 | - return x.LoginTime | ||
84 | - } | ||
85 | - return 0 | ||
86 | -} | ||
87 | - | ||
88 | -func (x *Role) GetDevice() string { | ||
89 | - if x != nil { | ||
90 | - return x.Device | ||
91 | - } | ||
92 | - return "" | ||
93 | -} | ||
94 | - | ||
95 | -func (x *Role) GetUid() int64 { | ||
96 | - if x != nil { | ||
97 | - return x.Uid | ||
98 | - } | ||
99 | - return 0 | ||
100 | -} | ||
101 | - | ||
102 | -type Token struct { | ||
103 | - state protoimpl.MessageState | ||
104 | - sizeCache protoimpl.SizeCache | ||
105 | - unknownFields protoimpl.UnknownFields | ||
106 | - | ||
107 | - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` | ||
108 | -} | ||
109 | - | ||
110 | -func (x *Token) Reset() { | ||
111 | - *x = Token{} | ||
112 | - if protoimpl.UnsafeEnabled { | ||
113 | - mi := &file_game_proto_msgTypes[1] | ||
114 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
115 | - ms.StoreMessageInfo(mi) | ||
116 | - } | ||
117 | -} | ||
118 | - | ||
119 | -func (x *Token) String() string { | ||
120 | - return protoimpl.X.MessageStringOf(x) | ||
121 | -} | ||
122 | - | ||
123 | -func (*Token) ProtoMessage() {} | ||
124 | - | ||
125 | -func (x *Token) ProtoReflect() protoreflect.Message { | ||
126 | - mi := &file_game_proto_msgTypes[1] | ||
127 | - if protoimpl.UnsafeEnabled && x != nil { | ||
128 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
129 | - if ms.LoadMessageInfo() == nil { | ||
130 | - ms.StoreMessageInfo(mi) | ||
131 | - } | ||
132 | - return ms | ||
133 | - } | ||
134 | - return mi.MessageOf(x) | ||
135 | -} | ||
136 | - | ||
137 | -// Deprecated: Use Token.ProtoReflect.Descriptor instead. | ||
138 | -func (*Token) Descriptor() ([]byte, []int) { | ||
139 | - return file_game_proto_rawDescGZIP(), []int{1} | ||
140 | -} | ||
141 | - | ||
142 | -func (x *Token) GetToken() string { | ||
143 | - if x != nil { | ||
144 | - return x.Token | ||
145 | - } | ||
146 | - return "" | ||
147 | -} | ||
148 | - | ||
149 | -type RoleRsp struct { | ||
150 | - state protoimpl.MessageState | ||
151 | - sizeCache protoimpl.SizeCache | ||
152 | - unknownFields protoimpl.UnknownFields | ||
153 | - | ||
154 | - Rsp *PubRsp `protobuf:"bytes,1,opt,name=rsp,proto3" json:"rsp,omitempty"` | ||
155 | - Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` | ||
156 | -} | ||
157 | - | ||
158 | -func (x *RoleRsp) Reset() { | ||
159 | - *x = RoleRsp{} | ||
160 | - if protoimpl.UnsafeEnabled { | ||
161 | - mi := &file_game_proto_msgTypes[2] | ||
162 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
163 | - ms.StoreMessageInfo(mi) | ||
164 | - } | ||
165 | -} | ||
166 | - | ||
167 | -func (x *RoleRsp) String() string { | ||
168 | - return protoimpl.X.MessageStringOf(x) | ||
169 | -} | ||
170 | - | ||
171 | -func (*RoleRsp) ProtoMessage() {} | ||
172 | - | ||
173 | -func (x *RoleRsp) ProtoReflect() protoreflect.Message { | ||
174 | - mi := &file_game_proto_msgTypes[2] | ||
175 | - if protoimpl.UnsafeEnabled && x != nil { | ||
176 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
177 | - if ms.LoadMessageInfo() == nil { | ||
178 | - ms.StoreMessageInfo(mi) | ||
179 | - } | ||
180 | - return ms | ||
181 | - } | ||
182 | - return mi.MessageOf(x) | ||
183 | -} | ||
184 | - | ||
185 | -// Deprecated: Use RoleRsp.ProtoReflect.Descriptor instead. | ||
186 | -func (*RoleRsp) Descriptor() ([]byte, []int) { | ||
187 | - return file_game_proto_rawDescGZIP(), []int{2} | ||
188 | -} | ||
189 | - | ||
190 | -func (x *RoleRsp) GetRsp() *PubRsp { | ||
191 | - if x != nil { | ||
192 | - return x.Rsp | ||
193 | - } | ||
194 | - return nil | ||
195 | -} | ||
196 | - | ||
197 | -func (x *RoleRsp) GetRole() *Role { | ||
198 | - if x != nil { | ||
199 | - return x.Role | ||
200 | - } | ||
201 | - return nil | ||
202 | -} | ||
203 | - | ||
204 | -var File_game_proto protoreflect.FileDescriptor | ||
205 | - | ||
206 | -var file_game_proto_rawDesc = []byte{ | ||
207 | - 0x0a, 0x0a, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x61, | ||
208 | - 0x6d, 0x65, 0x1a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | ||
209 | - 0x22, 0x75, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, | ||
210 | - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, | ||
211 | - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, | ||
212 | - 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, | ||
213 | - 0x28, 0x03, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, | ||
214 | - 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, | ||
215 | - 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, | ||
216 | - 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, | ||
217 | - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, | ||
218 | - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4b, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, | ||
219 | - 0x70, 0x12, 0x20, 0x0a, 0x03, 0x72, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, | ||
220 | - 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x50, 0x75, 0x62, 0x52, 0x73, 0x70, 0x52, 0x03, | ||
221 | - 0x72, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, | ||
222 | - 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, | ||
223 | - 0x6f, 0x6c, 0x65, 0x32, 0x9a, 0x01, 0x0a, 0x04, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x10, | ||
224 | - 0x48, 0x65, 0x61, 0x72, 0x74, 0x42, 0x65, 0x61, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, | ||
225 | - 0x12, 0x0b, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x0e, 0x2e, | ||
226 | - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x50, 0x75, 0x62, 0x52, 0x73, 0x70, 0x22, 0x00, 0x12, | ||
227 | - 0x2c, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, | ||
228 | - 0x0b, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x0d, 0x2e, 0x67, | ||
229 | - 0x61, 0x6d, 0x65, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x22, 0x00, 0x12, 0x31, 0x0a, | ||
230 | - 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, | ||
231 | - 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, | ||
232 | - 0x0d, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x22, 0x00, | ||
233 | - 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, | ||
234 | - 0x74, 0x6f, 0x33, | ||
235 | -} | ||
236 | - | ||
237 | -var ( | ||
238 | - file_game_proto_rawDescOnce sync.Once | ||
239 | - file_game_proto_rawDescData = file_game_proto_rawDesc | ||
240 | -) | ||
241 | - | ||
242 | -func file_game_proto_rawDescGZIP() []byte { | ||
243 | - file_game_proto_rawDescOnce.Do(func() { | ||
244 | - file_game_proto_rawDescData = protoimpl.X.CompressGZIP(file_game_proto_rawDescData) | ||
245 | - }) | ||
246 | - return file_game_proto_rawDescData | ||
247 | -} | ||
248 | - | ||
249 | -var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 3) | ||
250 | -var file_game_proto_goTypes = []interface{}{ | ||
251 | - (*Role)(nil), // 0: game.Role | ||
252 | - (*Token)(nil), // 1: game.Token | ||
253 | - (*RoleRsp)(nil), // 2: game.RoleRsp | ||
254 | - (*PubRsp)(nil), // 3: public.PubRsp | ||
255 | -} | ||
256 | -var file_game_proto_depIdxs = []int32{ | ||
257 | - 3, // 0: game.RoleRsp.rsp:type_name -> public.PubRsp | ||
258 | - 0, // 1: game.RoleRsp.role:type_name -> game.Role | ||
259 | - 1, // 2: game.Game.HeartBeatHandler:input_type -> game.Token | ||
260 | - 1, // 3: game.Game.LoginHandler:input_type -> game.Token | ||
261 | - 1, // 4: game.Game.CreateRoleHandler:input_type -> game.Token | ||
262 | - 3, // 5: game.Game.HeartBeatHandler:output_type -> public.PubRsp | ||
263 | - 2, // 6: game.Game.LoginHandler:output_type -> game.RoleRsp | ||
264 | - 2, // 7: game.Game.CreateRoleHandler:output_type -> game.RoleRsp | ||
265 | - 5, // [5:8] is the sub-list for method output_type | ||
266 | - 2, // [2:5] is the sub-list for method input_type | ||
267 | - 2, // [2:2] is the sub-list for extension type_name | ||
268 | - 2, // [2:2] is the sub-list for extension extendee | ||
269 | - 0, // [0:2] is the sub-list for field type_name | ||
270 | -} | ||
271 | - | ||
272 | -func init() { file_game_proto_init() } | ||
273 | -func file_game_proto_init() { | ||
274 | - if File_game_proto != nil { | ||
275 | - return | ||
276 | - } | ||
277 | - file_public_proto_init() | ||
278 | - if !protoimpl.UnsafeEnabled { | ||
279 | - file_game_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { | ||
280 | - switch v := v.(*Role); i { | ||
281 | - case 0: | ||
282 | - return &v.state | ||
283 | - case 1: | ||
284 | - return &v.sizeCache | ||
285 | - case 2: | ||
286 | - return &v.unknownFields | ||
287 | - default: | ||
288 | - return nil | ||
289 | - } | ||
290 | - } | ||
291 | - file_game_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { | ||
292 | - switch v := v.(*Token); i { | ||
293 | - case 0: | ||
294 | - return &v.state | ||
295 | - case 1: | ||
296 | - return &v.sizeCache | ||
297 | - case 2: | ||
298 | - return &v.unknownFields | ||
299 | - default: | ||
300 | - return nil | ||
301 | - } | ||
302 | - } | ||
303 | - file_game_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { | ||
304 | - switch v := v.(*RoleRsp); i { | ||
305 | - case 0: | ||
306 | - return &v.state | ||
307 | - case 1: | ||
308 | - return &v.sizeCache | ||
309 | - case 2: | ||
310 | - return &v.unknownFields | ||
311 | - default: | ||
312 | - return nil | ||
313 | - } | ||
314 | - } | ||
315 | - } | ||
316 | - type x struct{} | ||
317 | - out := protoimpl.TypeBuilder{ | ||
318 | - File: protoimpl.DescBuilder{ | ||
319 | - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||
320 | - RawDescriptor: file_game_proto_rawDesc, | ||
321 | - NumEnums: 0, | ||
322 | - NumMessages: 3, | ||
323 | - NumExtensions: 0, | ||
324 | - NumServices: 1, | ||
325 | - }, | ||
326 | - GoTypes: file_game_proto_goTypes, | ||
327 | - DependencyIndexes: file_game_proto_depIdxs, | ||
328 | - MessageInfos: file_game_proto_msgTypes, | ||
329 | - }.Build() | ||
330 | - File_game_proto = out.File | ||
331 | - file_game_proto_rawDesc = nil | ||
332 | - file_game_proto_goTypes = nil | ||
333 | - file_game_proto_depIdxs = nil | ||
334 | -} |
protos/pb/game_grpc.pb.go deleted
@@ -1,177 +0,0 @@ | @@ -1,177 +0,0 @@ | ||
1 | -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. | ||
2 | -// versions: | ||
3 | -// - protoc-gen-go-grpc v1.2.0 | ||
4 | -// - protoc v3.17.3 | ||
5 | -// source: game.proto | ||
6 | - | ||
7 | -package pb | ||
8 | - | ||
9 | -import ( | ||
10 | - context "context" | ||
11 | - grpc "google.golang.org/grpc" | ||
12 | - codes "google.golang.org/grpc/codes" | ||
13 | - status "google.golang.org/grpc/status" | ||
14 | -) | ||
15 | - | ||
16 | -// This is a compile-time assertion to ensure that this generated file | ||
17 | -// is compatible with the grpc package it is being compiled against. | ||
18 | -// Requires gRPC-Go v1.32.0 or later. | ||
19 | -const _ = grpc.SupportPackageIsVersion7 | ||
20 | - | ||
21 | -// GameClient is the client API for Game service. | ||
22 | -// | ||
23 | -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. | ||
24 | -type GameClient interface { | ||
25 | - HeartBeatHandler(ctx context.Context, in *Token, opts ...grpc.CallOption) (*PubRsp, error) | ||
26 | - LoginHandler(ctx context.Context, in *Token, opts ...grpc.CallOption) (*RoleRsp, error) | ||
27 | - CreateRoleHandler(ctx context.Context, in *Token, opts ...grpc.CallOption) (*RoleRsp, error) | ||
28 | -} | ||
29 | - | ||
30 | -type gameClient struct { | ||
31 | - cc grpc.ClientConnInterface | ||
32 | -} | ||
33 | - | ||
34 | -func NewGameClient(cc grpc.ClientConnInterface) GameClient { | ||
35 | - return &gameClient{cc} | ||
36 | -} | ||
37 | - | ||
38 | -func (c *gameClient) HeartBeatHandler(ctx context.Context, in *Token, opts ...grpc.CallOption) (*PubRsp, error) { | ||
39 | - out := new(PubRsp) | ||
40 | - err := c.cc.Invoke(ctx, "/game.Game/HeartBeatHandler", in, out, opts...) | ||
41 | - if err != nil { | ||
42 | - return nil, err | ||
43 | - } | ||
44 | - return out, nil | ||
45 | -} | ||
46 | - | ||
47 | -func (c *gameClient) LoginHandler(ctx context.Context, in *Token, opts ...grpc.CallOption) (*RoleRsp, error) { | ||
48 | - out := new(RoleRsp) | ||
49 | - err := c.cc.Invoke(ctx, "/game.Game/LoginHandler", in, out, opts...) | ||
50 | - if err != nil { | ||
51 | - return nil, err | ||
52 | - } | ||
53 | - return out, nil | ||
54 | -} | ||
55 | - | ||
56 | -func (c *gameClient) CreateRoleHandler(ctx context.Context, in *Token, opts ...grpc.CallOption) (*RoleRsp, error) { | ||
57 | - out := new(RoleRsp) | ||
58 | - err := c.cc.Invoke(ctx, "/game.Game/CreateRoleHandler", in, out, opts...) | ||
59 | - if err != nil { | ||
60 | - return nil, err | ||
61 | - } | ||
62 | - return out, nil | ||
63 | -} | ||
64 | - | ||
65 | -// GameServer is the server API for Game service. | ||
66 | -// All implementations must embed UnimplementedGameServer | ||
67 | -// for forward compatibility | ||
68 | -type GameServer interface { | ||
69 | - HeartBeatHandler(context.Context, *Token) (*PubRsp, error) | ||
70 | - LoginHandler(context.Context, *Token) (*RoleRsp, error) | ||
71 | - CreateRoleHandler(context.Context, *Token) (*RoleRsp, error) | ||
72 | - mustEmbedUnimplementedGameServer() | ||
73 | -} | ||
74 | - | ||
75 | -// UnimplementedGameServer must be embedded to have forward compatible implementations. | ||
76 | -type UnimplementedGameServer struct { | ||
77 | -} | ||
78 | - | ||
79 | -func (UnimplementedGameServer) HeartBeatHandler(context.Context, *Token) (*PubRsp, error) { | ||
80 | - return nil, status.Errorf(codes.Unimplemented, "method HeartBeatHandler not implemented") | ||
81 | -} | ||
82 | -func (UnimplementedGameServer) LoginHandler(context.Context, *Token) (*RoleRsp, error) { | ||
83 | - return nil, status.Errorf(codes.Unimplemented, "method LoginHandler not implemented") | ||
84 | -} | ||
85 | -func (UnimplementedGameServer) CreateRoleHandler(context.Context, *Token) (*RoleRsp, error) { | ||
86 | - return nil, status.Errorf(codes.Unimplemented, "method CreateRoleHandler not implemented") | ||
87 | -} | ||
88 | -func (UnimplementedGameServer) mustEmbedUnimplementedGameServer() {} | ||
89 | - | ||
90 | -// UnsafeGameServer may be embedded to opt out of forward compatibility for this service. | ||
91 | -// Use of this interface is not recommended, as added methods to GameServer will | ||
92 | -// result in compilation errors. | ||
93 | -type UnsafeGameServer interface { | ||
94 | - mustEmbedUnimplementedGameServer() | ||
95 | -} | ||
96 | - | ||
97 | -func RegisterGameServer(s grpc.ServiceRegistrar, srv GameServer) { | ||
98 | - s.RegisterService(&Game_ServiceDesc, srv) | ||
99 | -} | ||
100 | - | ||
101 | -func _Game_HeartBeatHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | ||
102 | - in := new(Token) | ||
103 | - if err := dec(in); err != nil { | ||
104 | - return nil, err | ||
105 | - } | ||
106 | - if interceptor == nil { | ||
107 | - return srv.(GameServer).HeartBeatHandler(ctx, in) | ||
108 | - } | ||
109 | - info := &grpc.UnaryServerInfo{ | ||
110 | - Server: srv, | ||
111 | - FullMethod: "/game.Game/HeartBeatHandler", | ||
112 | - } | ||
113 | - handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||
114 | - return srv.(GameServer).HeartBeatHandler(ctx, req.(*Token)) | ||
115 | - } | ||
116 | - return interceptor(ctx, in, info, handler) | ||
117 | -} | ||
118 | - | ||
119 | -func _Game_LoginHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | ||
120 | - in := new(Token) | ||
121 | - if err := dec(in); err != nil { | ||
122 | - return nil, err | ||
123 | - } | ||
124 | - if interceptor == nil { | ||
125 | - return srv.(GameServer).LoginHandler(ctx, in) | ||
126 | - } | ||
127 | - info := &grpc.UnaryServerInfo{ | ||
128 | - Server: srv, | ||
129 | - FullMethod: "/game.Game/LoginHandler", | ||
130 | - } | ||
131 | - handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||
132 | - return srv.(GameServer).LoginHandler(ctx, req.(*Token)) | ||
133 | - } | ||
134 | - return interceptor(ctx, in, info, handler) | ||
135 | -} | ||
136 | - | ||
137 | -func _Game_CreateRoleHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | ||
138 | - in := new(Token) | ||
139 | - if err := dec(in); err != nil { | ||
140 | - return nil, err | ||
141 | - } | ||
142 | - if interceptor == nil { | ||
143 | - return srv.(GameServer).CreateRoleHandler(ctx, in) | ||
144 | - } | ||
145 | - info := &grpc.UnaryServerInfo{ | ||
146 | - Server: srv, | ||
147 | - FullMethod: "/game.Game/CreateRoleHandler", | ||
148 | - } | ||
149 | - handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||
150 | - return srv.(GameServer).CreateRoleHandler(ctx, req.(*Token)) | ||
151 | - } | ||
152 | - return interceptor(ctx, in, info, handler) | ||
153 | -} | ||
154 | - | ||
155 | -// Game_ServiceDesc is the grpc.ServiceDesc for Game service. | ||
156 | -// It's only intended for direct use with grpc.RegisterService, | ||
157 | -// and not to be introspected or modified (even as a copy) | ||
158 | -var Game_ServiceDesc = grpc.ServiceDesc{ | ||
159 | - ServiceName: "game.Game", | ||
160 | - HandlerType: (*GameServer)(nil), | ||
161 | - Methods: []grpc.MethodDesc{ | ||
162 | - { | ||
163 | - MethodName: "HeartBeatHandler", | ||
164 | - Handler: _Game_HeartBeatHandler_Handler, | ||
165 | - }, | ||
166 | - { | ||
167 | - MethodName: "LoginHandler", | ||
168 | - Handler: _Game_LoginHandler_Handler, | ||
169 | - }, | ||
170 | - { | ||
171 | - MethodName: "CreateRoleHandler", | ||
172 | - Handler: _Game_CreateRoleHandler_Handler, | ||
173 | - }, | ||
174 | - }, | ||
175 | - Streams: []grpc.StreamDesc{}, | ||
176 | - Metadata: "game.proto", | ||
177 | -} |
protos/pb/public.pb.go deleted
@@ -1,212 +0,0 @@ | @@ -1,212 +0,0 @@ | ||
1 | -// Code generated by protoc-gen-go. DO NOT EDIT. | ||
2 | -// versions: | ||
3 | -// protoc-gen-go v1.26.0 | ||
4 | -// protoc v3.17.3 | ||
5 | -// source: public.proto | ||
6 | - | ||
7 | -package pb | ||
8 | - | ||
9 | -import ( | ||
10 | - protoreflect "google.golang.org/protobuf/reflect/protoreflect" | ||
11 | - protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||
12 | - reflect "reflect" | ||
13 | - sync "sync" | ||
14 | -) | ||
15 | - | ||
16 | -const ( | ||
17 | - // Verify that this generated code is sufficiently up-to-date. | ||
18 | - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) | ||
19 | - // Verify that runtime/protoimpl is sufficiently up-to-date. | ||
20 | - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||
21 | -) | ||
22 | - | ||
23 | -type PubRsp struct { | ||
24 | - state protoimpl.MessageState | ||
25 | - sizeCache protoimpl.SizeCache | ||
26 | - unknownFields protoimpl.UnknownFields | ||
27 | - | ||
28 | - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` | ||
29 | - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` | ||
30 | -} | ||
31 | - | ||
32 | -func (x *PubRsp) Reset() { | ||
33 | - *x = PubRsp{} | ||
34 | - if protoimpl.UnsafeEnabled { | ||
35 | - mi := &file_public_proto_msgTypes[0] | ||
36 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
37 | - ms.StoreMessageInfo(mi) | ||
38 | - } | ||
39 | -} | ||
40 | - | ||
41 | -func (x *PubRsp) String() string { | ||
42 | - return protoimpl.X.MessageStringOf(x) | ||
43 | -} | ||
44 | - | ||
45 | -func (*PubRsp) ProtoMessage() {} | ||
46 | - | ||
47 | -func (x *PubRsp) ProtoReflect() protoreflect.Message { | ||
48 | - mi := &file_public_proto_msgTypes[0] | ||
49 | - if protoimpl.UnsafeEnabled && x != nil { | ||
50 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
51 | - if ms.LoadMessageInfo() == nil { | ||
52 | - ms.StoreMessageInfo(mi) | ||
53 | - } | ||
54 | - return ms | ||
55 | - } | ||
56 | - return mi.MessageOf(x) | ||
57 | -} | ||
58 | - | ||
59 | -// Deprecated: Use PubRsp.ProtoReflect.Descriptor instead. | ||
60 | -func (*PubRsp) Descriptor() ([]byte, []int) { | ||
61 | - return file_public_proto_rawDescGZIP(), []int{0} | ||
62 | -} | ||
63 | - | ||
64 | -func (x *PubRsp) GetCode() int32 { | ||
65 | - if x != nil { | ||
66 | - return x.Code | ||
67 | - } | ||
68 | - return 0 | ||
69 | -} | ||
70 | - | ||
71 | -func (x *PubRsp) GetMsg() string { | ||
72 | - if x != nil { | ||
73 | - return x.Msg | ||
74 | - } | ||
75 | - return "" | ||
76 | -} | ||
77 | - | ||
78 | -type GenerateToken struct { | ||
79 | - state protoimpl.MessageState | ||
80 | - sizeCache protoimpl.SizeCache | ||
81 | - unknownFields protoimpl.UnknownFields | ||
82 | - | ||
83 | - Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` | ||
84 | -} | ||
85 | - | ||
86 | -func (x *GenerateToken) Reset() { | ||
87 | - *x = GenerateToken{} | ||
88 | - if protoimpl.UnsafeEnabled { | ||
89 | - mi := &file_public_proto_msgTypes[1] | ||
90 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
91 | - ms.StoreMessageInfo(mi) | ||
92 | - } | ||
93 | -} | ||
94 | - | ||
95 | -func (x *GenerateToken) String() string { | ||
96 | - return protoimpl.X.MessageStringOf(x) | ||
97 | -} | ||
98 | - | ||
99 | -func (*GenerateToken) ProtoMessage() {} | ||
100 | - | ||
101 | -func (x *GenerateToken) ProtoReflect() protoreflect.Message { | ||
102 | - mi := &file_public_proto_msgTypes[1] | ||
103 | - if protoimpl.UnsafeEnabled && x != nil { | ||
104 | - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
105 | - if ms.LoadMessageInfo() == nil { | ||
106 | - ms.StoreMessageInfo(mi) | ||
107 | - } | ||
108 | - return ms | ||
109 | - } | ||
110 | - return mi.MessageOf(x) | ||
111 | -} | ||
112 | - | ||
113 | -// Deprecated: Use GenerateToken.ProtoReflect.Descriptor instead. | ||
114 | -func (*GenerateToken) Descriptor() ([]byte, []int) { | ||
115 | - return file_public_proto_rawDescGZIP(), []int{1} | ||
116 | -} | ||
117 | - | ||
118 | -func (x *GenerateToken) GetPhone() string { | ||
119 | - if x != nil { | ||
120 | - return x.Phone | ||
121 | - } | ||
122 | - return "" | ||
123 | -} | ||
124 | - | ||
125 | -var File_public_proto protoreflect.FileDescriptor | ||
126 | - | ||
127 | -var file_public_proto_rawDesc = []byte{ | ||
128 | - 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, | ||
129 | - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x2e, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x52, 0x73, 0x70, | ||
130 | - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, | ||
131 | - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, | ||
132 | - 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x25, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, | ||
133 | - 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, | ||
134 | - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x09, 0x5a, | ||
135 | - 0x07, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||
136 | -} | ||
137 | - | ||
138 | -var ( | ||
139 | - file_public_proto_rawDescOnce sync.Once | ||
140 | - file_public_proto_rawDescData = file_public_proto_rawDesc | ||
141 | -) | ||
142 | - | ||
143 | -func file_public_proto_rawDescGZIP() []byte { | ||
144 | - file_public_proto_rawDescOnce.Do(func() { | ||
145 | - file_public_proto_rawDescData = protoimpl.X.CompressGZIP(file_public_proto_rawDescData) | ||
146 | - }) | ||
147 | - return file_public_proto_rawDescData | ||
148 | -} | ||
149 | - | ||
150 | -var file_public_proto_msgTypes = make([]protoimpl.MessageInfo, 2) | ||
151 | -var file_public_proto_goTypes = []interface{}{ | ||
152 | - (*PubRsp)(nil), // 0: public.PubRsp | ||
153 | - (*GenerateToken)(nil), // 1: public.GenerateToken | ||
154 | -} | ||
155 | -var file_public_proto_depIdxs = []int32{ | ||
156 | - 0, // [0:0] is the sub-list for method output_type | ||
157 | - 0, // [0:0] is the sub-list for method input_type | ||
158 | - 0, // [0:0] is the sub-list for extension type_name | ||
159 | - 0, // [0:0] is the sub-list for extension extendee | ||
160 | - 0, // [0:0] is the sub-list for field type_name | ||
161 | -} | ||
162 | - | ||
163 | -func init() { file_public_proto_init() } | ||
164 | -func file_public_proto_init() { | ||
165 | - if File_public_proto != nil { | ||
166 | - return | ||
167 | - } | ||
168 | - if !protoimpl.UnsafeEnabled { | ||
169 | - file_public_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { | ||
170 | - switch v := v.(*PubRsp); i { | ||
171 | - case 0: | ||
172 | - return &v.state | ||
173 | - case 1: | ||
174 | - return &v.sizeCache | ||
175 | - case 2: | ||
176 | - return &v.unknownFields | ||
177 | - default: | ||
178 | - return nil | ||
179 | - } | ||
180 | - } | ||
181 | - file_public_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { | ||
182 | - switch v := v.(*GenerateToken); i { | ||
183 | - case 0: | ||
184 | - return &v.state | ||
185 | - case 1: | ||
186 | - return &v.sizeCache | ||
187 | - case 2: | ||
188 | - return &v.unknownFields | ||
189 | - default: | ||
190 | - return nil | ||
191 | - } | ||
192 | - } | ||
193 | - } | ||
194 | - type x struct{} | ||
195 | - out := protoimpl.TypeBuilder{ | ||
196 | - File: protoimpl.DescBuilder{ | ||
197 | - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||
198 | - RawDescriptor: file_public_proto_rawDesc, | ||
199 | - NumEnums: 0, | ||
200 | - NumMessages: 2, | ||
201 | - NumExtensions: 0, | ||
202 | - NumServices: 0, | ||
203 | - }, | ||
204 | - GoTypes: file_public_proto_goTypes, | ||
205 | - DependencyIndexes: file_public_proto_depIdxs, | ||
206 | - MessageInfos: file_public_proto_msgTypes, | ||
207 | - }.Build() | ||
208 | - File_public_proto = out.File | ||
209 | - file_public_proto_rawDesc = nil | ||
210 | - file_public_proto_goTypes = nil | ||
211 | - file_public_proto_depIdxs = nil | ||
212 | -} |
protos/public.proto deleted
@@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
1 | -syntax = "proto3"; | ||
2 | -package public; | ||
3 | - | ||
4 | -option go_package = "./pb;pb"; | ||
5 | - | ||
6 | -message PubRsp { | ||
7 | - int32 code = 1; | ||
8 | - string msg = 2; | ||
9 | -} | ||
10 | - | ||
11 | -message GenerateToken { | ||
12 | - string phone = 1; | ||
13 | -} | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |