Skip to content

Commit

Permalink
Merge pull request #283 from gabriel-samfira/add-json-tags
Browse files Browse the repository at this point in the history
Add JSON tags to the ChangePayload struct
  • Loading branch information
gabriel-samfira authored Aug 6, 2024
2 parents 516908f + a7f1a51 commit 56b0e60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apiserver/events/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"`
}

Expand Down
6 changes: 3 additions & 3 deletions database/common/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 56b0e60

Please sign in to comment.