From a7f1a51a7d22b4540e3b30bb8da87abde553cc3f Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Tue, 6 Aug 2024 13:40:23 +0000 Subject: [PATCH] Add JSON tags to the ChangePayload struct Signed-off-by: Gabriel Adrian Samfira --- apiserver/events/params.go | 4 ++-- database/common/watcher.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apiserver/events/params.go b/apiserver/events/params.go index 7ecabaa8..a5760d7f 100644 --- a/apiserver/events/params.go +++ b/apiserver/events/params.go @@ -6,7 +6,7 @@ import ( type Filter struct { Operations []common.OperationType `json:"operations"` - EntityType common.DatabaseEntityType `json:"entity_type"` + EntityType common.DatabaseEntityType `json:"entity-type"` } func (f Filter) Validate() error { @@ -30,7 +30,7 @@ func (f Filter) Validate() error { } type Options struct { - SendEverything bool `json:"send_everything"` + SendEverything bool `json:"send-everything"` Filters []Filter `json:"filters"` } diff --git a/database/common/watcher.go b/database/common/watcher.go index 73af32bd..d8700189 100644 --- a/database/common/watcher.go +++ b/database/common/watcher.go @@ -28,9 +28,9 @@ const ( ) type ChangePayload struct { - EntityType DatabaseEntityType - Operation OperationType - Payload interface{} + EntityType DatabaseEntityType `json:"entity-type"` + Operation OperationType `json:"operation"` + Payload interface{} `json:"payload"` } type Consumer interface {