Add JSON tags to the ChangePayload struct

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2024-08-06 13:40:23 +00:00
parent 516908f26c
commit a7f1a51a7d
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@ import (
type Filter struct { type Filter struct {
Operations []common.OperationType `json:"operations"` Operations []common.OperationType `json:"operations"`
EntityType common.DatabaseEntityType `json:"entity_type"` EntityType common.DatabaseEntityType `json:"entity-type"`
} }
func (f Filter) Validate() error { func (f Filter) Validate() error {
@ -30,7 +30,7 @@ func (f Filter) Validate() error {
} }
type Options struct { type Options struct {
SendEverything bool `json:"send_everything"` SendEverything bool `json:"send-everything"`
Filters []Filter `json:"filters"` Filters []Filter `json:"filters"`
} }

View file

@ -28,9 +28,9 @@ const (
) )
type ChangePayload struct { type ChangePayload struct {
EntityType DatabaseEntityType EntityType DatabaseEntityType `json:"entity-type"`
Operation OperationType Operation OperationType `json:"operation"`
Payload interface{} Payload interface{} `json:"payload"`
} }
type Consumer interface { type Consumer interface {