mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-18 22:34:22 +01:00
use encrypted request for subscribe notifications
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.12
|
||||
// - protoc v4.23.4
|
||||
// source: notifications.proto
|
||||
|
||||
package notifications
|
||||
@@ -22,7 +22,7 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// 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 NotificationsClient interface {
|
||||
SubscribeNotifications(ctx context.Context, in *SubscribeNotificationsRequest, opts ...grpc.CallOption) (*SubscribeNotificationsReply, error)
|
||||
SubscribeNotifications(ctx context.Context, in *EncryptedNotificationRequest, opts ...grpc.CallOption) (*SubscribeNotificationsReply, error)
|
||||
}
|
||||
|
||||
type notificationsClient struct {
|
||||
@@ -33,7 +33,7 @@ func NewNotificationsClient(cc grpc.ClientConnInterface) NotificationsClient {
|
||||
return ¬ificationsClient{cc}
|
||||
}
|
||||
|
||||
func (c *notificationsClient) SubscribeNotifications(ctx context.Context, in *SubscribeNotificationsRequest, opts ...grpc.CallOption) (*SubscribeNotificationsReply, error) {
|
||||
func (c *notificationsClient) SubscribeNotifications(ctx context.Context, in *EncryptedNotificationRequest, opts ...grpc.CallOption) (*SubscribeNotificationsReply, error) {
|
||||
out := new(SubscribeNotificationsReply)
|
||||
err := c.cc.Invoke(ctx, "/notifications.Notifications/SubscribeNotifications", in, out, opts...)
|
||||
if err != nil {
|
||||
@@ -46,7 +46,7 @@ func (c *notificationsClient) SubscribeNotifications(ctx context.Context, in *Su
|
||||
// All implementations must embed UnimplementedNotificationsServer
|
||||
// for forward compatibility
|
||||
type NotificationsServer interface {
|
||||
SubscribeNotifications(context.Context, *SubscribeNotificationsRequest) (*SubscribeNotificationsReply, error)
|
||||
SubscribeNotifications(context.Context, *EncryptedNotificationRequest) (*SubscribeNotificationsReply, error)
|
||||
mustEmbedUnimplementedNotificationsServer()
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ type NotificationsServer interface {
|
||||
type UnimplementedNotificationsServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedNotificationsServer) SubscribeNotifications(context.Context, *SubscribeNotificationsRequest) (*SubscribeNotificationsReply, error) {
|
||||
func (UnimplementedNotificationsServer) SubscribeNotifications(context.Context, *EncryptedNotificationRequest) (*SubscribeNotificationsReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SubscribeNotifications not implemented")
|
||||
}
|
||||
func (UnimplementedNotificationsServer) mustEmbedUnimplementedNotificationsServer() {}
|
||||
@@ -71,7 +71,7 @@ func RegisterNotificationsServer(s grpc.ServiceRegistrar, srv NotificationsServe
|
||||
}
|
||||
|
||||
func _Notifications_SubscribeNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SubscribeNotificationsRequest)
|
||||
in := new(EncryptedNotificationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -83,7 +83,7 @@ func _Notifications_SubscribeNotifications_Handler(srv interface{}, ctx context.
|
||||
FullMethod: "/notifications.Notifications/SubscribeNotifications",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NotificationsServer).SubscribeNotifications(ctx, req.(*SubscribeNotificationsRequest))
|
||||
return srv.(NotificationsServer).SubscribeNotifications(ctx, req.(*EncryptedNotificationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user