Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-proto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-proto
Commits
fb451ff4
Commit
fb451ff4
authored
11 months ago
by
ko_oler
Browse files
Options
Downloads
Patches
Plain Diff
выделена общая структура Event
parent
13c81e75
No related branches found
No related tags found
1 merge request
!65
Draft: Добавлена спецификация на события в системе
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/common/common.proto
+30
-0
30 additions, 0 deletions
proto/common/common.proto
with
30 additions
and
0 deletions
proto/common/common.proto
+
30
−
0
View file @
fb451ff4
...
...
@@ -5,6 +5,7 @@ option go_package = "git.perx.ru/perxis/perxis-go/proto/common;common";
package
common
;
import
"google/protobuf/struct.proto"
;
import
"google/protobuf/timestamp.proto"
;
// Deprecated
// Поддержка этой реализации фильтра осталась только в запросе поиска записей (Items.Find)
...
...
@@ -73,3 +74,32 @@ message Version {
string
commit
=
4
;
int32
build_number
=
5
;
}
// Определение типов событий
enum
EventType
{
EVENT_UNKNOWN
=
0
;
EVENT_CREATE
=
1
;
EVENT_UPDATE
=
2
;
EVENT_DELETE
=
3
;
EVENT_PUBLISH
=
4
;
EVENT_UNPUBLISH
=
5
;
// Добавляем события по необходимости
}
// Структура события
message
Event
{
// Тип события
EventType
type
=
1
;
// Время события
google.protobuf.Timestamp
timestamp
=
2
;
// Идентификатор пользователя, вызвавшего событие
string
caller
=
3
;
// Тип сущности (например, "Item", "User", "Order")
string
entity_type
=
4
;
// Идентификатор затронутой сущности
string
entity_id
=
5
;
// Данные до изменения (для событий обновления и удаления)
google.protobuf.Struct
old_data
=
6
;
// Новые данные (для событий создания и обновления)
google.protobuf.Struct
new_data
=
7
;
}
\ No newline at end of file
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