123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v3.18.1
- // source: protobuf/exhook.proto
- package exhook
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- // HookProviderClient is the client API for HookProvider service.
- //
- // 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.
- type HookProviderClient interface {
- OnProviderLoaded(ctx context.Context, in *ProviderLoadedRequest, opts ...grpc.CallOption) (*LoadedResponse, error)
- OnProviderUnloaded(ctx context.Context, in *ProviderUnloadedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnClientConnect(ctx context.Context, in *ClientConnectRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnClientConnack(ctx context.Context, in *ClientConnackRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnClientConnected(ctx context.Context, in *ClientConnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnClientDisconnected(ctx context.Context, in *ClientDisconnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnClientAuthenticate(ctx context.Context, in *ClientAuthenticateRequest, opts ...grpc.CallOption) (*ValuedResponse, error)
- OnClientAuthorize(ctx context.Context, in *ClientAuthorizeRequest, opts ...grpc.CallOption) (*ValuedResponse, error)
- OnClientSubscribe(ctx context.Context, in *ClientSubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnClientUnsubscribe(ctx context.Context, in *ClientUnsubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionCreated(ctx context.Context, in *SessionCreatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionSubscribed(ctx context.Context, in *SessionSubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionUnsubscribed(ctx context.Context, in *SessionUnsubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionResumed(ctx context.Context, in *SessionResumedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionDiscarded(ctx context.Context, in *SessionDiscardedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionTakenover(ctx context.Context, in *SessionTakenoverRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnSessionTerminated(ctx context.Context, in *SessionTerminatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnMessagePublish(ctx context.Context, in *MessagePublishRequest, opts ...grpc.CallOption) (*ValuedResponse, error)
- OnMessageDelivered(ctx context.Context, in *MessageDeliveredRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnMessageDropped(ctx context.Context, in *MessageDroppedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- OnMessageAcked(ctx context.Context, in *MessageAckedRequest, opts ...grpc.CallOption) (*EmptySuccess, error)
- }
- type hookProviderClient struct {
- cc grpc.ClientConnInterface
- }
- func NewHookProviderClient(cc grpc.ClientConnInterface) HookProviderClient {
- return &hookProviderClient{cc}
- }
- func (c *hookProviderClient) OnProviderLoaded(ctx context.Context, in *ProviderLoadedRequest, opts ...grpc.CallOption) (*LoadedResponse, error) {
- out := new(LoadedResponse)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnProviderLoaded", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnProviderUnloaded(ctx context.Context, in *ProviderUnloadedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnProviderUnloaded", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientConnect(ctx context.Context, in *ClientConnectRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientConnect", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientConnack(ctx context.Context, in *ClientConnackRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientConnack", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientConnected(ctx context.Context, in *ClientConnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientConnected", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientDisconnected(ctx context.Context, in *ClientDisconnectedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientDisconnected", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientAuthenticate(ctx context.Context, in *ClientAuthenticateRequest, opts ...grpc.CallOption) (*ValuedResponse, error) {
- out := new(ValuedResponse)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientAuthenticate", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientAuthorize(ctx context.Context, in *ClientAuthorizeRequest, opts ...grpc.CallOption) (*ValuedResponse, error) {
- out := new(ValuedResponse)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientAuthorize", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientSubscribe(ctx context.Context, in *ClientSubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientSubscribe", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnClientUnsubscribe(ctx context.Context, in *ClientUnsubscribeRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnClientUnsubscribe", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionCreated(ctx context.Context, in *SessionCreatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionCreated", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionSubscribed(ctx context.Context, in *SessionSubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionSubscribed", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionUnsubscribed(ctx context.Context, in *SessionUnsubscribedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionUnsubscribed", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionResumed(ctx context.Context, in *SessionResumedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionResumed", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionDiscarded(ctx context.Context, in *SessionDiscardedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionDiscarded", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionTakenover(ctx context.Context, in *SessionTakenoverRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionTakenover", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnSessionTerminated(ctx context.Context, in *SessionTerminatedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnSessionTerminated", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnMessagePublish(ctx context.Context, in *MessagePublishRequest, opts ...grpc.CallOption) (*ValuedResponse, error) {
- out := new(ValuedResponse)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessagePublish", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnMessageDelivered(ctx context.Context, in *MessageDeliveredRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessageDelivered", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnMessageDropped(ctx context.Context, in *MessageDroppedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessageDropped", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *hookProviderClient) OnMessageAcked(ctx context.Context, in *MessageAckedRequest, opts ...grpc.CallOption) (*EmptySuccess, error) {
- out := new(EmptySuccess)
- err := c.cc.Invoke(ctx, "/emqx.exhook.v2.HookProvider/OnMessageAcked", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // HookProviderServer is the server API for HookProvider service.
- // All implementations must embed UnimplementedHookProviderServer
- // for forward compatibility
- type HookProviderServer interface {
- OnProviderLoaded(context.Context, *ProviderLoadedRequest) (*LoadedResponse, error)
- OnProviderUnloaded(context.Context, *ProviderUnloadedRequest) (*EmptySuccess, error)
- OnClientConnect(context.Context, *ClientConnectRequest) (*EmptySuccess, error)
- OnClientConnack(context.Context, *ClientConnackRequest) (*EmptySuccess, error)
- OnClientConnected(context.Context, *ClientConnectedRequest) (*EmptySuccess, error)
- OnClientDisconnected(context.Context, *ClientDisconnectedRequest) (*EmptySuccess, error)
- OnClientAuthenticate(context.Context, *ClientAuthenticateRequest) (*ValuedResponse, error)
- OnClientAuthorize(context.Context, *ClientAuthorizeRequest) (*ValuedResponse, error)
- OnClientSubscribe(context.Context, *ClientSubscribeRequest) (*EmptySuccess, error)
- OnClientUnsubscribe(context.Context, *ClientUnsubscribeRequest) (*EmptySuccess, error)
- OnSessionCreated(context.Context, *SessionCreatedRequest) (*EmptySuccess, error)
- OnSessionSubscribed(context.Context, *SessionSubscribedRequest) (*EmptySuccess, error)
- OnSessionUnsubscribed(context.Context, *SessionUnsubscribedRequest) (*EmptySuccess, error)
- OnSessionResumed(context.Context, *SessionResumedRequest) (*EmptySuccess, error)
- OnSessionDiscarded(context.Context, *SessionDiscardedRequest) (*EmptySuccess, error)
- OnSessionTakenover(context.Context, *SessionTakenoverRequest) (*EmptySuccess, error)
- OnSessionTerminated(context.Context, *SessionTerminatedRequest) (*EmptySuccess, error)
- OnMessagePublish(context.Context, *MessagePublishRequest) (*ValuedResponse, error)
- OnMessageDelivered(context.Context, *MessageDeliveredRequest) (*EmptySuccess, error)
- OnMessageDropped(context.Context, *MessageDroppedRequest) (*EmptySuccess, error)
- OnMessageAcked(context.Context, *MessageAckedRequest) (*EmptySuccess, error)
- mustEmbedUnimplementedHookProviderServer()
- }
- // UnimplementedHookProviderServer must be embedded to have forward compatible implementations.
- type UnimplementedHookProviderServer struct {
- }
- func (UnimplementedHookProviderServer) OnProviderLoaded(context.Context, *ProviderLoadedRequest) (*LoadedResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnProviderLoaded not implemented")
- }
- func (UnimplementedHookProviderServer) OnProviderUnloaded(context.Context, *ProviderUnloadedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnProviderUnloaded not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientConnect(context.Context, *ClientConnectRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientConnect not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientConnack(context.Context, *ClientConnackRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientConnack not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientConnected(context.Context, *ClientConnectedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientConnected not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientDisconnected(context.Context, *ClientDisconnectedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientDisconnected not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientAuthenticate(context.Context, *ClientAuthenticateRequest) (*ValuedResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientAuthenticate not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientAuthorize(context.Context, *ClientAuthorizeRequest) (*ValuedResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientAuthorize not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientSubscribe(context.Context, *ClientSubscribeRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientSubscribe not implemented")
- }
- func (UnimplementedHookProviderServer) OnClientUnsubscribe(context.Context, *ClientUnsubscribeRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnClientUnsubscribe not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionCreated(context.Context, *SessionCreatedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionCreated not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionSubscribed(context.Context, *SessionSubscribedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionSubscribed not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionUnsubscribed(context.Context, *SessionUnsubscribedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionUnsubscribed not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionResumed(context.Context, *SessionResumedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionResumed not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionDiscarded(context.Context, *SessionDiscardedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionDiscarded not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionTakenover(context.Context, *SessionTakenoverRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionTakenover not implemented")
- }
- func (UnimplementedHookProviderServer) OnSessionTerminated(context.Context, *SessionTerminatedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnSessionTerminated not implemented")
- }
- func (UnimplementedHookProviderServer) OnMessagePublish(context.Context, *MessagePublishRequest) (*ValuedResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnMessagePublish not implemented")
- }
- func (UnimplementedHookProviderServer) OnMessageDelivered(context.Context, *MessageDeliveredRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnMessageDelivered not implemented")
- }
- func (UnimplementedHookProviderServer) OnMessageDropped(context.Context, *MessageDroppedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnMessageDropped not implemented")
- }
- func (UnimplementedHookProviderServer) OnMessageAcked(context.Context, *MessageAckedRequest) (*EmptySuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method OnMessageAcked not implemented")
- }
- func (UnimplementedHookProviderServer) mustEmbedUnimplementedHookProviderServer() {}
- // UnsafeHookProviderServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to HookProviderServer will
- // result in compilation errors.
- type UnsafeHookProviderServer interface {
- mustEmbedUnimplementedHookProviderServer()
- }
- func RegisterHookProviderServer(s grpc.ServiceRegistrar, srv HookProviderServer) {
- s.RegisterService(&HookProvider_ServiceDesc, srv)
- }
- func _HookProvider_OnProviderLoaded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ProviderLoadedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnProviderLoaded(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnProviderLoaded",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnProviderLoaded(ctx, req.(*ProviderLoadedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnProviderUnloaded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ProviderUnloadedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnProviderUnloaded(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnProviderUnloaded",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnProviderUnloaded(ctx, req.(*ProviderUnloadedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientConnect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientConnectRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientConnect(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientConnect",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientConnect(ctx, req.(*ClientConnectRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientConnack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientConnackRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientConnack(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientConnack",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientConnack(ctx, req.(*ClientConnackRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientConnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientConnectedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientConnected(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientConnected",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientConnected(ctx, req.(*ClientConnectedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientDisconnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientDisconnectedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientDisconnected(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientDisconnected",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientDisconnected(ctx, req.(*ClientDisconnectedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientAuthenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientAuthenticateRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientAuthenticate(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientAuthenticate",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientAuthenticate(ctx, req.(*ClientAuthenticateRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientAuthorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientAuthorizeRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientAuthorize(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientAuthorize",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientAuthorize(ctx, req.(*ClientAuthorizeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientSubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientSubscribeRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientSubscribe(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientSubscribe",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientSubscribe(ctx, req.(*ClientSubscribeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnClientUnsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ClientUnsubscribeRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnClientUnsubscribe(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnClientUnsubscribe",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnClientUnsubscribe(ctx, req.(*ClientUnsubscribeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionCreated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionCreatedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionCreated(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionCreated",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionCreated(ctx, req.(*SessionCreatedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionSubscribed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionSubscribedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionSubscribed(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionSubscribed",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionSubscribed(ctx, req.(*SessionSubscribedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionUnsubscribed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionUnsubscribedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionUnsubscribed(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionUnsubscribed",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionUnsubscribed(ctx, req.(*SessionUnsubscribedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionResumed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionResumedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionResumed(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionResumed",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionResumed(ctx, req.(*SessionResumedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionDiscarded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionDiscardedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionDiscarded(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionDiscarded",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionDiscarded(ctx, req.(*SessionDiscardedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionTakenover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionTakenoverRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionTakenover(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionTakenover",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionTakenover(ctx, req.(*SessionTakenoverRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnSessionTerminated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SessionTerminatedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnSessionTerminated(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnSessionTerminated",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnSessionTerminated(ctx, req.(*SessionTerminatedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnMessagePublish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MessagePublishRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnMessagePublish(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnMessagePublish",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnMessagePublish(ctx, req.(*MessagePublishRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnMessageDelivered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MessageDeliveredRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnMessageDelivered(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnMessageDelivered",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnMessageDelivered(ctx, req.(*MessageDeliveredRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnMessageDropped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MessageDroppedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnMessageDropped(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnMessageDropped",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnMessageDropped(ctx, req.(*MessageDroppedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _HookProvider_OnMessageAcked_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MessageAckedRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(HookProviderServer).OnMessageAcked(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/emqx.exhook.v2.HookProvider/OnMessageAcked",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(HookProviderServer).OnMessageAcked(ctx, req.(*MessageAckedRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // HookProvider_ServiceDesc is the grpc.ServiceDesc for HookProvider service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var HookProvider_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "emqx.exhook.v2.HookProvider",
- HandlerType: (*HookProviderServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "OnProviderLoaded",
- Handler: _HookProvider_OnProviderLoaded_Handler,
- },
- {
- MethodName: "OnProviderUnloaded",
- Handler: _HookProvider_OnProviderUnloaded_Handler,
- },
- {
- MethodName: "OnClientConnect",
- Handler: _HookProvider_OnClientConnect_Handler,
- },
- {
- MethodName: "OnClientConnack",
- Handler: _HookProvider_OnClientConnack_Handler,
- },
- {
- MethodName: "OnClientConnected",
- Handler: _HookProvider_OnClientConnected_Handler,
- },
- {
- MethodName: "OnClientDisconnected",
- Handler: _HookProvider_OnClientDisconnected_Handler,
- },
- {
- MethodName: "OnClientAuthenticate",
- Handler: _HookProvider_OnClientAuthenticate_Handler,
- },
- {
- MethodName: "OnClientAuthorize",
- Handler: _HookProvider_OnClientAuthorize_Handler,
- },
- {
- MethodName: "OnClientSubscribe",
- Handler: _HookProvider_OnClientSubscribe_Handler,
- },
- {
- MethodName: "OnClientUnsubscribe",
- Handler: _HookProvider_OnClientUnsubscribe_Handler,
- },
- {
- MethodName: "OnSessionCreated",
- Handler: _HookProvider_OnSessionCreated_Handler,
- },
- {
- MethodName: "OnSessionSubscribed",
- Handler: _HookProvider_OnSessionSubscribed_Handler,
- },
- {
- MethodName: "OnSessionUnsubscribed",
- Handler: _HookProvider_OnSessionUnsubscribed_Handler,
- },
- {
- MethodName: "OnSessionResumed",
- Handler: _HookProvider_OnSessionResumed_Handler,
- },
- {
- MethodName: "OnSessionDiscarded",
- Handler: _HookProvider_OnSessionDiscarded_Handler,
- },
- {
- MethodName: "OnSessionTakenover",
- Handler: _HookProvider_OnSessionTakenover_Handler,
- },
- {
- MethodName: "OnSessionTerminated",
- Handler: _HookProvider_OnSessionTerminated_Handler,
- },
- {
- MethodName: "OnMessagePublish",
- Handler: _HookProvider_OnMessagePublish_Handler,
- },
- {
- MethodName: "OnMessageDelivered",
- Handler: _HookProvider_OnMessageDelivered_Handler,
- },
- {
- MethodName: "OnMessageDropped",
- Handler: _HookProvider_OnMessageDropped_Handler,
- },
- {
- MethodName: "OnMessageAcked",
- Handler: _HookProvider_OnMessageAcked_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "protobuf/exhook.proto",
- }
|