Skip to content

Commit 56b0e60

Browse files
Merge pull request #283 from gabriel-samfira/add-json-tags
Add JSON tags to the ChangePayload struct
2 parents 516908f + a7f1a51 commit 56b0e60

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

apiserver/events/params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
type Filter struct {
88
Operations []common.OperationType `json:"operations"`
9-
EntityType common.DatabaseEntityType `json:"entity_type"`
9+
EntityType common.DatabaseEntityType `json:"entity-type"`
1010
}
1111

1212
func (f Filter) Validate() error {
@@ -30,7 +30,7 @@ func (f Filter) Validate() error {
3030
}
3131

3232
type Options struct {
33-
SendEverything bool `json:"send_everything"`
33+
SendEverything bool `json:"send-everything"`
3434
Filters []Filter `json:"filters"`
3535
}
3636

database/common/watcher.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const (
2828
)
2929

3030
type ChangePayload struct {
31-
EntityType DatabaseEntityType
32-
Operation OperationType
33-
Payload interface{}
31+
EntityType DatabaseEntityType `json:"entity-type"`
32+
Operation OperationType `json:"operation"`
33+
Payload interface{} `json:"payload"`
3434
}
3535

3636
type Consumer interface {

0 commit comments

Comments
 (0)