Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-proto
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-proto
Commits
fcab111d
Commit
fcab111d
authored
8 months ago
by
Anton Sattarov
Browse files
Options
Downloads
Patches
Plain Diff
fix after review
parent
0c2b3d16
No related branches found
No related tags found
1 merge request
!60
API Сервиса Mailbox
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/notifications/notification.proto
+17
-14
17 additions, 14 deletions
proto/notifications/notification.proto
with
17 additions
and
14 deletions
proto/notifications/notification.proto
+
17
−
14
View file @
fcab111d
...
...
@@ -4,34 +4,37 @@ import "google/protobuf/empty.proto";
import
"common/common.proto"
;
import
"google/protobuf/timestamp.proto"
;
option
go_package
=
"git.perx.ru/perxis/perxis-go/proto/
notifications;notifications
"
;
option
go_package
=
"git.perx.ru/perxis/perxis-go/proto/
mailbox;mailbox
"
;
package
notifications
;
package
mailbox
;
// Сообщение для уведомления
message
Notification
{
message
Message
{
string
id
=
1
;
// Уникальный идентификатор уведомления
string
recipients
=
2
;
// Идентификатор пользователя или сервиса получателя
string
title
=
3
;
// Заголовок уведомления
string
message
=
4
;
// Текст уведомления
google.protobuf.Timestamp
created_at
=
5
;
// Время создания
bool
is_read
=
6
;
// Статус прочтения
string
object
=
2
;
// Идентификатор объекта события
string
from
=
3
;
// Идентификатор отправителя пользователя/сервиса/подсистемы
repeated
string
to
=
4
;
// Идентификатор получателя пользователя/сервиса/подсистемы
string
title
=
5
;
// Заголовок уведомления
string
message
=
6
;
// Текст уведомления
google.protobuf.Timestamp
created_at
=
7
;
// Время создания
bool
is_read
=
8
;
// Статус прочтения
}
// Отправить уведомление
message
SendRequest
{
Notification
notification
=
1
;
Message
message
=
1
;
}
// Запрос на получение уведомлений
message
Find
Request
{
message
List
Request
{
string
recipient
=
1
;
common.FindOptions
opts
=
2
;
}
// Ответ на получение уведомлений
message
Find
Response
{
repeated
Notification
notifications
=
1
;
message
List
Response
{
repeated
Message
notifications
=
1
;
}
// Пометка уведомлений как прочитанных
...
...
@@ -41,13 +44,13 @@ message MarkAsReadRequest {
}
// Сервис уведомлений
service
Notifications
{
service
Mailbox
{
// Отправка уведомления
rpc
Send
(
SendRequest
)
returns
(
google.protobuf.Empty
)
{};
// Получение уведомлений, поле recipients в Notification всегда содержит только получателя из запроса
rpc
List
(
Find
Request
)
returns
(
Find
Response
);
rpc
List
(
List
Request
)
returns
(
List
Response
);
// Пометка уведомлений как прочитанных
rpc
MarkAsRead
(
MarkAsReadRequest
)
returns
(
google.protobuf.Empty
)
{};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment