filters

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var BoolFilterFields = struct {
	Equals string
}{
	Equals: "equals",
}
View Source
var DurationFilterFields = struct {
	Equals string
	Sup    string
	Inf    string
}{
	Equals: "equals",
	Sup:    "sup",
	Inf:    "inf",
}
View Source
var ExpressionFields = struct {
	Condition string
	AndExprs  string
	OrExprs   string
}{
	Condition: "condition",
	AndExprs:  "and_exprs",
	OrExprs:   "or_exprs",
}
View Source
var FieldFilterFields = struct {
	Field  string
	Filter string
}{
	Field:  "field",
	Filter: "filter",
}
View Source
var FieldsFilterFields = struct {
	Filters string
}{
	Filters: "filters",
}
View Source
var File_filters_field_filter_proto protoreflect.FileDescriptor
View Source
var FilterFields = struct {
	String_  string
	Number   string
	Bool     string
	Null     string
	Time     string
	Duration string
	Not      string
}{
	String_:  "string",
	Number:   "number",
	Bool:     "bool",
	Null:     "null",
	Time:     "time",
	Duration: "duration",
	Not:      "not",
}
View Source
var NullFilterFields = struct {
}{}
View Source
var NumberFilterFields = struct {
	Equals string
	Sup    string
	Inf    string
	In     string
}{
	Equals: "equals",
	Sup:    "sup",
	Inf:    "inf",
	In:     "in",
}
View Source
var NumberFilter_InFields = struct {
	Values string
}{
	Values: "values",
}
View Source
var StringFilterFields = struct {
	Equals          string
	Regex           string
	In              string
	CaseInsensitive string
}{
	Equals:          "equals",
	Regex:           "regex",
	In:              "in",
	CaseInsensitive: "case_insensitive",
}
View Source
var StringFilter_InFields = struct {
	Values string
}{
	Values: "values",
}
View Source
var TimeFilterFields = struct {
	Equals string
	Before string
	After  string
}{
	Equals: "equals",
	Before: "before",
	After:  "after",
}

Functions

func Field

func Field(parts ...string) string

Field joins the parts as un field path, e.g. Field("message", "string_field") returns "message.string_field"

Types

type BoolFilter

type BoolFilter struct {
	Equals bool `protobuf:"varint,1,opt,name=equals,proto3" json:"equals,omitempty"`
	// contains filtered or unexported fields
}

func (*BoolFilter) Descriptor deprecated

func (*BoolFilter) Descriptor() ([]byte, []int)

Deprecated: Use BoolFilter.ProtoReflect.Descriptor instead.

func (*BoolFilter) GetEquals

func (x *BoolFilter) GetEquals() bool

func (*BoolFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *BoolFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*BoolFilter) MarshalToVT added in v0.2.2

func (m *BoolFilter) MarshalToVT(dAtA []byte) (int, error)

func (*BoolFilter) MarshalVT added in v0.2.2

func (m *BoolFilter) MarshalVT() (dAtA []byte, err error)

func (*BoolFilter) Match

func (x *BoolFilter) Match(v *bool) (bool, error)

Match applies the filter against the provided bool pointer

func (*BoolFilter) ProtoMessage

func (*BoolFilter) ProtoMessage()

func (*BoolFilter) ProtoReflect

func (x *BoolFilter) ProtoReflect() protoreflect.Message

func (*BoolFilter) Reset

func (x *BoolFilter) Reset()

func (*BoolFilter) SizeVT added in v0.2.2

func (m *BoolFilter) SizeVT() (n int)

func (*BoolFilter) String

func (x *BoolFilter) String() string

func (*BoolFilter) UnmarshalVT added in v0.2.2

func (m *BoolFilter) UnmarshalVT(dAtA []byte) error

type BoolFilterer added in v0.4.0

type BoolFilterer interface {
	True() *FieldFilter
	False() *FieldFilter
}

func BoolField added in v0.4.0

func BoolField(field string) BoolFilterer

type Builder added in v0.7.0

type Builder interface {
	FieldFilterer
	And(field ...string) Builder
	Or(e FieldFilterer) Builder
	StringEquals(s string) Builder
	StringNotEquals(s string) Builder
	StringNotIEquals(s string) Builder
	StringIEquals(s string) Builder
	StringHasPrefix(s string) Builder
	StringNotHasPrefix(s string) Builder
	StringIHasPrefix(s string) Builder
	StringNotIHasPrefix(s string) Builder
	StringHasSuffix(s string) Builder
	StringNotHasSuffix(s string) Builder
	StringIHasSuffix(s string) Builder
	StringNotIHasSuffix(s string) Builder
	StringRegex(s string) Builder
	StringNotRegex(s string) Builder
	StringIN(s ...string) Builder
	StringNotIN(s ...string) Builder
	NumberEquals(n float64) Builder
	NumberNotEquals(n float64) Builder
	NumberInf(n float64) Builder
	NumberSup(n float64) Builder
	NumberIN(n ...float64) Builder
	NumberNotIN(n ...float64) Builder
	True() Builder
	False() Builder
	Null() Builder
	NotNull() Builder
	DurationEquals(d time.Duration) Builder
	DurationNotEquals(d time.Duration) Builder
	DurationSup(d time.Duration) Builder
	DurationInf(d time.Duration) Builder
	TimeEquals(t time.Time) Builder
	TimeNotEquals(t time.Time) Builder
	TimeAfter(t time.Time) Builder
	TimeBefore(t time.Time) Builder
}

func Where added in v0.3.0

func Where(field string) Builder

type DurationFilter

type DurationFilter struct {

	// Types that are assignable to Condition:
	//
	//	*DurationFilter_Equals
	//	*DurationFilter_Sup
	//	*DurationFilter_Inf
	Condition isDurationFilter_Condition `protobuf_oneof:"condition"`
	// contains filtered or unexported fields
}

func (*DurationFilter) Descriptor deprecated

func (*DurationFilter) Descriptor() ([]byte, []int)

Deprecated: Use DurationFilter.ProtoReflect.Descriptor instead.

func (*DurationFilter) GetCondition

func (m *DurationFilter) GetCondition() isDurationFilter_Condition

func (*DurationFilter) GetEquals

func (x *DurationFilter) GetEquals() *durationpb.Duration

func (*DurationFilter) GetInf

func (x *DurationFilter) GetInf() *durationpb.Duration

func (*DurationFilter) GetSup

func (x *DurationFilter) GetSup() *durationpb.Duration

func (*DurationFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *DurationFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DurationFilter) MarshalToVT added in v0.2.2

func (m *DurationFilter) MarshalToVT(dAtA []byte) (int, error)

func (*DurationFilter) MarshalVT added in v0.2.2

func (m *DurationFilter) MarshalVT() (dAtA []byte, err error)

func (*DurationFilter) Match

func (x *DurationFilter) Match(v *durationpb.Duration) (bool, error)

Match applies the filter against the provided Duration pointer

func (*DurationFilter) ProtoMessage

func (*DurationFilter) ProtoMessage()

func (*DurationFilter) ProtoReflect

func (x *DurationFilter) ProtoReflect() protoreflect.Message

func (*DurationFilter) Reset

func (x *DurationFilter) Reset()

func (*DurationFilter) SizeVT added in v0.2.2

func (m *DurationFilter) SizeVT() (n int)

func (*DurationFilter) String

func (x *DurationFilter) String() string

func (*DurationFilter) UnmarshalVT added in v0.2.2

func (m *DurationFilter) UnmarshalVT(dAtA []byte) error

type DurationFilter_Equals

type DurationFilter_Equals struct {
	Equals *durationpb.Duration `protobuf:"bytes,1,opt,name=equals,proto3,oneof"`
}

func (*DurationFilter_Equals) MarshalToSizedBufferVT added in v0.2.2

func (m *DurationFilter_Equals) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DurationFilter_Equals) MarshalToVT added in v0.2.2

func (m *DurationFilter_Equals) MarshalToVT(dAtA []byte) (int, error)

func (*DurationFilter_Equals) SizeVT added in v0.2.2

func (m *DurationFilter_Equals) SizeVT() (n int)

type DurationFilter_Inf

type DurationFilter_Inf struct {
	Inf *durationpb.Duration `protobuf:"bytes,3,opt,name=inf,proto3,oneof"`
}

func (*DurationFilter_Inf) MarshalToSizedBufferVT added in v0.2.2

func (m *DurationFilter_Inf) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DurationFilter_Inf) MarshalToVT added in v0.2.2

func (m *DurationFilter_Inf) MarshalToVT(dAtA []byte) (int, error)

func (*DurationFilter_Inf) SizeVT added in v0.2.2

func (m *DurationFilter_Inf) SizeVT() (n int)

type DurationFilter_Sup

type DurationFilter_Sup struct {
	Sup *durationpb.Duration `protobuf:"bytes,2,opt,name=sup,proto3,oneof"`
}

func (*DurationFilter_Sup) MarshalToSizedBufferVT added in v0.2.2

func (m *DurationFilter_Sup) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DurationFilter_Sup) MarshalToVT added in v0.2.2

func (m *DurationFilter_Sup) MarshalToVT(dAtA []byte) (int, error)

func (*DurationFilter_Sup) SizeVT added in v0.2.2

func (m *DurationFilter_Sup) SizeVT() (n int)

type DurationFilterer added in v0.4.0

type DurationFilterer interface {
	Equals(d time.Duration) *FieldFilter
	NotEquals(d time.Duration) *FieldFilter
	Sup(d time.Duration) *FieldFilter
	Inf(d time.Duration) *FieldFilter
}

func DurationField added in v0.4.0

func DurationField(field string) DurationFilterer

type Expression added in v0.3.0

type Expression struct {
	Condition *FieldFilter  `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"`
	AndExprs  []*Expression `protobuf:"bytes,2,rep,name=and_exprs,json=andExprs,proto3" json:"and_exprs,omitempty"`
	OrExprs   []*Expression `protobuf:"bytes,3,rep,name=or_exprs,json=orExprs,proto3" json:"or_exprs,omitempty"`
	// contains filtered or unexported fields
}

Expression represent a complete condition fields are evaluated as the following expression: condition && and_exprs || or_exprs

func (*Expression) Descriptor deprecated added in v0.3.0

func (*Expression) Descriptor() ([]byte, []int)

Deprecated: Use Expression.ProtoReflect.Descriptor instead.

func (*Expression) Expr added in v0.4.0

func (x *Expression) Expr() *Expression

Expr is a convenient method so that both Expression and FieldFilter implement the FieldFilterer interface

func (*Expression) FieldFilters added in v0.7.0

func (x *Expression) FieldFilters() (fieldFilters []*FieldFilter)

func (*Expression) Fields added in v0.6.0

func (x *Expression) Fields() (fields []string)

func (*Expression) GetAndExprs added in v0.3.0

func (x *Expression) GetAndExprs() []*Expression

func (*Expression) GetCondition added in v0.3.0

func (x *Expression) GetCondition() *FieldFilter

func (*Expression) GetOrExprs added in v0.3.0

func (x *Expression) GetOrExprs() []*Expression

func (*Expression) MarshalToSizedBufferVT added in v0.3.0

func (m *Expression) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Expression) MarshalToVT added in v0.3.0

func (m *Expression) MarshalToVT(dAtA []byte) (int, error)

func (*Expression) MarshalVT added in v0.3.0

func (m *Expression) MarshalVT() (dAtA []byte, err error)

func (*Expression) ProtoMessage added in v0.3.0

func (*Expression) ProtoMessage()

func (*Expression) ProtoReflect added in v0.3.0

func (x *Expression) ProtoReflect() protoreflect.Message

func (*Expression) Reset added in v0.3.0

func (x *Expression) Reset()

func (*Expression) SizeVT added in v0.3.0

func (m *Expression) SizeVT() (n int)

func (*Expression) String added in v0.3.0

func (x *Expression) String() string

func (*Expression) UnmarshalVT added in v0.3.0

func (m *Expression) UnmarshalVT(dAtA []byte) error

type FieldFilter

type FieldFilter struct {

	// Field is the field's path
	Field  string  `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*FieldFilter) Descriptor deprecated

func (*FieldFilter) Descriptor() ([]byte, []int)

Deprecated: Use FieldFilter.ProtoReflect.Descriptor instead.

func (*FieldFilter) GetField

func (x *FieldFilter) GetField() string

func (*FieldFilter) GetFilter

func (x *FieldFilter) GetFilter() *Filter

func (*FieldFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *FieldFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*FieldFilter) MarshalToVT added in v0.2.2

func (m *FieldFilter) MarshalToVT(dAtA []byte) (int, error)

func (*FieldFilter) MarshalVT added in v0.2.2

func (m *FieldFilter) MarshalVT() (dAtA []byte, err error)

func (*FieldFilter) ProtoMessage

func (*FieldFilter) ProtoMessage()

func (*FieldFilter) ProtoReflect

func (x *FieldFilter) ProtoReflect() protoreflect.Message

func (*FieldFilter) Reset

func (x *FieldFilter) Reset()

func (*FieldFilter) SizeVT added in v0.2.2

func (m *FieldFilter) SizeVT() (n int)

func (*FieldFilter) String

func (x *FieldFilter) String() string

func (*FieldFilter) UnmarshalVT added in v0.2.2

func (m *FieldFilter) UnmarshalVT(dAtA []byte) error

type FieldFilterer added in v0.4.0

type FieldFilterer interface {
	Expr() *Expression
}

type FieldsFilter

type FieldsFilter struct {

	// Filters is a map of <field path, Filter>
	Filters map[string]*Filter `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func New

func New(filters ...*FieldFilter) *FieldsFilter

New constructs a *FieldsField based on the provided *FieldFilter slice

func (*FieldsFilter) Descriptor deprecated

func (*FieldsFilter) Descriptor() ([]byte, []int)

Deprecated: Use FieldsFilter.ProtoReflect.Descriptor instead.

func (*FieldsFilter) Expr added in v0.4.0

func (x *FieldsFilter) Expr() *Expression

func (*FieldsFilter) GetFilters

func (x *FieldsFilter) GetFilters() map[string]*Filter

func (*FieldsFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*FieldsFilter) MarshalToVT added in v0.2.2

func (m *FieldsFilter) MarshalToVT(dAtA []byte) (int, error)

func (*FieldsFilter) MarshalVT added in v0.2.2

func (m *FieldsFilter) MarshalVT() (dAtA []byte, err error)

func (*FieldsFilter) ProtoMessage

func (*FieldsFilter) ProtoMessage()

func (*FieldsFilter) ProtoReflect

func (x *FieldsFilter) ProtoReflect() protoreflect.Message

func (*FieldsFilter) Reset

func (x *FieldsFilter) Reset()

func (*FieldsFilter) SizeVT added in v0.2.2

func (m *FieldsFilter) SizeVT() (n int)

func (*FieldsFilter) String

func (x *FieldsFilter) String() string

func (*FieldsFilter) UnmarshalVT added in v0.2.2

func (m *FieldsFilter) UnmarshalVT(dAtA []byte) error

type Filter

type Filter struct {

	// Types that are assignable to Match:
	//
	//	*Filter_String_
	//	*Filter_Number
	//	*Filter_Bool
	//	*Filter_Null
	//	*Filter_Time
	//	*Filter_Duration
	Match isFilter_Match `protobuf_oneof:"match"`
	// Not negates the match result
	Not bool `protobuf:"varint,7,opt,name=not,proto3" json:"not,omitempty"`
	// contains filtered or unexported fields
}

func DurationEquals

func DurationEquals(d time.Duration) *Filter

DurationEquals constructs a duration equals filter

func DurationInf

func DurationInf(d time.Duration) *Filter

DurationInf constructs a duration inferior filter

func DurationNotEquals

func DurationNotEquals(d time.Duration) *Filter

DurationNotEquals constructs a duration not equals filter

func DurationSup

func DurationSup(d time.Duration) *Filter

DurationSup constructs a duration superior filter

func False

func False() *Filter

False constructs a bool is false filter

func NotNull

func NotNull() *Filter

NotNull constructs a not null check filter

func Null

func Null() *Filter

Null constructs a null check filter

func NumberEquals

func NumberEquals(n float64) *Filter

NumberEquals constructs a number equals filter

func NumberIN

func NumberIN(n ...float64) *Filter

NumberIN constructs a number in slice filter

func NumberInf

func NumberInf(n float64) *Filter

NumberInf constructs a number inferior filter

func NumberNotEquals added in v0.7.0

func NumberNotEquals(n float64) *Filter

NumberNotEquals constructs a number not equals filter

func NumberNotIN

func NumberNotIN(n ...float64) *Filter

NumberNotIN constructs a number not in slice filter

func NumberSup

func NumberSup(n float64) *Filter

NumberSup constructs a number superior filter

func StringEquals

func StringEquals(s string) *Filter

StringEquals constructs a string equals filter

func StringHasPrefix added in v0.6.0

func StringHasPrefix(s string) *Filter

StringHasPrefix constructs a string match prefix filter

func StringHasSuffix added in v0.6.0

func StringHasSuffix(s string) *Filter

StringHasSuffix constructs a string match suffix filter

func StringIEquals

func StringIEquals(s string) *Filter

StringIEquals constructs a case insensitive string equals filter

func StringIHasPrefix added in v0.6.0

func StringIHasPrefix(s string) *Filter

StringIHasPrefix constructs a case insensitive string match prefix filter

func StringIHasSuffix added in v0.6.0

func StringIHasSuffix(s string) *Filter

StringIHasSuffix constructs a case insensitive string match suffix filter

func StringIN

func StringIN(s ...string) *Filter

StringIN constructs a string in slice filter

func StringNotEquals

func StringNotEquals(s string) *Filter

StringNotEquals constructs a string not equals filter

func StringNotHasPrefix added in v0.6.0

func StringNotHasPrefix(s string) *Filter

StringNotHasPrefix constructs a string not match prefix filter

func StringNotHasSuffix added in v0.6.0

func StringNotHasSuffix(s string) *Filter

StringNotHasSuffix constructs a string not match suffix filter

func StringNotIEquals

func StringNotIEquals(s string) *Filter

StringNotIEquals constructs a case insensitive string not equals filter

func StringNotIHasPrefix added in v0.6.0

func StringNotIHasPrefix(s string) *Filter

StringNotIHasPrefix constructs a case insensitive string not match prefix filter

func StringNotIHasSuffix added in v0.6.0

func StringNotIHasSuffix(s string) *Filter

StringNotIHasSuffix constructs a case insensitive string not match suffix filter

func StringNotIN

func StringNotIN(s ...string) *Filter

StringNotIN constructs a string not in slice filter

func StringNotRegex

func StringNotRegex(s string) *Filter

StringNotRegex constructs a string not match regex filter

func StringRegex

func StringRegex(s string) *Filter

StringRegex constructs a string match regex filter

func TimeAfter

func TimeAfter(t time.Time) *Filter

TimeAfter constructs a time after filter

func TimeBefore

func TimeBefore(t time.Time) *Filter

TimeBefore constructs a time before filter

func TimeEquals

func TimeEquals(t time.Time) *Filter

TimeEquals constructs a time equals filter

func TimeNotEquals

func TimeNotEquals(t time.Time) *Filter

TimeNotEquals constructs a time not equals filter

func True

func True() *Filter

True constructs a bool is true filter

func (*Filter) Descriptor deprecated

func (*Filter) Descriptor() ([]byte, []int)

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetBool

func (x *Filter) GetBool() *BoolFilter

func (*Filter) GetDuration

func (x *Filter) GetDuration() *DurationFilter

func (*Filter) GetMatch

func (m *Filter) GetMatch() isFilter_Match

func (*Filter) GetNot

func (x *Filter) GetNot() bool

func (*Filter) GetNull

func (x *Filter) GetNull() *NullFilter

func (*Filter) GetNumber

func (x *Filter) GetNumber() *NumberFilter

func (*Filter) GetString_

func (x *Filter) GetString_() *StringFilter

func (*Filter) GetTime

func (x *Filter) GetTime() *TimeFilter

func (*Filter) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter) MarshalToVT added in v0.2.2

func (m *Filter) MarshalToVT(dAtA []byte) (int, error)

func (*Filter) MarshalVT added in v0.2.2

func (m *Filter) MarshalVT() (dAtA []byte, err error)

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) SizeVT added in v0.2.2

func (m *Filter) SizeVT() (n int)

func (*Filter) String

func (x *Filter) String() string

func (*Filter) UnmarshalVT added in v0.2.2

func (m *Filter) UnmarshalVT(dAtA []byte) error

type Filter_Bool

type Filter_Bool struct {
	Bool *BoolFilter `protobuf:"bytes,3,opt,name=bool,proto3,oneof"`
}

func (*Filter_Bool) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter_Bool) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter_Bool) MarshalToVT added in v0.2.2

func (m *Filter_Bool) MarshalToVT(dAtA []byte) (int, error)

func (*Filter_Bool) SizeVT added in v0.2.2

func (m *Filter_Bool) SizeVT() (n int)

type Filter_Duration

type Filter_Duration struct {
	Duration *DurationFilter `protobuf:"bytes,6,opt,name=duration,proto3,oneof"`
}

func (*Filter_Duration) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter_Duration) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter_Duration) MarshalToVT added in v0.2.2

func (m *Filter_Duration) MarshalToVT(dAtA []byte) (int, error)

func (*Filter_Duration) SizeVT added in v0.2.2

func (m *Filter_Duration) SizeVT() (n int)

type Filter_Null

type Filter_Null struct {
	Null *NullFilter `protobuf:"bytes,4,opt,name=null,proto3,oneof"`
}

func (*Filter_Null) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter_Null) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter_Null) MarshalToVT added in v0.2.2

func (m *Filter_Null) MarshalToVT(dAtA []byte) (int, error)

func (*Filter_Null) SizeVT added in v0.2.2

func (m *Filter_Null) SizeVT() (n int)

type Filter_Number

type Filter_Number struct {
	Number *NumberFilter `protobuf:"bytes,2,opt,name=number,proto3,oneof"`
}

func (*Filter_Number) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter_Number) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter_Number) MarshalToVT added in v0.2.2

func (m *Filter_Number) MarshalToVT(dAtA []byte) (int, error)

func (*Filter_Number) SizeVT added in v0.2.2

func (m *Filter_Number) SizeVT() (n int)

type Filter_String_

type Filter_String_ struct {
	String_ *StringFilter `protobuf:"bytes,1,opt,name=string,proto3,oneof"`
}

func (*Filter_String_) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter_String_) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter_String_) MarshalToVT added in v0.2.2

func (m *Filter_String_) MarshalToVT(dAtA []byte) (int, error)

func (*Filter_String_) SizeVT added in v0.2.2

func (m *Filter_String_) SizeVT() (n int)

type Filter_Time

type Filter_Time struct {
	Time *TimeFilter `protobuf:"bytes,5,opt,name=time,proto3,oneof"`
}

func (*Filter_Time) MarshalToSizedBufferVT added in v0.2.2

func (m *Filter_Time) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Filter_Time) MarshalToVT added in v0.2.2

func (m *Filter_Time) MarshalToVT(dAtA []byte) (int, error)

func (*Filter_Time) SizeVT added in v0.2.2

func (m *Filter_Time) SizeVT() (n int)

type Filters

type Filters map[string]*Filter

Filters is a map containing field path associated to a Filter

type NullFilter

type NullFilter struct {
	// contains filtered or unexported fields
}

func (*NullFilter) Descriptor deprecated

func (*NullFilter) Descriptor() ([]byte, []int)

Deprecated: Use NullFilter.ProtoReflect.Descriptor instead.

func (*NullFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *NullFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NullFilter) MarshalToVT added in v0.2.2

func (m *NullFilter) MarshalToVT(dAtA []byte) (int, error)

func (*NullFilter) MarshalVT added in v0.2.2

func (m *NullFilter) MarshalVT() (dAtA []byte, err error)

func (*NullFilter) Match

func (x *NullFilter) Match(v interface{}) (bool, error)

Match applies the filter against the provided message

func (*NullFilter) ProtoMessage

func (*NullFilter) ProtoMessage()

func (*NullFilter) ProtoReflect

func (x *NullFilter) ProtoReflect() protoreflect.Message

func (*NullFilter) Reset

func (x *NullFilter) Reset()

func (*NullFilter) SizeVT added in v0.2.2

func (m *NullFilter) SizeVT() (n int)

func (*NullFilter) String

func (x *NullFilter) String() string

func (*NullFilter) UnmarshalVT added in v0.2.2

func (m *NullFilter) UnmarshalVT(dAtA []byte) error

type NullFilterer added in v0.4.0

type NullFilterer interface {
	Null() *FieldFilter
}

func NullField added in v0.4.0

func NullField(field string) NullFilterer

type NullableBoolFilterer added in v0.4.0

type NullableBoolFilterer interface {
	BoolFilterer
	NullFilterer
}

func NullableBoolField added in v0.4.0

func NullableBoolField(field string) NullableBoolFilterer

type NullableDurationFilterer added in v0.4.0

type NullableDurationFilterer interface {
	DurationFilterer
	NullFilterer
}

func NullableDurationField added in v0.4.0

func NullableDurationField(field string) NullableDurationFilterer

type NullableNumberFilterer added in v0.4.0

type NullableNumberFilterer interface {
	NumberFilterer
	NullFilterer
}

func NullableNumberField added in v0.4.0

func NullableNumberField(field string) NullableNumberFilterer

type NullableStringFilterer added in v0.4.0

type NullableStringFilterer interface {
	StringFilterer
	NullFilterer
}

func NullableStringField added in v0.4.0

func NullableStringField(field string) NullableStringFilterer

type NullableTimeFilterer added in v0.4.0

type NullableTimeFilterer interface {
	TimeFilterer
	NullFilterer
}

func NullableTimeField added in v0.4.0

func NullableTimeField(field string) NullableTimeFilterer

type NumberFilter

type NumberFilter struct {

	// Types that are assignable to Condition:
	//
	//	*NumberFilter_Equals
	//	*NumberFilter_Sup
	//	*NumberFilter_Inf
	//	*NumberFilter_In_
	Condition isNumberFilter_Condition `protobuf_oneof:"condition"`
	// contains filtered or unexported fields
}

func (*NumberFilter) Descriptor deprecated

func (*NumberFilter) Descriptor() ([]byte, []int)

Deprecated: Use NumberFilter.ProtoReflect.Descriptor instead.

func (*NumberFilter) GetCondition

func (m *NumberFilter) GetCondition() isNumberFilter_Condition

func (*NumberFilter) GetEquals

func (x *NumberFilter) GetEquals() float64

func (*NumberFilter) GetIn

func (x *NumberFilter) GetIn() *NumberFilter_In

func (*NumberFilter) GetInf

func (x *NumberFilter) GetInf() float64

func (*NumberFilter) GetSup

func (x *NumberFilter) GetSup() float64

func (*NumberFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *NumberFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NumberFilter) MarshalToVT added in v0.2.2

func (m *NumberFilter) MarshalToVT(dAtA []byte) (int, error)

func (*NumberFilter) MarshalVT added in v0.2.2

func (m *NumberFilter) MarshalVT() (dAtA []byte, err error)

func (*NumberFilter) Match

func (x *NumberFilter) Match(v *float64) (bool, error)

Match applies the filter against the provided number pointer

func (*NumberFilter) ProtoMessage

func (*NumberFilter) ProtoMessage()

func (*NumberFilter) ProtoReflect

func (x *NumberFilter) ProtoReflect() protoreflect.Message

func (*NumberFilter) Reset

func (x *NumberFilter) Reset()

func (*NumberFilter) SizeVT added in v0.2.2

func (m *NumberFilter) SizeVT() (n int)

func (*NumberFilter) String

func (x *NumberFilter) String() string

func (*NumberFilter) UnmarshalVT added in v0.2.2

func (m *NumberFilter) UnmarshalVT(dAtA []byte) error

type NumberFilter_Equals

type NumberFilter_Equals struct {
	Equals float64 `protobuf:"fixed64,1,opt,name=equals,proto3,oneof"`
}

func (*NumberFilter_Equals) MarshalToSizedBufferVT added in v0.2.2

func (m *NumberFilter_Equals) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NumberFilter_Equals) MarshalToVT added in v0.2.2

func (m *NumberFilter_Equals) MarshalToVT(dAtA []byte) (int, error)

func (*NumberFilter_Equals) SizeVT added in v0.2.2

func (m *NumberFilter_Equals) SizeVT() (n int)

type NumberFilter_In

type NumberFilter_In struct {
	Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*NumberFilter_In) Descriptor deprecated

func (*NumberFilter_In) Descriptor() ([]byte, []int)

Deprecated: Use NumberFilter_In.ProtoReflect.Descriptor instead.

func (*NumberFilter_In) GetValues

func (x *NumberFilter_In) GetValues() []float64

func (*NumberFilter_In) MarshalToSizedBufferVT added in v0.2.2

func (m *NumberFilter_In) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NumberFilter_In) MarshalToVT added in v0.2.2

func (m *NumberFilter_In) MarshalToVT(dAtA []byte) (int, error)

func (*NumberFilter_In) MarshalVT added in v0.2.2

func (m *NumberFilter_In) MarshalVT() (dAtA []byte, err error)

func (*NumberFilter_In) ProtoMessage

func (*NumberFilter_In) ProtoMessage()

func (*NumberFilter_In) ProtoReflect

func (x *NumberFilter_In) ProtoReflect() protoreflect.Message

func (*NumberFilter_In) Reset

func (x *NumberFilter_In) Reset()

func (*NumberFilter_In) SizeVT added in v0.2.2

func (m *NumberFilter_In) SizeVT() (n int)

func (*NumberFilter_In) String

func (x *NumberFilter_In) String() string

func (*NumberFilter_In) UnmarshalVT added in v0.2.2

func (m *NumberFilter_In) UnmarshalVT(dAtA []byte) error

type NumberFilter_In_

type NumberFilter_In_ struct {
	In *NumberFilter_In `protobuf:"bytes,4,opt,name=in,proto3,oneof"`
}

func (*NumberFilter_In_) MarshalToSizedBufferVT added in v0.2.2

func (m *NumberFilter_In_) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NumberFilter_In_) MarshalToVT added in v0.2.2

func (m *NumberFilter_In_) MarshalToVT(dAtA []byte) (int, error)

func (*NumberFilter_In_) SizeVT added in v0.2.2

func (m *NumberFilter_In_) SizeVT() (n int)

type NumberFilter_Inf

type NumberFilter_Inf struct {
	Inf float64 `protobuf:"fixed64,3,opt,name=inf,proto3,oneof"`
}

func (*NumberFilter_Inf) MarshalToSizedBufferVT added in v0.2.2

func (m *NumberFilter_Inf) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NumberFilter_Inf) MarshalToVT added in v0.2.2

func (m *NumberFilter_Inf) MarshalToVT(dAtA []byte) (int, error)

func (*NumberFilter_Inf) SizeVT added in v0.2.2

func (m *NumberFilter_Inf) SizeVT() (n int)

type NumberFilter_Sup

type NumberFilter_Sup struct {
	Sup float64 `protobuf:"fixed64,2,opt,name=sup,proto3,oneof"`
}

func (*NumberFilter_Sup) MarshalToSizedBufferVT added in v0.2.2

func (m *NumberFilter_Sup) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*NumberFilter_Sup) MarshalToVT added in v0.2.2

func (m *NumberFilter_Sup) MarshalToVT(dAtA []byte) (int, error)

func (*NumberFilter_Sup) SizeVT added in v0.2.2

func (m *NumberFilter_Sup) SizeVT() (n int)

type NumberFilterer added in v0.4.0

type NumberFilterer interface {
	Equals(n float64) *FieldFilter
	Inf(n float64) *FieldFilter
	Sup(n float64) *FieldFilter
	IN(n ...float64) *FieldFilter
	NotIN(n ...float64) *FieldFilter
}

func NumberField added in v0.4.0

func NumberField(field string) NumberFilterer

type StringFilter

type StringFilter struct {

	// Types that are assignable to Condition:
	//
	//	*StringFilter_Equals
	//	*StringFilter_Regex
	//	*StringFilter_HasPrefix
	//	*StringFilter_HasSuffix
	//	*StringFilter_In_
	Condition       isStringFilter_Condition `protobuf_oneof:"condition"`
	CaseInsensitive bool                     `protobuf:"varint,4,opt,name=case_insensitive,json=caseInsensitive,proto3" json:"case_insensitive,omitempty"`
	// contains filtered or unexported fields
}

func (*StringFilter) Descriptor deprecated

func (*StringFilter) Descriptor() ([]byte, []int)

Deprecated: Use StringFilter.ProtoReflect.Descriptor instead.

func (*StringFilter) GetCaseInsensitive

func (x *StringFilter) GetCaseInsensitive() bool

func (*StringFilter) GetCondition

func (m *StringFilter) GetCondition() isStringFilter_Condition

func (*StringFilter) GetEquals

func (x *StringFilter) GetEquals() string

func (*StringFilter) GetHasPrefix added in v0.6.0

func (x *StringFilter) GetHasPrefix() string

func (*StringFilter) GetHasSuffix added in v0.6.0

func (x *StringFilter) GetHasSuffix() string

func (*StringFilter) GetIn

func (x *StringFilter) GetIn() *StringFilter_In

func (*StringFilter) GetRegex

func (x *StringFilter) GetRegex() string

func (*StringFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *StringFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter) MarshalToVT added in v0.2.2

func (m *StringFilter) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter) MarshalVT added in v0.2.2

func (m *StringFilter) MarshalVT() (dAtA []byte, err error)

func (*StringFilter) Match

func (x *StringFilter) Match(v *string) (bool, error)

Match applies the filter against the provided string pointer

func (*StringFilter) ProtoMessage

func (*StringFilter) ProtoMessage()

func (*StringFilter) ProtoReflect

func (x *StringFilter) ProtoReflect() protoreflect.Message

func (*StringFilter) Reset

func (x *StringFilter) Reset()

func (*StringFilter) SizeVT added in v0.2.2

func (m *StringFilter) SizeVT() (n int)

func (*StringFilter) String

func (x *StringFilter) String() string

func (*StringFilter) UnmarshalVT added in v0.2.2

func (m *StringFilter) UnmarshalVT(dAtA []byte) error

type StringFilter_Equals

type StringFilter_Equals struct {
	Equals string `protobuf:"bytes,1,opt,name=equals,proto3,oneof"`
}

func (*StringFilter_Equals) MarshalToSizedBufferVT added in v0.2.2

func (m *StringFilter_Equals) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter_Equals) MarshalToVT added in v0.2.2

func (m *StringFilter_Equals) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter_Equals) SizeVT added in v0.2.2

func (m *StringFilter_Equals) SizeVT() (n int)

type StringFilter_HasPrefix added in v0.6.0

type StringFilter_HasPrefix struct {
	HasPrefix string `protobuf:"bytes,5,opt,name=has_prefix,json=hasPrefix,proto3,oneof"`
}

func (*StringFilter_HasPrefix) MarshalToSizedBufferVT added in v0.6.0

func (m *StringFilter_HasPrefix) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter_HasPrefix) MarshalToVT added in v0.6.0

func (m *StringFilter_HasPrefix) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter_HasPrefix) SizeVT added in v0.6.0

func (m *StringFilter_HasPrefix) SizeVT() (n int)

type StringFilter_HasSuffix added in v0.6.0

type StringFilter_HasSuffix struct {
	HasSuffix string `protobuf:"bytes,6,opt,name=has_suffix,json=hasSuffix,proto3,oneof"`
}

func (*StringFilter_HasSuffix) MarshalToSizedBufferVT added in v0.6.0

func (m *StringFilter_HasSuffix) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter_HasSuffix) MarshalToVT added in v0.6.0

func (m *StringFilter_HasSuffix) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter_HasSuffix) SizeVT added in v0.6.0

func (m *StringFilter_HasSuffix) SizeVT() (n int)

type StringFilter_In

type StringFilter_In struct {
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*StringFilter_In) Descriptor deprecated

func (*StringFilter_In) Descriptor() ([]byte, []int)

Deprecated: Use StringFilter_In.ProtoReflect.Descriptor instead.

func (*StringFilter_In) GetValues

func (x *StringFilter_In) GetValues() []string

func (*StringFilter_In) MarshalToSizedBufferVT added in v0.2.2

func (m *StringFilter_In) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter_In) MarshalToVT added in v0.2.2

func (m *StringFilter_In) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter_In) MarshalVT added in v0.2.2

func (m *StringFilter_In) MarshalVT() (dAtA []byte, err error)

func (*StringFilter_In) ProtoMessage

func (*StringFilter_In) ProtoMessage()

func (*StringFilter_In) ProtoReflect

func (x *StringFilter_In) ProtoReflect() protoreflect.Message

func (*StringFilter_In) Reset

func (x *StringFilter_In) Reset()

func (*StringFilter_In) SizeVT added in v0.2.2

func (m *StringFilter_In) SizeVT() (n int)

func (*StringFilter_In) String

func (x *StringFilter_In) String() string

func (*StringFilter_In) UnmarshalVT added in v0.2.2

func (m *StringFilter_In) UnmarshalVT(dAtA []byte) error

type StringFilter_In_

type StringFilter_In_ struct {
	In *StringFilter_In `protobuf:"bytes,3,opt,name=in,proto3,oneof"`
}

func (*StringFilter_In_) MarshalToSizedBufferVT added in v0.2.2

func (m *StringFilter_In_) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter_In_) MarshalToVT added in v0.2.2

func (m *StringFilter_In_) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter_In_) SizeVT added in v0.2.2

func (m *StringFilter_In_) SizeVT() (n int)

type StringFilter_Regex

type StringFilter_Regex struct {
	Regex string `protobuf:"bytes,2,opt,name=regex,proto3,oneof"`
}

func (*StringFilter_Regex) MarshalToSizedBufferVT added in v0.2.2

func (m *StringFilter_Regex) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*StringFilter_Regex) MarshalToVT added in v0.2.2

func (m *StringFilter_Regex) MarshalToVT(dAtA []byte) (int, error)

func (*StringFilter_Regex) SizeVT added in v0.2.2

func (m *StringFilter_Regex) SizeVT() (n int)

type StringFilterer added in v0.4.0

type StringFilterer interface {
	Equals(s string) *FieldFilter
	NotEquals(s string) *FieldFilter
	IEquals(s string) *FieldFilter
	NotIEquals(s string) *FieldFilter
	Regex(s string) *FieldFilter
	NotRegex(s string) *FieldFilter
	IN(s ...string) *FieldFilter
	NotIN(s ...string) *FieldFilter
}

func StringField added in v0.4.0

func StringField(field string) StringFilterer

type TimeFilter

type TimeFilter struct {

	// Types that are assignable to Condition:
	//
	//	*TimeFilter_Equals
	//	*TimeFilter_Before
	//	*TimeFilter_After
	Condition isTimeFilter_Condition `protobuf_oneof:"condition"`
	// contains filtered or unexported fields
}

func (*TimeFilter) Descriptor deprecated

func (*TimeFilter) Descriptor() ([]byte, []int)

Deprecated: Use TimeFilter.ProtoReflect.Descriptor instead.

func (*TimeFilter) GetAfter

func (x *TimeFilter) GetAfter() *timestamppb.Timestamp

func (*TimeFilter) GetBefore

func (x *TimeFilter) GetBefore() *timestamppb.Timestamp

func (*TimeFilter) GetCondition

func (m *TimeFilter) GetCondition() isTimeFilter_Condition

func (*TimeFilter) GetEquals

func (x *TimeFilter) GetEquals() *timestamppb.Timestamp

func (*TimeFilter) MarshalToSizedBufferVT added in v0.2.2

func (m *TimeFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TimeFilter) MarshalToVT added in v0.2.2

func (m *TimeFilter) MarshalToVT(dAtA []byte) (int, error)

func (*TimeFilter) MarshalVT added in v0.2.2

func (m *TimeFilter) MarshalVT() (dAtA []byte, err error)

func (*TimeFilter) Match

func (x *TimeFilter) Match(v *timestamppb.Timestamp) (bool, error)

Match applies the filter against the provided Timestamp pointer

func (*TimeFilter) ProtoMessage

func (*TimeFilter) ProtoMessage()

func (*TimeFilter) ProtoReflect

func (x *TimeFilter) ProtoReflect() protoreflect.Message

func (*TimeFilter) Reset

func (x *TimeFilter) Reset()

func (*TimeFilter) SizeVT added in v0.2.2

func (m *TimeFilter) SizeVT() (n int)

func (*TimeFilter) String

func (x *TimeFilter) String() string

func (*TimeFilter) UnmarshalVT added in v0.2.2

func (m *TimeFilter) UnmarshalVT(dAtA []byte) error

type TimeFilter_After

type TimeFilter_After struct {
	After *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=after,proto3,oneof"`
}

func (*TimeFilter_After) MarshalToSizedBufferVT added in v0.2.2

func (m *TimeFilter_After) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TimeFilter_After) MarshalToVT added in v0.2.2

func (m *TimeFilter_After) MarshalToVT(dAtA []byte) (int, error)

func (*TimeFilter_After) SizeVT added in v0.2.2

func (m *TimeFilter_After) SizeVT() (n int)

type TimeFilter_Before

type TimeFilter_Before struct {
	Before *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=before,proto3,oneof"`
}

func (*TimeFilter_Before) MarshalToSizedBufferVT added in v0.2.2

func (m *TimeFilter_Before) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TimeFilter_Before) MarshalToVT added in v0.2.2

func (m *TimeFilter_Before) MarshalToVT(dAtA []byte) (int, error)

func (*TimeFilter_Before) SizeVT added in v0.2.2

func (m *TimeFilter_Before) SizeVT() (n int)

type TimeFilter_Equals

type TimeFilter_Equals struct {
	Equals *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=equals,proto3,oneof"`
}

func (*TimeFilter_Equals) MarshalToSizedBufferVT added in v0.2.2

func (m *TimeFilter_Equals) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TimeFilter_Equals) MarshalToVT added in v0.2.2

func (m *TimeFilter_Equals) MarshalToVT(dAtA []byte) (int, error)

func (*TimeFilter_Equals) SizeVT added in v0.2.2

func (m *TimeFilter_Equals) SizeVT() (n int)

type TimeFilterer added in v0.4.0

type TimeFilterer interface {
	Equals(t time.Time) *FieldFilter
	NotEquals(t time.Time) *FieldFilter
	After(t time.Time) *FieldFilter
	Before(t time.Time) *FieldFilter
}

func TimeField added in v0.4.0

func TimeField(field string) TimeFilterer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL