Skip to content

Commit 9f355eb

Browse files
committed
Generate stubs
1 parent eb8ff2b commit 9f355eb

File tree

3 files changed

+434
-0
lines changed

3 files changed

+434
-0
lines changed

plugin/v1/__init__.py

Whitespace-only changes.

plugin/v1/plugin_grpc.py

Lines changed: 393 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,393 @@
1+
# Generated by the Protocol Buffers compiler. DO NOT EDIT!
2+
# source: plugin/v1/plugin.proto
3+
# plugin: grpclib.plugin.main
4+
import abc
5+
import typing
6+
7+
import grpclib.const
8+
import grpclib.client
9+
if typing.TYPE_CHECKING:
10+
import grpclib.server
11+
12+
import google.protobuf.struct_pb2
13+
import plugin.v1.plugin_pb2
14+
15+
16+
class GatewayDPluginServiceBase(abc.ABC):
17+
18+
@abc.abstractmethod
19+
async def GetPluginConfig(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
20+
pass
21+
22+
@abc.abstractmethod
23+
async def OnConfigLoaded(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
24+
pass
25+
26+
@abc.abstractmethod
27+
async def OnNewLogger(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
28+
pass
29+
30+
@abc.abstractmethod
31+
async def OnNewPool(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
32+
pass
33+
34+
@abc.abstractmethod
35+
async def OnNewClient(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
36+
pass
37+
38+
@abc.abstractmethod
39+
async def OnNewProxy(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
40+
pass
41+
42+
@abc.abstractmethod
43+
async def OnNewServer(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
44+
pass
45+
46+
@abc.abstractmethod
47+
async def OnSignal(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
48+
pass
49+
50+
@abc.abstractmethod
51+
async def OnRun(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
52+
pass
53+
54+
@abc.abstractmethod
55+
async def OnBooting(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
56+
pass
57+
58+
@abc.abstractmethod
59+
async def OnBooted(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
60+
pass
61+
62+
@abc.abstractmethod
63+
async def OnOpening(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
64+
pass
65+
66+
@abc.abstractmethod
67+
async def OnOpened(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
68+
pass
69+
70+
@abc.abstractmethod
71+
async def OnClosing(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
72+
pass
73+
74+
@abc.abstractmethod
75+
async def OnClosed(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
76+
pass
77+
78+
@abc.abstractmethod
79+
async def OnTraffic(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
80+
pass
81+
82+
@abc.abstractmethod
83+
async def OnTrafficFromClient(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
84+
pass
85+
86+
@abc.abstractmethod
87+
async def OnTrafficToServer(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
88+
pass
89+
90+
@abc.abstractmethod
91+
async def OnTrafficFromServer(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
92+
pass
93+
94+
@abc.abstractmethod
95+
async def OnTrafficToClient(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
96+
pass
97+
98+
@abc.abstractmethod
99+
async def OnShutdown(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
100+
pass
101+
102+
@abc.abstractmethod
103+
async def OnTick(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
104+
pass
105+
106+
@abc.abstractmethod
107+
async def OnHook(self, stream: 'grpclib.server.Stream[google.protobuf.struct_pb2.Struct, google.protobuf.struct_pb2.Struct]') -> None:
108+
pass
109+
110+
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
111+
return {
112+
'/plugin.v1.GatewayDPluginService/GetPluginConfig': grpclib.const.Handler(
113+
self.GetPluginConfig,
114+
grpclib.const.Cardinality.UNARY_UNARY,
115+
google.protobuf.struct_pb2.Struct,
116+
google.protobuf.struct_pb2.Struct,
117+
),
118+
'/plugin.v1.GatewayDPluginService/OnConfigLoaded': grpclib.const.Handler(
119+
self.OnConfigLoaded,
120+
grpclib.const.Cardinality.UNARY_UNARY,
121+
google.protobuf.struct_pb2.Struct,
122+
google.protobuf.struct_pb2.Struct,
123+
),
124+
'/plugin.v1.GatewayDPluginService/OnNewLogger': grpclib.const.Handler(
125+
self.OnNewLogger,
126+
grpclib.const.Cardinality.UNARY_UNARY,
127+
google.protobuf.struct_pb2.Struct,
128+
google.protobuf.struct_pb2.Struct,
129+
),
130+
'/plugin.v1.GatewayDPluginService/OnNewPool': grpclib.const.Handler(
131+
self.OnNewPool,
132+
grpclib.const.Cardinality.UNARY_UNARY,
133+
google.protobuf.struct_pb2.Struct,
134+
google.protobuf.struct_pb2.Struct,
135+
),
136+
'/plugin.v1.GatewayDPluginService/OnNewClient': grpclib.const.Handler(
137+
self.OnNewClient,
138+
grpclib.const.Cardinality.UNARY_UNARY,
139+
google.protobuf.struct_pb2.Struct,
140+
google.protobuf.struct_pb2.Struct,
141+
),
142+
'/plugin.v1.GatewayDPluginService/OnNewProxy': grpclib.const.Handler(
143+
self.OnNewProxy,
144+
grpclib.const.Cardinality.UNARY_UNARY,
145+
google.protobuf.struct_pb2.Struct,
146+
google.protobuf.struct_pb2.Struct,
147+
),
148+
'/plugin.v1.GatewayDPluginService/OnNewServer': grpclib.const.Handler(
149+
self.OnNewServer,
150+
grpclib.const.Cardinality.UNARY_UNARY,
151+
google.protobuf.struct_pb2.Struct,
152+
google.protobuf.struct_pb2.Struct,
153+
),
154+
'/plugin.v1.GatewayDPluginService/OnSignal': grpclib.const.Handler(
155+
self.OnSignal,
156+
grpclib.const.Cardinality.UNARY_UNARY,
157+
google.protobuf.struct_pb2.Struct,
158+
google.protobuf.struct_pb2.Struct,
159+
),
160+
'/plugin.v1.GatewayDPluginService/OnRun': grpclib.const.Handler(
161+
self.OnRun,
162+
grpclib.const.Cardinality.UNARY_UNARY,
163+
google.protobuf.struct_pb2.Struct,
164+
google.protobuf.struct_pb2.Struct,
165+
),
166+
'/plugin.v1.GatewayDPluginService/OnBooting': grpclib.const.Handler(
167+
self.OnBooting,
168+
grpclib.const.Cardinality.UNARY_UNARY,
169+
google.protobuf.struct_pb2.Struct,
170+
google.protobuf.struct_pb2.Struct,
171+
),
172+
'/plugin.v1.GatewayDPluginService/OnBooted': grpclib.const.Handler(
173+
self.OnBooted,
174+
grpclib.const.Cardinality.UNARY_UNARY,
175+
google.protobuf.struct_pb2.Struct,
176+
google.protobuf.struct_pb2.Struct,
177+
),
178+
'/plugin.v1.GatewayDPluginService/OnOpening': grpclib.const.Handler(
179+
self.OnOpening,
180+
grpclib.const.Cardinality.UNARY_UNARY,
181+
google.protobuf.struct_pb2.Struct,
182+
google.protobuf.struct_pb2.Struct,
183+
),
184+
'/plugin.v1.GatewayDPluginService/OnOpened': grpclib.const.Handler(
185+
self.OnOpened,
186+
grpclib.const.Cardinality.UNARY_UNARY,
187+
google.protobuf.struct_pb2.Struct,
188+
google.protobuf.struct_pb2.Struct,
189+
),
190+
'/plugin.v1.GatewayDPluginService/OnClosing': grpclib.const.Handler(
191+
self.OnClosing,
192+
grpclib.const.Cardinality.UNARY_UNARY,
193+
google.protobuf.struct_pb2.Struct,
194+
google.protobuf.struct_pb2.Struct,
195+
),
196+
'/plugin.v1.GatewayDPluginService/OnClosed': grpclib.const.Handler(
197+
self.OnClosed,
198+
grpclib.const.Cardinality.UNARY_UNARY,
199+
google.protobuf.struct_pb2.Struct,
200+
google.protobuf.struct_pb2.Struct,
201+
),
202+
'/plugin.v1.GatewayDPluginService/OnTraffic': grpclib.const.Handler(
203+
self.OnTraffic,
204+
grpclib.const.Cardinality.UNARY_UNARY,
205+
google.protobuf.struct_pb2.Struct,
206+
google.protobuf.struct_pb2.Struct,
207+
),
208+
'/plugin.v1.GatewayDPluginService/OnTrafficFromClient': grpclib.const.Handler(
209+
self.OnTrafficFromClient,
210+
grpclib.const.Cardinality.UNARY_UNARY,
211+
google.protobuf.struct_pb2.Struct,
212+
google.protobuf.struct_pb2.Struct,
213+
),
214+
'/plugin.v1.GatewayDPluginService/OnTrafficToServer': grpclib.const.Handler(
215+
self.OnTrafficToServer,
216+
grpclib.const.Cardinality.UNARY_UNARY,
217+
google.protobuf.struct_pb2.Struct,
218+
google.protobuf.struct_pb2.Struct,
219+
),
220+
'/plugin.v1.GatewayDPluginService/OnTrafficFromServer': grpclib.const.Handler(
221+
self.OnTrafficFromServer,
222+
grpclib.const.Cardinality.UNARY_UNARY,
223+
google.protobuf.struct_pb2.Struct,
224+
google.protobuf.struct_pb2.Struct,
225+
),
226+
'/plugin.v1.GatewayDPluginService/OnTrafficToClient': grpclib.const.Handler(
227+
self.OnTrafficToClient,
228+
grpclib.const.Cardinality.UNARY_UNARY,
229+
google.protobuf.struct_pb2.Struct,
230+
google.protobuf.struct_pb2.Struct,
231+
),
232+
'/plugin.v1.GatewayDPluginService/OnShutdown': grpclib.const.Handler(
233+
self.OnShutdown,
234+
grpclib.const.Cardinality.UNARY_UNARY,
235+
google.protobuf.struct_pb2.Struct,
236+
google.protobuf.struct_pb2.Struct,
237+
),
238+
'/plugin.v1.GatewayDPluginService/OnTick': grpclib.const.Handler(
239+
self.OnTick,
240+
grpclib.const.Cardinality.UNARY_UNARY,
241+
google.protobuf.struct_pb2.Struct,
242+
google.protobuf.struct_pb2.Struct,
243+
),
244+
'/plugin.v1.GatewayDPluginService/OnHook': grpclib.const.Handler(
245+
self.OnHook,
246+
grpclib.const.Cardinality.UNARY_UNARY,
247+
google.protobuf.struct_pb2.Struct,
248+
google.protobuf.struct_pb2.Struct,
249+
),
250+
}
251+
252+
253+
class GatewayDPluginServiceStub:
254+
255+
def __init__(self, channel: grpclib.client.Channel) -> None:
256+
self.GetPluginConfig = grpclib.client.UnaryUnaryMethod(
257+
channel,
258+
'/plugin.v1.GatewayDPluginService/GetPluginConfig',
259+
google.protobuf.struct_pb2.Struct,
260+
google.protobuf.struct_pb2.Struct,
261+
)
262+
self.OnConfigLoaded = grpclib.client.UnaryUnaryMethod(
263+
channel,
264+
'/plugin.v1.GatewayDPluginService/OnConfigLoaded',
265+
google.protobuf.struct_pb2.Struct,
266+
google.protobuf.struct_pb2.Struct,
267+
)
268+
self.OnNewLogger = grpclib.client.UnaryUnaryMethod(
269+
channel,
270+
'/plugin.v1.GatewayDPluginService/OnNewLogger',
271+
google.protobuf.struct_pb2.Struct,
272+
google.protobuf.struct_pb2.Struct,
273+
)
274+
self.OnNewPool = grpclib.client.UnaryUnaryMethod(
275+
channel,
276+
'/plugin.v1.GatewayDPluginService/OnNewPool',
277+
google.protobuf.struct_pb2.Struct,
278+
google.protobuf.struct_pb2.Struct,
279+
)
280+
self.OnNewClient = grpclib.client.UnaryUnaryMethod(
281+
channel,
282+
'/plugin.v1.GatewayDPluginService/OnNewClient',
283+
google.protobuf.struct_pb2.Struct,
284+
google.protobuf.struct_pb2.Struct,
285+
)
286+
self.OnNewProxy = grpclib.client.UnaryUnaryMethod(
287+
channel,
288+
'/plugin.v1.GatewayDPluginService/OnNewProxy',
289+
google.protobuf.struct_pb2.Struct,
290+
google.protobuf.struct_pb2.Struct,
291+
)
292+
self.OnNewServer = grpclib.client.UnaryUnaryMethod(
293+
channel,
294+
'/plugin.v1.GatewayDPluginService/OnNewServer',
295+
google.protobuf.struct_pb2.Struct,
296+
google.protobuf.struct_pb2.Struct,
297+
)
298+
self.OnSignal = grpclib.client.UnaryUnaryMethod(
299+
channel,
300+
'/plugin.v1.GatewayDPluginService/OnSignal',
301+
google.protobuf.struct_pb2.Struct,
302+
google.protobuf.struct_pb2.Struct,
303+
)
304+
self.OnRun = grpclib.client.UnaryUnaryMethod(
305+
channel,
306+
'/plugin.v1.GatewayDPluginService/OnRun',
307+
google.protobuf.struct_pb2.Struct,
308+
google.protobuf.struct_pb2.Struct,
309+
)
310+
self.OnBooting = grpclib.client.UnaryUnaryMethod(
311+
channel,
312+
'/plugin.v1.GatewayDPluginService/OnBooting',
313+
google.protobuf.struct_pb2.Struct,
314+
google.protobuf.struct_pb2.Struct,
315+
)
316+
self.OnBooted = grpclib.client.UnaryUnaryMethod(
317+
channel,
318+
'/plugin.v1.GatewayDPluginService/OnBooted',
319+
google.protobuf.struct_pb2.Struct,
320+
google.protobuf.struct_pb2.Struct,
321+
)
322+
self.OnOpening = grpclib.client.UnaryUnaryMethod(
323+
channel,
324+
'/plugin.v1.GatewayDPluginService/OnOpening',
325+
google.protobuf.struct_pb2.Struct,
326+
google.protobuf.struct_pb2.Struct,
327+
)
328+
self.OnOpened = grpclib.client.UnaryUnaryMethod(
329+
channel,
330+
'/plugin.v1.GatewayDPluginService/OnOpened',
331+
google.protobuf.struct_pb2.Struct,
332+
google.protobuf.struct_pb2.Struct,
333+
)
334+
self.OnClosing = grpclib.client.UnaryUnaryMethod(
335+
channel,
336+
'/plugin.v1.GatewayDPluginService/OnClosing',
337+
google.protobuf.struct_pb2.Struct,
338+
google.protobuf.struct_pb2.Struct,
339+
)
340+
self.OnClosed = grpclib.client.UnaryUnaryMethod(
341+
channel,
342+
'/plugin.v1.GatewayDPluginService/OnClosed',
343+
google.protobuf.struct_pb2.Struct,
344+
google.protobuf.struct_pb2.Struct,
345+
)
346+
self.OnTraffic = grpclib.client.UnaryUnaryMethod(
347+
channel,
348+
'/plugin.v1.GatewayDPluginService/OnTraffic',
349+
google.protobuf.struct_pb2.Struct,
350+
google.protobuf.struct_pb2.Struct,
351+
)
352+
self.OnTrafficFromClient = grpclib.client.UnaryUnaryMethod(
353+
channel,
354+
'/plugin.v1.GatewayDPluginService/OnTrafficFromClient',
355+
google.protobuf.struct_pb2.Struct,
356+
google.protobuf.struct_pb2.Struct,
357+
)
358+
self.OnTrafficToServer = grpclib.client.UnaryUnaryMethod(
359+
channel,
360+
'/plugin.v1.GatewayDPluginService/OnTrafficToServer',
361+
google.protobuf.struct_pb2.Struct,
362+
google.protobuf.struct_pb2.Struct,
363+
)
364+
self.OnTrafficFromServer = grpclib.client.UnaryUnaryMethod(
365+
channel,
366+
'/plugin.v1.GatewayDPluginService/OnTrafficFromServer',
367+
google.protobuf.struct_pb2.Struct,
368+
google.protobuf.struct_pb2.Struct,
369+
)
370+
self.OnTrafficToClient = grpclib.client.UnaryUnaryMethod(
371+
channel,
372+
'/plugin.v1.GatewayDPluginService/OnTrafficToClient',
373+
google.protobuf.struct_pb2.Struct,
374+
google.protobuf.struct_pb2.Struct,
375+
)
376+
self.OnShutdown = grpclib.client.UnaryUnaryMethod(
377+
channel,
378+
'/plugin.v1.GatewayDPluginService/OnShutdown',
379+
google.protobuf.struct_pb2.Struct,
380+
google.protobuf.struct_pb2.Struct,
381+
)
382+
self.OnTick = grpclib.client.UnaryUnaryMethod(
383+
channel,
384+
'/plugin.v1.GatewayDPluginService/OnTick',
385+
google.protobuf.struct_pb2.Struct,
386+
google.protobuf.struct_pb2.Struct,
387+
)
388+
self.OnHook = grpclib.client.UnaryUnaryMethod(
389+
channel,
390+
'/plugin.v1.GatewayDPluginService/OnHook',
391+
google.protobuf.struct_pb2.Struct,
392+
google.protobuf.struct_pb2.Struct,
393+
)

0 commit comments

Comments
 (0)