mirror of
https://github.com/FlipsideCrypto/flip-rpc-client-go.git
synced 2026-02-06 10:56:45 +00:00
Merge pull request #6 from FlipsideCrypto/omit_empty_fields
omit empty fields in json tags for filter and condition
This commit is contained in:
commit
e9d12e9ab4
@ -2,18 +2,18 @@ package dynamicquery
|
||||
|
||||
// Filter --
|
||||
type Filter struct {
|
||||
In In `json:"in"`
|
||||
NotIn NotIn `json:"not_in"`
|
||||
InSegment InSegment `json:"in_segment"`
|
||||
NotInSegment NotInSegment `json:"not_in_segment"`
|
||||
Gte Gte `json:"gte"`
|
||||
Lte Lte `json:"lte"`
|
||||
Gt Gt `json:"gt"`
|
||||
Eq Eq `json:"eq"`
|
||||
NotEq NotEq `json:"not_eq"`
|
||||
Lt Lt `json:"lt"`
|
||||
And []*Filter `json:"and"`
|
||||
Or []*Filter `json:"or"`
|
||||
In In `json:"in,omitempty"`
|
||||
NotIn NotIn `json:"not_in,omitempty"`
|
||||
InSegment InSegment `json:"in_segment,omitempty"`
|
||||
NotInSegment NotInSegment `json:"not_in_segment,omitempty"`
|
||||
Gte Gte `json:"gte,omitempty"`
|
||||
Lte Lte `json:"lte,omitempty"`
|
||||
Gt Gt `json:"gt,omitempty"`
|
||||
Eq Eq `json:"eq,omitempty"`
|
||||
NotEq NotEq `json:"not_eq,omitempty"`
|
||||
Lt Lt `json:"lt,omitempty"`
|
||||
And []*Filter `json:"and,omitempty"`
|
||||
Or []*Filter `json:"or,omitempty"`
|
||||
}
|
||||
|
||||
// Eq equal to filter
|
||||
|
||||
@ -26,12 +26,12 @@ type Gt struct {
|
||||
|
||||
// Condition is set of logic
|
||||
type Condition struct {
|
||||
PartitionID string `json:"partition_id"`
|
||||
Value float64 `json:"value"`
|
||||
Or []*Condition `json:"or"`
|
||||
And []*Condition `json:"and"`
|
||||
Gt Gt `json:"gt"`
|
||||
Gte Gte `json:"gte"`
|
||||
Lt Lt `json:"lt"`
|
||||
Lte Lte `json:"lte"`
|
||||
PartitionID string `json:"partition_id,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Or []*Condition `json:"or,omitempty"`
|
||||
And []*Condition `json:"and,omitempty"`
|
||||
Gt Gt `json:"gt,omitempty"`
|
||||
Gte Gte `json:"gte,omitempty"`
|
||||
Lt Lt `json:"lt,omitempty"`
|
||||
Lte Lte `json:"lte,omitempty"`
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user