Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Analyze
Contributor 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-go
Commits
0cb42c57
Commit
0cb42c57
authored
1 year ago
by
Pavel Antonov
Browse files
Options
Downloads
Plain Diff
fix(core): Изменено название и значение констант событий в logging_middleware для коллекций
Close #PRXS-2199
parents
221d730e
3e87b5fd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pkg/collections/events.go
+4
-4
4 additions, 4 deletions
pkg/collections/events.go
pkg/collections/middleware/logging_middleware.go
+4
-4
4 additions, 4 deletions
pkg/collections/middleware/logging_middleware.go
with
8 additions
and
8 deletions
pkg/collections/events.go
+
4
−
4
View file @
0cb42c57
package
collections
package
collections
const
(
const
(
EventC
ollectionC
reate
=
"collection
_
create"
EventCreate
=
"collection
.
create"
Event
Collection
Update
=
"collection
_
update"
EventUpdate
=
"collection
.
update"
Event
Collection
Delete
=
"collection
_
delete"
EventDelete
=
"collection
.
delete"
Event
Collection
SetSchema
=
"collection
_
set_schema"
EventSetSchema
=
"collection
.
set_schema"
)
)
This diff is collapsed.
Click to expand it.
pkg/collections/middleware/logging_middleware.go
+
4
−
4
View file @
0cb42c57
...
@@ -31,7 +31,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, collection *collections.
...
@@ -31,7 +31,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, collection *collections.
}
}
logger
:=
m
.
logger
.
With
(
logger
:=
m
.
logger
.
With
(
logzap
.
CallerFromContext
(
ctx
,
spaceID
),
logzap
.
CallerFromContext
(
ctx
,
spaceID
),
logzap
.
Event
(
collections
.
EventC
ollectionC
reate
),
logzap
.
Event
(
collections
.
EventCreate
),
)
)
created
,
err
=
m
.
next
.
Create
(
ctx
,
collection
)
created
,
err
=
m
.
next
.
Create
(
ctx
,
collection
)
...
@@ -47,7 +47,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, collection *collections.
...
@@ -47,7 +47,7 @@ func (m *loggingMiddleware) Create(ctx context.Context, collection *collections.
func
(
m
*
loggingMiddleware
)
Delete
(
ctx
context
.
Context
,
spaceId
string
,
envId
string
,
collectionId
string
)
(
err
error
)
{
func
(
m
*
loggingMiddleware
)
Delete
(
ctx
context
.
Context
,
spaceId
string
,
envId
string
,
collectionId
string
)
(
err
error
)
{
logger
:=
m
.
logger
.
With
(
logger
:=
m
.
logger
.
With
(
logzap
.
CallerFromContext
(
ctx
,
spaceId
),
logzap
.
CallerFromContext
(
ctx
,
spaceId
),
logzap
.
Event
(
collections
.
Event
Collection
Delete
),
logzap
.
Event
(
collections
.
EventDelete
),
logzap
.
Object
(
id
.
NewCollectionId
(
spaceId
,
envId
,
collectionId
)),
logzap
.
Object
(
id
.
NewCollectionId
(
spaceId
,
envId
,
collectionId
)),
)
)
...
@@ -92,7 +92,7 @@ func (m *loggingMiddleware) List(ctx context.Context, spaceId string, envId stri
...
@@ -92,7 +92,7 @@ func (m *loggingMiddleware) List(ctx context.Context, spaceId string, envId stri
func
(
m
*
loggingMiddleware
)
SetSchema
(
ctx
context
.
Context
,
spaceId
string
,
envId
string
,
collectionId
string
,
schema
*
schema
.
Schema
)
(
err
error
)
{
func
(
m
*
loggingMiddleware
)
SetSchema
(
ctx
context
.
Context
,
spaceId
string
,
envId
string
,
collectionId
string
,
schema
*
schema
.
Schema
)
(
err
error
)
{
logger
:=
m
.
logger
.
With
(
logger
:=
m
.
logger
.
With
(
logzap
.
CallerFromContext
(
ctx
,
spaceId
),
logzap
.
CallerFromContext
(
ctx
,
spaceId
),
logzap
.
Event
(
collections
.
Event
Collection
SetSchema
),
logzap
.
Event
(
collections
.
EventSetSchema
),
logzap
.
Object
(
id
.
NewCollectionId
(
spaceId
,
envId
,
collectionId
)),
logzap
.
Object
(
id
.
NewCollectionId
(
spaceId
,
envId
,
collectionId
)),
)
)
...
@@ -128,7 +128,7 @@ func (m *loggingMiddleware) Update(ctx context.Context, coll *collections.Collec
...
@@ -128,7 +128,7 @@ func (m *loggingMiddleware) Update(ctx context.Context, coll *collections.Collec
}
}
logger
:=
m
.
logger
.
With
(
logger
:=
m
.
logger
.
With
(
logzap
.
CallerFromContext
(
ctx
,
spaceID
),
logzap
.
CallerFromContext
(
ctx
,
spaceID
),
logzap
.
Event
(
collections
.
Event
Collection
Update
),
logzap
.
Event
(
collections
.
EventUpdate
),
logzap
.
Object
(
coll
),
logzap
.
Object
(
coll
),
)
)
...
...
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