From 58a4c5f8aaae5605148af49964e0fa9dd965a006 Mon Sep 17 00:00:00 2001 From: xeeetu Date: Fri, 16 Aug 2024 15:22:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D0=B8=20=D0=BA=20=D1=80=D1=83=D1=87=D0=BA?= =?UTF-8?q?=D0=B0=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/chat_server/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/chat_server/main.go b/cmd/chat_server/main.go index 479c000..3ff3997 100644 --- a/cmd/chat_server/main.go +++ b/cmd/chat_server/main.go @@ -21,6 +21,7 @@ type server struct { desc.UnimplementedChatV1Server } +// Create создаёт чат, получает массив пользователей func (s *server) Create(ctx context.Context, in *desc.CreateRequest) (*desc.CreateResponse, error) { select { case <-ctx.Done(): @@ -34,6 +35,7 @@ func (s *server) Create(ctx context.Context, in *desc.CreateRequest) (*desc.Crea return &desc.CreateResponse{Id: gofakeit.Int64()}, nil } +// Delete удаляет чат по id func (s *server) Delete(ctx context.Context, in *desc.DeleteRequest) (*emptypb.Empty, error) { select { case <-ctx.Done(): @@ -47,6 +49,7 @@ func (s *server) Delete(ctx context.Context, in *desc.DeleteRequest) (*emptypb.E return &emptypb.Empty{}, nil } +// SendMessage отправляет сообщение на сервер func (s *server) SendMessage(ctx context.Context, in *desc.SendMessageRequest) (*emptypb.Empty, error) { select { case <-ctx.Done():