chore: auto-generate protobuf files [skip ci]

This commit is contained in:
github-actions[bot]
2026-04-16 06:49:25 +00:00
parent 64a51f1b52
commit a55fc96a6d
5 changed files with 1585 additions and 0 deletions

View File

@@ -0,0 +1,293 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v4.25.9
// source: notifications/notifications.proto
// Указываем пакет для логической изоляции
package pb
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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
NotificationService_GetUserNotifications_FullMethodName = "/notifications.v1.NotificationService/GetUserNotifications"
NotificationService_GetUnreadCount_FullMethodName = "/notifications.v1.NotificationService/GetUnreadCount"
NotificationService_MarkAsRead_FullMethodName = "/notifications.v1.NotificationService/MarkAsRead"
NotificationService_MarkAllAsRead_FullMethodName = "/notifications.v1.NotificationService/MarkAllAsRead"
NotificationService_SendNotification_FullMethodName = "/notifications.v1.NotificationService/SendNotification"
)
// NotificationServiceClient is the client API for NotificationService 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 NotificationServiceClient interface {
// Получить список уведомлений пользователя с пагинацией
GetUserNotifications(ctx context.Context, in *GetNotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsResponse, error)
// Получить количество непрочитанных уведомлений (для бейджика на иконке)
GetUnreadCount(ctx context.Context, in *GetUnreadCountRequest, opts ...grpc.CallOption) (*GetUnreadCountResponse, error)
// Отметить конкретное уведомление как прочитанное
MarkAsRead(ctx context.Context, in *MarkAsReadRequest, opts ...grpc.CallOption) (*MarkAsReadResponse, error)
// Отметить все уведомления пользователя как прочитанные
MarkAllAsRead(ctx context.Context, in *MarkAllAsReadRequest, opts ...grpc.CallOption) (*MarkAllAsReadResponse, error)
// Отправить уведомление (CRM/ERP вызывает этот метод, а NestJS уже кидает в RabbitMQ)
SendNotification(ctx context.Context, in *SendNotificationRequest, opts ...grpc.CallOption) (*SendNotificationResponse, error)
}
type notificationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNotificationServiceClient(cc grpc.ClientConnInterface) NotificationServiceClient {
return &notificationServiceClient{cc}
}
func (c *notificationServiceClient) GetUserNotifications(ctx context.Context, in *GetNotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetNotificationsResponse)
err := c.cc.Invoke(ctx, NotificationService_GetUserNotifications_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *notificationServiceClient) GetUnreadCount(ctx context.Context, in *GetUnreadCountRequest, opts ...grpc.CallOption) (*GetUnreadCountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUnreadCountResponse)
err := c.cc.Invoke(ctx, NotificationService_GetUnreadCount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *notificationServiceClient) MarkAsRead(ctx context.Context, in *MarkAsReadRequest, opts ...grpc.CallOption) (*MarkAsReadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MarkAsReadResponse)
err := c.cc.Invoke(ctx, NotificationService_MarkAsRead_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *notificationServiceClient) MarkAllAsRead(ctx context.Context, in *MarkAllAsReadRequest, opts ...grpc.CallOption) (*MarkAllAsReadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MarkAllAsReadResponse)
err := c.cc.Invoke(ctx, NotificationService_MarkAllAsRead_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *notificationServiceClient) SendNotification(ctx context.Context, in *SendNotificationRequest, opts ...grpc.CallOption) (*SendNotificationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SendNotificationResponse)
err := c.cc.Invoke(ctx, NotificationService_SendNotification_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// NotificationServiceServer is the server API for NotificationService service.
// All implementations must embed UnimplementedNotificationServiceServer
// for forward compatibility.
//
// -----------------------------------------------------------------------------
// Сервис Уведомлений
// -----------------------------------------------------------------------------
type NotificationServiceServer interface {
// Получить список уведомлений пользователя с пагинацией
GetUserNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error)
// Получить количество непрочитанных уведомлений (для бейджика на иконке)
GetUnreadCount(context.Context, *GetUnreadCountRequest) (*GetUnreadCountResponse, error)
// Отметить конкретное уведомление как прочитанное
MarkAsRead(context.Context, *MarkAsReadRequest) (*MarkAsReadResponse, error)
// Отметить все уведомления пользователя как прочитанные
MarkAllAsRead(context.Context, *MarkAllAsReadRequest) (*MarkAllAsReadResponse, error)
// Отправить уведомление (CRM/ERP вызывает этот метод, а NestJS уже кидает в RabbitMQ)
SendNotification(context.Context, *SendNotificationRequest) (*SendNotificationResponse, error)
mustEmbedUnimplementedNotificationServiceServer()
}
// UnimplementedNotificationServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedNotificationServiceServer struct{}
func (UnimplementedNotificationServiceServer) GetUserNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetUserNotifications not implemented")
}
func (UnimplementedNotificationServiceServer) GetUnreadCount(context.Context, *GetUnreadCountRequest) (*GetUnreadCountResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetUnreadCount not implemented")
}
func (UnimplementedNotificationServiceServer) MarkAsRead(context.Context, *MarkAsReadRequest) (*MarkAsReadResponse, error) {
return nil, status.Error(codes.Unimplemented, "method MarkAsRead not implemented")
}
func (UnimplementedNotificationServiceServer) MarkAllAsRead(context.Context, *MarkAllAsReadRequest) (*MarkAllAsReadResponse, error) {
return nil, status.Error(codes.Unimplemented, "method MarkAllAsRead not implemented")
}
func (UnimplementedNotificationServiceServer) SendNotification(context.Context, *SendNotificationRequest) (*SendNotificationResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SendNotification not implemented")
}
func (UnimplementedNotificationServiceServer) mustEmbedUnimplementedNotificationServiceServer() {}
func (UnimplementedNotificationServiceServer) testEmbeddedByValue() {}
// UnsafeNotificationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NotificationServiceServer will
// result in compilation errors.
type UnsafeNotificationServiceServer interface {
mustEmbedUnimplementedNotificationServiceServer()
}
func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer) {
// If the following call panics, it indicates UnimplementedNotificationServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&NotificationService_ServiceDesc, srv)
}
func _NotificationService_GetUserNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNotificationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).GetUserNotifications(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NotificationService_GetUserNotifications_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).GetUserNotifications(ctx, req.(*GetNotificationsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NotificationService_GetUnreadCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUnreadCountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).GetUnreadCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NotificationService_GetUnreadCount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).GetUnreadCount(ctx, req.(*GetUnreadCountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NotificationService_MarkAsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MarkAsReadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).MarkAsRead(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NotificationService_MarkAsRead_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).MarkAsRead(ctx, req.(*MarkAsReadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NotificationService_MarkAllAsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MarkAllAsReadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).MarkAllAsRead(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NotificationService_MarkAllAsRead_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).MarkAllAsRead(ctx, req.(*MarkAllAsReadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NotificationService_SendNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendNotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).SendNotification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NotificationService_SendNotification_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).SendNotification(ctx, req.(*SendNotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
// NotificationService_ServiceDesc is the grpc.ServiceDesc for NotificationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NotificationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "notifications.v1.NotificationService",
HandlerType: (*NotificationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUserNotifications",
Handler: _NotificationService_GetUserNotifications_Handler,
},
{
MethodName: "GetUnreadCount",
Handler: _NotificationService_GetUnreadCount_Handler,
},
{
MethodName: "MarkAsRead",
Handler: _NotificationService_MarkAsRead_Handler,
},
{
MethodName: "MarkAllAsRead",
Handler: _NotificationService_MarkAllAsRead_Handler,
},
{
MethodName: "SendNotification",
Handler: _NotificationService_SendNotification_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "notifications/notifications.proto",
}