// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v3.21.12 // source: subscribe.proto package proto 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 ( SubscribeService_FollowUser_FullMethodName = "/proto.SubscribeService/FollowUser" SubscribeService_UnfollowUser_FullMethodName = "/proto.SubscribeService/UnfollowUser" SubscribeService_GetFollowers_FullMethodName = "/proto.SubscribeService/GetFollowers" SubscribeService_GetFollowing_FullMethodName = "/proto.SubscribeService/GetFollowing" SubscribeService_IsFollowing_FullMethodName = "/proto.SubscribeService/IsFollowing" SubscribeService_GetSubscriptionNotifications_FullMethodName = "/proto.SubscribeService/GetSubscriptionNotifications" SubscribeService_MarkNotificationAsRead_FullMethodName = "/proto.SubscribeService/MarkNotificationAsRead" SubscribeService_GetFollowersCount_FullMethodName = "/proto.SubscribeService/GetFollowersCount" SubscribeService_GetFollowingCount_FullMethodName = "/proto.SubscribeService/GetFollowingCount" ) // SubscribeServiceClient is the client API for SubscribeService 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 SubscribeServiceClient interface { // Подписаться на пользователя FollowUser(ctx context.Context, in *FollowRequest, opts ...grpc.CallOption) (*FollowResponse, error) // Отписаться от пользователя UnfollowUser(ctx context.Context, in *UnfollowRequest, opts ...grpc.CallOption) (*UnfollowResponse, error) // Получить список подписчиков пользователя GetFollowers(ctx context.Context, in *GetFollowersRequest, opts ...grpc.CallOption) (*GetFollowersResponse, error) // Получить список подписок пользователя GetFollowing(ctx context.Context, in *GetFollowingRequest, opts ...grpc.CallOption) (*GetFollowingResponse, error) // Проверить, подписан ли пользователь на другого IsFollowing(ctx context.Context, in *IsFollowingRequest, opts ...grpc.CallOption) (*IsFollowingResponse, error) // Получить уведомления о подписках для пользователя GetSubscriptionNotifications(ctx context.Context, in *GetNotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsResponse, error) // Пометить уведомление как прочитанное MarkNotificationAsRead(ctx context.Context, in *MarkNotificationReadRequest, opts ...grpc.CallOption) (*MarkNotificationReadResponse, error) // Получить только КОЛИЧЕСТВО подписчиков GetFollowersCount(ctx context.Context, in *GetCountRequest, opts ...grpc.CallOption) (*GetCountResponse, error) // Получить только КОЛИЧЕСТВО подписок GetFollowingCount(ctx context.Context, in *GetCountRequest, opts ...grpc.CallOption) (*GetCountResponse, error) } type subscribeServiceClient struct { cc grpc.ClientConnInterface } func NewSubscribeServiceClient(cc grpc.ClientConnInterface) SubscribeServiceClient { return &subscribeServiceClient{cc} } func (c *subscribeServiceClient) FollowUser(ctx context.Context, in *FollowRequest, opts ...grpc.CallOption) (*FollowResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FollowResponse) err := c.cc.Invoke(ctx, SubscribeService_FollowUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) UnfollowUser(ctx context.Context, in *UnfollowRequest, opts ...grpc.CallOption) (*UnfollowResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnfollowResponse) err := c.cc.Invoke(ctx, SubscribeService_UnfollowUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) GetFollowers(ctx context.Context, in *GetFollowersRequest, opts ...grpc.CallOption) (*GetFollowersResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFollowersResponse) err := c.cc.Invoke(ctx, SubscribeService_GetFollowers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) GetFollowing(ctx context.Context, in *GetFollowingRequest, opts ...grpc.CallOption) (*GetFollowingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFollowingResponse) err := c.cc.Invoke(ctx, SubscribeService_GetFollowing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) IsFollowing(ctx context.Context, in *IsFollowingRequest, opts ...grpc.CallOption) (*IsFollowingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IsFollowingResponse) err := c.cc.Invoke(ctx, SubscribeService_IsFollowing_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) GetSubscriptionNotifications(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, SubscribeService_GetSubscriptionNotifications_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) MarkNotificationAsRead(ctx context.Context, in *MarkNotificationReadRequest, opts ...grpc.CallOption) (*MarkNotificationReadResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MarkNotificationReadResponse) err := c.cc.Invoke(ctx, SubscribeService_MarkNotificationAsRead_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) GetFollowersCount(ctx context.Context, in *GetCountRequest, opts ...grpc.CallOption) (*GetCountResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCountResponse) err := c.cc.Invoke(ctx, SubscribeService_GetFollowersCount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *subscribeServiceClient) GetFollowingCount(ctx context.Context, in *GetCountRequest, opts ...grpc.CallOption) (*GetCountResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCountResponse) err := c.cc.Invoke(ctx, SubscribeService_GetFollowingCount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // SubscribeServiceServer is the server API for SubscribeService service. // All implementations must embed UnimplementedSubscribeServiceServer // for forward compatibility. // // Сервис для работы с подписками type SubscribeServiceServer interface { // Подписаться на пользователя FollowUser(context.Context, *FollowRequest) (*FollowResponse, error) // Отписаться от пользователя UnfollowUser(context.Context, *UnfollowRequest) (*UnfollowResponse, error) // Получить список подписчиков пользователя GetFollowers(context.Context, *GetFollowersRequest) (*GetFollowersResponse, error) // Получить список подписок пользователя GetFollowing(context.Context, *GetFollowingRequest) (*GetFollowingResponse, error) // Проверить, подписан ли пользователь на другого IsFollowing(context.Context, *IsFollowingRequest) (*IsFollowingResponse, error) // Получить уведомления о подписках для пользователя GetSubscriptionNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error) // Пометить уведомление как прочитанное MarkNotificationAsRead(context.Context, *MarkNotificationReadRequest) (*MarkNotificationReadResponse, error) // Получить только КОЛИЧЕСТВО подписчиков GetFollowersCount(context.Context, *GetCountRequest) (*GetCountResponse, error) // Получить только КОЛИЧЕСТВО подписок GetFollowingCount(context.Context, *GetCountRequest) (*GetCountResponse, error) mustEmbedUnimplementedSubscribeServiceServer() } // UnimplementedSubscribeServiceServer 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 UnimplementedSubscribeServiceServer struct{} func (UnimplementedSubscribeServiceServer) FollowUser(context.Context, *FollowRequest) (*FollowResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FollowUser not implemented") } func (UnimplementedSubscribeServiceServer) UnfollowUser(context.Context, *UnfollowRequest) (*UnfollowResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnfollowUser not implemented") } func (UnimplementedSubscribeServiceServer) GetFollowers(context.Context, *GetFollowersRequest) (*GetFollowersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFollowers not implemented") } func (UnimplementedSubscribeServiceServer) GetFollowing(context.Context, *GetFollowingRequest) (*GetFollowingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFollowing not implemented") } func (UnimplementedSubscribeServiceServer) IsFollowing(context.Context, *IsFollowingRequest) (*IsFollowingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IsFollowing not implemented") } func (UnimplementedSubscribeServiceServer) GetSubscriptionNotifications(context.Context, *GetNotificationsRequest) (*GetNotificationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSubscriptionNotifications not implemented") } func (UnimplementedSubscribeServiceServer) MarkNotificationAsRead(context.Context, *MarkNotificationReadRequest) (*MarkNotificationReadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MarkNotificationAsRead not implemented") } func (UnimplementedSubscribeServiceServer) GetFollowersCount(context.Context, *GetCountRequest) (*GetCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFollowersCount not implemented") } func (UnimplementedSubscribeServiceServer) GetFollowingCount(context.Context, *GetCountRequest) (*GetCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFollowingCount not implemented") } func (UnimplementedSubscribeServiceServer) mustEmbedUnimplementedSubscribeServiceServer() {} func (UnimplementedSubscribeServiceServer) testEmbeddedByValue() {} // UnsafeSubscribeServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SubscribeServiceServer will // result in compilation errors. type UnsafeSubscribeServiceServer interface { mustEmbedUnimplementedSubscribeServiceServer() } func RegisterSubscribeServiceServer(s grpc.ServiceRegistrar, srv SubscribeServiceServer) { // If the following call pancis, it indicates UnimplementedSubscribeServiceServer 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(&SubscribeService_ServiceDesc, srv) } func _SubscribeService_FollowUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FollowRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).FollowUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_FollowUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).FollowUser(ctx, req.(*FollowRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_UnfollowUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UnfollowRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).UnfollowUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_UnfollowUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).UnfollowUser(ctx, req.(*UnfollowRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_GetFollowers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFollowersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).GetFollowers(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_GetFollowers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).GetFollowers(ctx, req.(*GetFollowersRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_GetFollowing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFollowingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).GetFollowing(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_GetFollowing_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).GetFollowing(ctx, req.(*GetFollowingRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_IsFollowing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IsFollowingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).IsFollowing(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_IsFollowing_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).IsFollowing(ctx, req.(*IsFollowingRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_GetSubscriptionNotifications_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.(SubscribeServiceServer).GetSubscriptionNotifications(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_GetSubscriptionNotifications_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).GetSubscriptionNotifications(ctx, req.(*GetNotificationsRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_MarkNotificationAsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MarkNotificationReadRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).MarkNotificationAsRead(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_MarkNotificationAsRead_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).MarkNotificationAsRead(ctx, req.(*MarkNotificationReadRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_GetFollowersCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).GetFollowersCount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_GetFollowersCount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).GetFollowersCount(ctx, req.(*GetCountRequest)) } return interceptor(ctx, in, info, handler) } func _SubscribeService_GetFollowingCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SubscribeServiceServer).GetFollowingCount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: SubscribeService_GetFollowingCount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SubscribeServiceServer).GetFollowingCount(ctx, req.(*GetCountRequest)) } return interceptor(ctx, in, info, handler) } // SubscribeService_ServiceDesc is the grpc.ServiceDesc for SubscribeService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var SubscribeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.SubscribeService", HandlerType: (*SubscribeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FollowUser", Handler: _SubscribeService_FollowUser_Handler, }, { MethodName: "UnfollowUser", Handler: _SubscribeService_UnfollowUser_Handler, }, { MethodName: "GetFollowers", Handler: _SubscribeService_GetFollowers_Handler, }, { MethodName: "GetFollowing", Handler: _SubscribeService_GetFollowing_Handler, }, { MethodName: "IsFollowing", Handler: _SubscribeService_IsFollowing_Handler, }, { MethodName: "GetSubscriptionNotifications", Handler: _SubscribeService_GetSubscriptionNotifications_Handler, }, { MethodName: "MarkNotificationAsRead", Handler: _SubscribeService_MarkNotificationAsRead_Handler, }, { MethodName: "GetFollowersCount", Handler: _SubscribeService_GetFollowersCount_Handler, }, { MethodName: "GetFollowingCount", Handler: _SubscribeService_GetFollowingCount_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "subscribe.proto", }