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
707a4347
Commit
707a4347
authored
7 months ago
by
Pavel Antonov
Browse files
Options
Downloads
Patches
Plain Diff
Добавлены сообщения Событий
parent
3c83857d
No related branches found
No related tags found
1 merge request
!65
Draft: Добавлена спецификация на события в системе
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
proto/common/common.proto
+0
-29
0 additions, 29 deletions
proto/common/common.proto
proto/common/event.proto
+35
-0
35 additions, 0 deletions
proto/common/event.proto
with
35 additions
and
29 deletions
proto/common/common.proto
+
0
−
29
View file @
707a4347
...
...
@@ -73,33 +73,4 @@ message Version {
string
build_time
=
3
;
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
;
// Идентификатор oid, вызвавшего событие
string
caller
=
3
;
// Тип сущности (например, "Item", "User", "Spaces")
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.
proto/common/event.proto
0 → 100644
+
35
−
0
View file @
707a4347
syntax
=
"proto3"
;
package
events
;
option
go_package
=
"git.perx.ru/perxis/perxis-go/proto/events"
;
import
"google/protobuf/struct.proto"
;
import
"google/protobuf/timestamp.proto"
;
import
"spaces/spaces.proto"
;
import
"users/users.proto"
;
message
EventMetadata
{
}
// Event описывает все события передаваемые в системе
message
Event
{
// Идентификатор события
string
id
=
1
;
// Время наступления события
google.protobuf.Timestamp
time
=
2
;
// Идентификатор инициатора события
string
principal
=
5
;
EventMetadata
metadata
=
10
;
oneof
event
{
// UserEvent user_event = 100;
// OrganizationEvent organization_event = 200;
content.spaces.SpaceEvent
space
=
300
;
}
}
\ 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