exhook_grpc.pb.go 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v3.18.1
  5. // source: protobuf/exhook.proto
  6. package exhook
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // HookProviderClient is the client API for HookProvider service.
  18. //
  19. // 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.
  20. type HookProviderClient interface {
  21. OnProviderLoaded(ctx context.Context, in *ProviderLoadedRequest, opts ...grpc.CallOption) (*LoadedResponse, error)
  22. OnProviderUnloaded(ctx context.Context, in *ProviderUnloadedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  23. OnClientConnect(ctx context.Context, in *ClientConnectRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  24. OnClientConnack(ctx context.Context, in *ClientConnackRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  25. OnClientConnected(ctx context.Context, in *ClientConnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  26. OnClientDisconnected(ctx context.Context, in *ClientDisconnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  27. OnClientAuthenticate(ctx context.Context, in *ClientAuthenticateRequest, opts ...grpc.CallOption) (*ValuedResponse, error)
  28. OnClientAuthorize(ctx context.Context, in *ClientAuthorizeRequest, opts ...grpc.CallOption) (*ValuedResponse, error)
  29. OnClientSubscribe(ctx context.Context, in *ClientSubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  30. OnClientUnsubscribe(ctx context.Context, in *ClientUnsubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  31. OnSessionCreated(ctx context.Context, in *SessionCreatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  32. OnSessionSubscribed(ctx context.Context, in *SessionSubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  33. OnSessionUnsubscribed(ctx context.Context, in *SessionUnsubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  34. OnSessionResumed(ctx context.Context, in *SessionResumedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  35. OnSessionDiscarded(ctx context.Context, in *SessionDiscardedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  36. OnSessionTakenover(ctx context.Context, in *SessionTakenoverRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  37. OnSessionTerminated(ctx context.Context, in *SessionTerminatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  38. OnMessagePublish(ctx context.Context, in *MessagePublishRequest, opts ...grpc.CallOption) (*ValuedResponse, error)
  39. OnMessageDelivered(ctx context.Context, in *MessageDeliveredRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  40. OnMessageDropped(ctx context.Context, in *MessageDroppedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  41. OnMessageAcked(ctx context.Context, in *MessageAckedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
  42. }
  43. type hookProviderClient struct {
  44. cc grpc.ClientConnInterface
  45. }
  46. func NewHookProviderClient(cc grpc.ClientConnInterface) HookProviderClient {
  47. return &hookProviderClient{cc}
  48. }
  49. func (c *hookProviderClient) OnProviderLoaded(ctx context.Context, in *ProviderLoadedRequest, opts ...grpc.CallOption) (*LoadedResponse, error) {
  50. out := new(LoadedResponse)
  51. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnProviderLoaded", in, out, opts...)
  52. if err != nil {
  53. return nil, err
  54. }
  55. return out, nil
  56. }
  57. func (c *hookProviderClient) OnProviderUnloaded(ctx context.Context, in *ProviderUnloadedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  58. out := new(EmptySuccess)
  59. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnProviderUnloaded", in, out, opts...)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. func (c *hookProviderClient) OnClientConnect(ctx context.Context, in *ClientConnectRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  66. out := new(EmptySuccess)
  67. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientConnect", in, out, opts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *hookProviderClient) OnClientConnack(ctx context.Context, in *ClientConnackRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  74. out := new(EmptySuccess)
  75. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientConnack", in, out, opts...)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return out, nil
  80. }
  81. func (c *hookProviderClient) OnClientConnected(ctx context.Context, in *ClientConnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  82. out := new(EmptySuccess)
  83. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientConnected", in, out, opts...)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. func (c *hookProviderClient) OnClientDisconnected(ctx context.Context, in *ClientDisconnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  90. out := new(EmptySuccess)
  91. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientDisconnected", in, out, opts...)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return out, nil
  96. }
  97. func (c *hookProviderClient) OnClientAuthenticate(ctx context.Context, in *ClientAuthenticateRequest, opts ...grpc.CallOption) (*ValuedResponse, error) {
  98. out := new(ValuedResponse)
  99. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientAuthenticate", in, out, opts...)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return out, nil
  104. }
  105. func (c *hookProviderClient) OnClientAuthorize(ctx context.Context, in *ClientAuthorizeRequest, opts ...grpc.CallOption) (*ValuedResponse, error) {
  106. out := new(ValuedResponse)
  107. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientAuthorize", in, out, opts...)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return out, nil
  112. }
  113. func (c *hookProviderClient) OnClientSubscribe(ctx context.Context, in *ClientSubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  114. out := new(EmptySuccess)
  115. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientSubscribe", in, out, opts...)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return out, nil
  120. }
  121. func (c *hookProviderClient) OnClientUnsubscribe(ctx context.Context, in *ClientUnsubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  122. out := new(EmptySuccess)
  123. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientUnsubscribe", in, out, opts...)
  124. if err != nil {
  125. return nil, err
  126. }
  127. return out, nil
  128. }
  129. func (c *hookProviderClient) OnSessionCreated(ctx context.Context, in *SessionCreatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  130. out := new(EmptySuccess)
  131. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionCreated", in, out, opts...)
  132. if err != nil {
  133. return nil, err
  134. }
  135. return out, nil
  136. }
  137. func (c *hookProviderClient) OnSessionSubscribed(ctx context.Context, in *SessionSubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  138. out := new(EmptySuccess)
  139. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionSubscribed", in, out, opts...)
  140. if err != nil {
  141. return nil, err
  142. }
  143. return out, nil
  144. }
  145. func (c *hookProviderClient) OnSessionUnsubscribed(ctx context.Context, in *SessionUnsubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  146. out := new(EmptySuccess)
  147. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionUnsubscribed", in, out, opts...)
  148. if err != nil {
  149. return nil, err
  150. }
  151. return out, nil
  152. }
  153. func (c *hookProviderClient) OnSessionResumed(ctx context.Context, in *SessionResumedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  154. out := new(EmptySuccess)
  155. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionResumed", in, out, opts...)
  156. if err != nil {
  157. return nil, err
  158. }
  159. return out, nil
  160. }
  161. func (c *hookProviderClient) OnSessionDiscarded(ctx context.Context, in *SessionDiscardedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  162. out := new(EmptySuccess)
  163. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionDiscarded", in, out, opts...)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return out, nil
  168. }
  169. func (c *hookProviderClient) OnSessionTakenover(ctx context.Context, in *SessionTakenoverRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  170. out := new(EmptySuccess)
  171. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionTakenover", in, out, opts...)
  172. if err != nil {
  173. return nil, err
  174. }
  175. return out, nil
  176. }
  177. func (c *hookProviderClient) OnSessionTerminated(ctx context.Context, in *SessionTerminatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  178. out := new(EmptySuccess)
  179. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionTerminated", in, out, opts...)
  180. if err != nil {
  181. return nil, err
  182. }
  183. return out, nil
  184. }
  185. func (c *hookProviderClient) OnMessagePublish(ctx context.Context, in *MessagePublishRequest, opts ...grpc.CallOption) (*ValuedResponse, error) {
  186. out := new(ValuedResponse)
  187. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessagePublish", in, out, opts...)
  188. if err != nil {
  189. return nil, err
  190. }
  191. return out, nil
  192. }
  193. func (c *hookProviderClient) OnMessageDelivered(ctx context.Context, in *MessageDeliveredRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  194. out := new(EmptySuccess)
  195. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessageDelivered", in, out, opts...)
  196. if err != nil {
  197. return nil, err
  198. }
  199. return out, nil
  200. }
  201. func (c *hookProviderClient) OnMessageDropped(ctx context.Context, in *MessageDroppedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  202. out := new(EmptySuccess)
  203. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessageDropped", in, out, opts...)
  204. if err != nil {
  205. return nil, err
  206. }
  207. return out, nil
  208. }
  209. func (c *hookProviderClient) OnMessageAcked(ctx context.Context, in *MessageAckedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
  210. out := new(EmptySuccess)
  211. err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessageAcked", in, out, opts...)
  212. if err != nil {
  213. return nil, err
  214. }
  215. return out, nil
  216. }
  217. // HookProviderServer is the server API for HookProvider service.
  218. // All implementations must embed UnimplementedHookProviderServer
  219. // for forward compatibility
  220. type HookProviderServer interface {
  221. OnProviderLoaded(context.Context, *ProviderLoadedRequest) (*LoadedResponse, error)
  222. OnProviderUnloaded(context.Context, *ProviderUnloadedRequest) (*EmptySuccess, error)
  223. OnClientConnect(context.Context, *ClientConnectRequest) (*EmptySuccess, error)
  224. OnClientConnack(context.Context, *ClientConnackRequest) (*EmptySuccess, error)
  225. OnClientConnected(context.Context, *ClientConnectedRequest) (*EmptySuccess, error)
  226. OnClientDisconnected(context.Context, *ClientDisconnectedRequest) (*EmptySuccess, error)
  227. OnClientAuthenticate(context.Context, *ClientAuthenticateRequest) (*ValuedResponse, error)
  228. OnClientAuthorize(context.Context, *ClientAuthorizeRequest) (*ValuedResponse, error)
  229. OnClientSubscribe(context.Context, *ClientSubscribeRequest) (*EmptySuccess, error)
  230. OnClientUnsubscribe(context.Context, *ClientUnsubscribeRequest) (*EmptySuccess, error)
  231. OnSessionCreated(context.Context, *SessionCreatedRequest) (*EmptySuccess, error)
  232. OnSessionSubscribed(context.Context, *SessionSubscribedRequest) (*EmptySuccess, error)
  233. OnSessionUnsubscribed(context.Context, *SessionUnsubscribedRequest) (*EmptySuccess, error)
  234. OnSessionResumed(context.Context, *SessionResumedRequest) (*EmptySuccess, error)
  235. OnSessionDiscarded(context.Context, *SessionDiscardedRequest) (*EmptySuccess, error)
  236. OnSessionTakenover(context.Context, *SessionTakenoverRequest) (*EmptySuccess, error)
  237. OnSessionTerminated(context.Context, *SessionTerminatedRequest) (*EmptySuccess, error)
  238. OnMessagePublish(context.Context, *MessagePublishRequest) (*ValuedResponse, error)
  239. OnMessageDelivered(context.Context, *MessageDeliveredRequest) (*EmptySuccess, error)
  240. OnMessageDropped(context.Context, *MessageDroppedRequest) (*EmptySuccess, error)
  241. OnMessageAcked(context.Context, *MessageAckedRequest) (*EmptySuccess, error)
  242. mustEmbedUnimplementedHookProviderServer()
  243. }
  244. // UnimplementedHookProviderServer must be embedded to have forward compatible implementations.
  245. type UnimplementedHookProviderServer struct {
  246. }
  247. func (UnimplementedHookProviderServer) OnProviderLoaded(context.Context, *ProviderLoadedRequest) (*LoadedResponse, error) {
  248. return nil, status.Errorf(codes.Unimplemented, "method OnProviderLoaded not implemented")
  249. }
  250. func (UnimplementedHookProviderServer) OnProviderUnloaded(context.Context, *ProviderUnloadedRequest) (*EmptySuccess, error) {
  251. return nil, status.Errorf(codes.Unimplemented, "method OnProviderUnloaded not implemented")
  252. }
  253. func (UnimplementedHookProviderServer) OnClientConnect(context.Context, *ClientConnectRequest) (*EmptySuccess, error) {
  254. return nil, status.Errorf(codes.Unimplemented, "method OnClientConnect not implemented")
  255. }
  256. func (UnimplementedHookProviderServer) OnClientConnack(context.Context, *ClientConnackRequest) (*EmptySuccess, error) {
  257. return nil, status.Errorf(codes.Unimplemented, "method OnClientConnack not implemented")
  258. }
  259. func (UnimplementedHookProviderServer) OnClientConnected(context.Context, *ClientConnectedRequest) (*EmptySuccess, error) {
  260. return nil, status.Errorf(codes.Unimplemented, "method OnClientConnected not implemented")
  261. }
  262. func (UnimplementedHookProviderServer) OnClientDisconnected(context.Context, *ClientDisconnectedRequest) (*EmptySuccess, error) {
  263. return nil, status.Errorf(codes.Unimplemented, "method OnClientDisconnected not implemented")
  264. }
  265. func (UnimplementedHookProviderServer) OnClientAuthenticate(context.Context, *ClientAuthenticateRequest) (*ValuedResponse, error) {
  266. return nil, status.Errorf(codes.Unimplemented, "method OnClientAuthenticate not implemented")
  267. }
  268. func (UnimplementedHookProviderServer) OnClientAuthorize(context.Context, *ClientAuthorizeRequest) (*ValuedResponse, error) {
  269. return nil, status.Errorf(codes.Unimplemented, "method OnClientAuthorize not implemented")
  270. }
  271. func (UnimplementedHookProviderServer) OnClientSubscribe(context.Context, *ClientSubscribeRequest) (*EmptySuccess, error) {
  272. return nil, status.Errorf(codes.Unimplemented, "method OnClientSubscribe not implemented")
  273. }
  274. func (UnimplementedHookProviderServer) OnClientUnsubscribe(context.Context, *ClientUnsubscribeRequest) (*EmptySuccess, error) {
  275. return nil, status.Errorf(codes.Unimplemented, "method OnClientUnsubscribe not implemented")
  276. }
  277. func (UnimplementedHookProviderServer) OnSessionCreated(context.Context, *SessionCreatedRequest) (*EmptySuccess, error) {
  278. return nil, status.Errorf(codes.Unimplemented, "method OnSessionCreated not implemented")
  279. }
  280. func (UnimplementedHookProviderServer) OnSessionSubscribed(context.Context, *SessionSubscribedRequest) (*EmptySuccess, error) {
  281. return nil, status.Errorf(codes.Unimplemented, "method OnSessionSubscribed not implemented")
  282. }
  283. func (UnimplementedHookProviderServer) OnSessionUnsubscribed(context.Context, *SessionUnsubscribedRequest) (*EmptySuccess, error) {
  284. return nil, status.Errorf(codes.Unimplemented, "method OnSessionUnsubscribed not implemented")
  285. }
  286. func (UnimplementedHookProviderServer) OnSessionResumed(context.Context, *SessionResumedRequest) (*EmptySuccess, error) {
  287. return nil, status.Errorf(codes.Unimplemented, "method OnSessionResumed not implemented")
  288. }
  289. func (UnimplementedHookProviderServer) OnSessionDiscarded(context.Context, *SessionDiscardedRequest) (*EmptySuccess, error) {
  290. return nil, status.Errorf(codes.Unimplemented, "method OnSessionDiscarded not implemented")
  291. }
  292. func (UnimplementedHookProviderServer) OnSessionTakenover(context.Context, *SessionTakenoverRequest) (*EmptySuccess, error) {
  293. return nil, status.Errorf(codes.Unimplemented, "method OnSessionTakenover not implemented")
  294. }
  295. func (UnimplementedHookProviderServer) OnSessionTerminated(context.Context, *SessionTerminatedRequest) (*EmptySuccess, error) {
  296. return nil, status.Errorf(codes.Unimplemented, "method OnSessionTerminated not implemented")
  297. }
  298. func (UnimplementedHookProviderServer) OnMessagePublish(context.Context, *MessagePublishRequest) (*ValuedResponse, error) {
  299. return nil, status.Errorf(codes.Unimplemented, "method OnMessagePublish not implemented")
  300. }
  301. func (UnimplementedHookProviderServer) OnMessageDelivered(context.Context, *MessageDeliveredRequest) (*EmptySuccess, error) {
  302. return nil, status.Errorf(codes.Unimplemented, "method OnMessageDelivered not implemented")
  303. }
  304. func (UnimplementedHookProviderServer) OnMessageDropped(context.Context, *MessageDroppedRequest) (*EmptySuccess, error) {
  305. return nil, status.Errorf(codes.Unimplemented, "method OnMessageDropped not implemented")
  306. }
  307. func (UnimplementedHookProviderServer) OnMessageAcked(context.Context, *MessageAckedRequest) (*EmptySuccess, error) {
  308. return nil, status.Errorf(codes.Unimplemented, "method OnMessageAcked not implemented")
  309. }
  310. func (UnimplementedHookProviderServer) mustEmbedUnimplementedHookProviderServer() {}
  311. // UnsafeHookProviderServer may be embedded to opt out of forward compatibility for this service.
  312. // Use of this interface is not recommended, as added methods to HookProviderServer will
  313. // result in compilation errors.
  314. type UnsafeHookProviderServer interface {
  315. mustEmbedUnimplementedHookProviderServer()
  316. }
  317. func RegisterHookProviderServer(s grpc.ServiceRegistrar, srv HookProviderServer) {
  318. s.RegisterService(&HookProvider_ServiceDesc, srv)
  319. }
  320. func _HookProvider_OnProviderLoaded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  321. in := new(ProviderLoadedRequest)
  322. if err := dec(in); err != nil {
  323. return nil, err
  324. }
  325. if interceptor == nil {
  326. return srv.(HookProviderServer).OnProviderLoaded(ctx, in)
  327. }
  328. info := &grpc.UnaryServerInfo{
  329. Server: srv,
  330. FullMethod: "/emqx.exhook.v2.HookProvider/OnProviderLoaded",
  331. }
  332. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  333. return srv.(HookProviderServer).OnProviderLoaded(ctx, req.(*ProviderLoadedRequest))
  334. }
  335. return interceptor(ctx, in, info, handler)
  336. }
  337. func _HookProvider_OnProviderUnloaded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  338. in := new(ProviderUnloadedRequest)
  339. if err := dec(in); err != nil {
  340. return nil, err
  341. }
  342. if interceptor == nil {
  343. return srv.(HookProviderServer).OnProviderUnloaded(ctx, in)
  344. }
  345. info := &grpc.UnaryServerInfo{
  346. Server: srv,
  347. FullMethod: "/emqx.exhook.v2.HookProvider/OnProviderUnloaded",
  348. }
  349. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  350. return srv.(HookProviderServer).OnProviderUnloaded(ctx, req.(*ProviderUnloadedRequest))
  351. }
  352. return interceptor(ctx, in, info, handler)
  353. }
  354. func _HookProvider_OnClientConnect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  355. in := new(ClientConnectRequest)
  356. if err := dec(in); err != nil {
  357. return nil, err
  358. }
  359. if interceptor == nil {
  360. return srv.(HookProviderServer).OnClientConnect(ctx, in)
  361. }
  362. info := &grpc.UnaryServerInfo{
  363. Server: srv,
  364. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientConnect",
  365. }
  366. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  367. return srv.(HookProviderServer).OnClientConnect(ctx, req.(*ClientConnectRequest))
  368. }
  369. return interceptor(ctx, in, info, handler)
  370. }
  371. func _HookProvider_OnClientConnack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  372. in := new(ClientConnackRequest)
  373. if err := dec(in); err != nil {
  374. return nil, err
  375. }
  376. if interceptor == nil {
  377. return srv.(HookProviderServer).OnClientConnack(ctx, in)
  378. }
  379. info := &grpc.UnaryServerInfo{
  380. Server: srv,
  381. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientConnack",
  382. }
  383. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  384. return srv.(HookProviderServer).OnClientConnack(ctx, req.(*ClientConnackRequest))
  385. }
  386. return interceptor(ctx, in, info, handler)
  387. }
  388. func _HookProvider_OnClientConnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  389. in := new(ClientConnectedRequest)
  390. if err := dec(in); err != nil {
  391. return nil, err
  392. }
  393. if interceptor == nil {
  394. return srv.(HookProviderServer).OnClientConnected(ctx, in)
  395. }
  396. info := &grpc.UnaryServerInfo{
  397. Server: srv,
  398. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientConnected",
  399. }
  400. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  401. return srv.(HookProviderServer).OnClientConnected(ctx, req.(*ClientConnectedRequest))
  402. }
  403. return interceptor(ctx, in, info, handler)
  404. }
  405. func _HookProvider_OnClientDisconnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  406. in := new(ClientDisconnectedRequest)
  407. if err := dec(in); err != nil {
  408. return nil, err
  409. }
  410. if interceptor == nil {
  411. return srv.(HookProviderServer).OnClientDisconnected(ctx, in)
  412. }
  413. info := &grpc.UnaryServerInfo{
  414. Server: srv,
  415. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientDisconnected",
  416. }
  417. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  418. return srv.(HookProviderServer).OnClientDisconnected(ctx, req.(*ClientDisconnectedRequest))
  419. }
  420. return interceptor(ctx, in, info, handler)
  421. }
  422. func _HookProvider_OnClientAuthenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  423. in := new(ClientAuthenticateRequest)
  424. if err := dec(in); err != nil {
  425. return nil, err
  426. }
  427. if interceptor == nil {
  428. return srv.(HookProviderServer).OnClientAuthenticate(ctx, in)
  429. }
  430. info := &grpc.UnaryServerInfo{
  431. Server: srv,
  432. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientAuthenticate",
  433. }
  434. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  435. return srv.(HookProviderServer).OnClientAuthenticate(ctx, req.(*ClientAuthenticateRequest))
  436. }
  437. return interceptor(ctx, in, info, handler)
  438. }
  439. func _HookProvider_OnClientAuthorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  440. in := new(ClientAuthorizeRequest)
  441. if err := dec(in); err != nil {
  442. return nil, err
  443. }
  444. if interceptor == nil {
  445. return srv.(HookProviderServer).OnClientAuthorize(ctx, in)
  446. }
  447. info := &grpc.UnaryServerInfo{
  448. Server: srv,
  449. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientAuthorize",
  450. }
  451. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  452. return srv.(HookProviderServer).OnClientAuthorize(ctx, req.(*ClientAuthorizeRequest))
  453. }
  454. return interceptor(ctx, in, info, handler)
  455. }
  456. func _HookProvider_OnClientSubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  457. in := new(ClientSubscribeRequest)
  458. if err := dec(in); err != nil {
  459. return nil, err
  460. }
  461. if interceptor == nil {
  462. return srv.(HookProviderServer).OnClientSubscribe(ctx, in)
  463. }
  464. info := &grpc.UnaryServerInfo{
  465. Server: srv,
  466. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientSubscribe",
  467. }
  468. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  469. return srv.(HookProviderServer).OnClientSubscribe(ctx, req.(*ClientSubscribeRequest))
  470. }
  471. return interceptor(ctx, in, info, handler)
  472. }
  473. func _HookProvider_OnClientUnsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  474. in := new(ClientUnsubscribeRequest)
  475. if err := dec(in); err != nil {
  476. return nil, err
  477. }
  478. if interceptor == nil {
  479. return srv.(HookProviderServer).OnClientUnsubscribe(ctx, in)
  480. }
  481. info := &grpc.UnaryServerInfo{
  482. Server: srv,
  483. FullMethod: "/emqx.exhook.v2.HookProvider/OnClientUnsubscribe",
  484. }
  485. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  486. return srv.(HookProviderServer).OnClientUnsubscribe(ctx, req.(*ClientUnsubscribeRequest))
  487. }
  488. return interceptor(ctx, in, info, handler)
  489. }
  490. func _HookProvider_OnSessionCreated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  491. in := new(SessionCreatedRequest)
  492. if err := dec(in); err != nil {
  493. return nil, err
  494. }
  495. if interceptor == nil {
  496. return srv.(HookProviderServer).OnSessionCreated(ctx, in)
  497. }
  498. info := &grpc.UnaryServerInfo{
  499. Server: srv,
  500. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionCreated",
  501. }
  502. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  503. return srv.(HookProviderServer).OnSessionCreated(ctx, req.(*SessionCreatedRequest))
  504. }
  505. return interceptor(ctx, in, info, handler)
  506. }
  507. func _HookProvider_OnSessionSubscribed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  508. in := new(SessionSubscribedRequest)
  509. if err := dec(in); err != nil {
  510. return nil, err
  511. }
  512. if interceptor == nil {
  513. return srv.(HookProviderServer).OnSessionSubscribed(ctx, in)
  514. }
  515. info := &grpc.UnaryServerInfo{
  516. Server: srv,
  517. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionSubscribed",
  518. }
  519. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  520. return srv.(HookProviderServer).OnSessionSubscribed(ctx, req.(*SessionSubscribedRequest))
  521. }
  522. return interceptor(ctx, in, info, handler)
  523. }
  524. func _HookProvider_OnSessionUnsubscribed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  525. in := new(SessionUnsubscribedRequest)
  526. if err := dec(in); err != nil {
  527. return nil, err
  528. }
  529. if interceptor == nil {
  530. return srv.(HookProviderServer).OnSessionUnsubscribed(ctx, in)
  531. }
  532. info := &grpc.UnaryServerInfo{
  533. Server: srv,
  534. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionUnsubscribed",
  535. }
  536. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  537. return srv.(HookProviderServer).OnSessionUnsubscribed(ctx, req.(*SessionUnsubscribedRequest))
  538. }
  539. return interceptor(ctx, in, info, handler)
  540. }
  541. func _HookProvider_OnSessionResumed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  542. in := new(SessionResumedRequest)
  543. if err := dec(in); err != nil {
  544. return nil, err
  545. }
  546. if interceptor == nil {
  547. return srv.(HookProviderServer).OnSessionResumed(ctx, in)
  548. }
  549. info := &grpc.UnaryServerInfo{
  550. Server: srv,
  551. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionResumed",
  552. }
  553. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  554. return srv.(HookProviderServer).OnSessionResumed(ctx, req.(*SessionResumedRequest))
  555. }
  556. return interceptor(ctx, in, info, handler)
  557. }
  558. func _HookProvider_OnSessionDiscarded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  559. in := new(SessionDiscardedRequest)
  560. if err := dec(in); err != nil {
  561. return nil, err
  562. }
  563. if interceptor == nil {
  564. return srv.(HookProviderServer).OnSessionDiscarded(ctx, in)
  565. }
  566. info := &grpc.UnaryServerInfo{
  567. Server: srv,
  568. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionDiscarded",
  569. }
  570. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  571. return srv.(HookProviderServer).OnSessionDiscarded(ctx, req.(*SessionDiscardedRequest))
  572. }
  573. return interceptor(ctx, in, info, handler)
  574. }
  575. func _HookProvider_OnSessionTakenover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  576. in := new(SessionTakenoverRequest)
  577. if err := dec(in); err != nil {
  578. return nil, err
  579. }
  580. if interceptor == nil {
  581. return srv.(HookProviderServer).OnSessionTakenover(ctx, in)
  582. }
  583. info := &grpc.UnaryServerInfo{
  584. Server: srv,
  585. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionTakenover",
  586. }
  587. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  588. return srv.(HookProviderServer).OnSessionTakenover(ctx, req.(*SessionTakenoverRequest))
  589. }
  590. return interceptor(ctx, in, info, handler)
  591. }
  592. func _HookProvider_OnSessionTerminated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  593. in := new(SessionTerminatedRequest)
  594. if err := dec(in); err != nil {
  595. return nil, err
  596. }
  597. if interceptor == nil {
  598. return srv.(HookProviderServer).OnSessionTerminated(ctx, in)
  599. }
  600. info := &grpc.UnaryServerInfo{
  601. Server: srv,
  602. FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionTerminated",
  603. }
  604. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  605. return srv.(HookProviderServer).OnSessionTerminated(ctx, req.(*SessionTerminatedRequest))
  606. }
  607. return interceptor(ctx, in, info, handler)
  608. }
  609. func _HookProvider_OnMessagePublish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  610. in := new(MessagePublishRequest)
  611. if err := dec(in); err != nil {
  612. return nil, err
  613. }
  614. if interceptor == nil {
  615. return srv.(HookProviderServer).OnMessagePublish(ctx, in)
  616. }
  617. info := &grpc.UnaryServerInfo{
  618. Server: srv,
  619. FullMethod: "/emqx.exhook.v2.HookProvider/OnMessagePublish",
  620. }
  621. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  622. return srv.(HookProviderServer).OnMessagePublish(ctx, req.(*MessagePublishRequest))
  623. }
  624. return interceptor(ctx, in, info, handler)
  625. }
  626. func _HookProvider_OnMessageDelivered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  627. in := new(MessageDeliveredRequest)
  628. if err := dec(in); err != nil {
  629. return nil, err
  630. }
  631. if interceptor == nil {
  632. return srv.(HookProviderServer).OnMessageDelivered(ctx, in)
  633. }
  634. info := &grpc.UnaryServerInfo{
  635. Server: srv,
  636. FullMethod: "/emqx.exhook.v2.HookProvider/OnMessageDelivered",
  637. }
  638. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  639. return srv.(HookProviderServer).OnMessageDelivered(ctx, req.(*MessageDeliveredRequest))
  640. }
  641. return interceptor(ctx, in, info, handler)
  642. }
  643. func _HookProvider_OnMessageDropped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  644. in := new(MessageDroppedRequest)
  645. if err := dec(in); err != nil {
  646. return nil, err
  647. }
  648. if interceptor == nil {
  649. return srv.(HookProviderServer).OnMessageDropped(ctx, in)
  650. }
  651. info := &grpc.UnaryServerInfo{
  652. Server: srv,
  653. FullMethod: "/emqx.exhook.v2.HookProvider/OnMessageDropped",
  654. }
  655. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  656. return srv.(HookProviderServer).OnMessageDropped(ctx, req.(*MessageDroppedRequest))
  657. }
  658. return interceptor(ctx, in, info, handler)
  659. }
  660. func _HookProvider_OnMessageAcked_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  661. in := new(MessageAckedRequest)
  662. if err := dec(in); err != nil {
  663. return nil, err
  664. }
  665. if interceptor == nil {
  666. return srv.(HookProviderServer).OnMessageAcked(ctx, in)
  667. }
  668. info := &grpc.UnaryServerInfo{
  669. Server: srv,
  670. FullMethod: "/emqx.exhook.v2.HookProvider/OnMessageAcked",
  671. }
  672. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  673. return srv.(HookProviderServer).OnMessageAcked(ctx, req.(*MessageAckedRequest))
  674. }
  675. return interceptor(ctx, in, info, handler)
  676. }
  677. // HookProvider_ServiceDesc is the grpc.ServiceDesc for HookProvider service.
  678. // It's only intended for direct use with grpc.RegisterService,
  679. // and not to be introspected or modified (even as a copy)
  680. var HookProvider_ServiceDesc = grpc.ServiceDesc{
  681. ServiceName: "emqx.exhook.v2.HookProvider",
  682. HandlerType: (*HookProviderServer)(nil),
  683. Methods: []grpc.MethodDesc{
  684. {
  685. MethodName: "OnProviderLoaded",
  686. Handler: _HookProvider_OnProviderLoaded_Handler,
  687. },
  688. {
  689. MethodName: "OnProviderUnloaded",
  690. Handler: _HookProvider_OnProviderUnloaded_Handler,
  691. },
  692. {
  693. MethodName: "OnClientConnect",
  694. Handler: _HookProvider_OnClientConnect_Handler,
  695. },
  696. {
  697. MethodName: "OnClientConnack",
  698. Handler: _HookProvider_OnClientConnack_Handler,
  699. },
  700. {
  701. MethodName: "OnClientConnected",
  702. Handler: _HookProvider_OnClientConnected_Handler,
  703. },
  704. {
  705. MethodName: "OnClientDisconnected",
  706. Handler: _HookProvider_OnClientDisconnected_Handler,
  707. },
  708. {
  709. MethodName: "OnClientAuthenticate",
  710. Handler: _HookProvider_OnClientAuthenticate_Handler,
  711. },
  712. {
  713. MethodName: "OnClientAuthorize",
  714. Handler: _HookProvider_OnClientAuthorize_Handler,
  715. },
  716. {
  717. MethodName: "OnClientSubscribe",
  718. Handler: _HookProvider_OnClientSubscribe_Handler,
  719. },
  720. {
  721. MethodName: "OnClientUnsubscribe",
  722. Handler: _HookProvider_OnClientUnsubscribe_Handler,
  723. },
  724. {
  725. MethodName: "OnSessionCreated",
  726. Handler: _HookProvider_OnSessionCreated_Handler,
  727. },
  728. {
  729. MethodName: "OnSessionSubscribed",
  730. Handler: _HookProvider_OnSessionSubscribed_Handler,
  731. },
  732. {
  733. MethodName: "OnSessionUnsubscribed",
  734. Handler: _HookProvider_OnSessionUnsubscribed_Handler,
  735. },
  736. {
  737. MethodName: "OnSessionResumed",
  738. Handler: _HookProvider_OnSessionResumed_Handler,
  739. },
  740. {
  741. MethodName: "OnSessionDiscarded",
  742. Handler: _HookProvider_OnSessionDiscarded_Handler,
  743. },
  744. {
  745. MethodName: "OnSessionTakenover",
  746. Handler: _HookProvider_OnSessionTakenover_Handler,
  747. },
  748. {
  749. MethodName: "OnSessionTerminated",
  750. Handler: _HookProvider_OnSessionTerminated_Handler,
  751. },
  752. {
  753. MethodName: "OnMessagePublish",
  754. Handler: _HookProvider_OnMessagePublish_Handler,
  755. },
  756. {
  757. MethodName: "OnMessageDelivered",
  758. Handler: _HookProvider_OnMessageDelivered_Handler,
  759. },
  760. {
  761. MethodName: "OnMessageDropped",
  762. Handler: _HookProvider_OnMessageDropped_Handler,
  763. },
  764. {
  765. MethodName: "OnMessageAcked",
  766. Handler: _HookProvider_OnMessageAcked_Handler,
  767. },
  768. },
  769. Streams: []grpc.StreamDesc{},
  770. Metadata: "protobuf/exhook.proto",
  771. }