Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DurationMatcher ¶
type DurationMatcher struct { Operator Operator `json:"operator"` Value durationValue `json:"value"` }
DurationMatcher matches a *durationpb.Duration based on an operator and a value
func Between ¶
func Between(lower *Duration, upper *Duration) *DurationMatcher
Between constructs a new DurationMatcher that matches using the Between operator
func Full ¶
func Full(value *Duration) *DurationMatcher
Full constructs a new DurationMatcher that matches using the Full operator
func Greater ¶
func Greater(value *Duration) *DurationMatcher
Greater constructs a new DurationMatcher that matches using the Greater operator
func Less ¶
func Less(value *Duration) *DurationMatcher
Less constructs a new DurationMatcher that matches using the Less operator
func (DurationMatcher) MarshalJSON ¶
func (m DurationMatcher) MarshalJSON() ([]byte, error)
Marshal implements json.Marshaler
func (*DurationMatcher) Match ¶
func (m *DurationMatcher) Match(value *durationpb.Duration) error
Match attempts to match a *durationpb.Duration based on the DurationMatcher
func (*DurationMatcher) UnmarshalJSON ¶
func (m *DurationMatcher) UnmarshalJSON(b []byte) error
Unmarshal implements json.Unmarshaler
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator is en enum over types of DurationMatcher
func (Operator) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface
func (*Operator) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface