Help us shape the future of Go! Take the 2026 Go Developer Survey

filter

package
v1.34.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringFilter

type StringFilter struct {

	// Empty matches the value against the empty value.
	Empty bool `protobuf:"varint,1,opt,name=empty,proto3" json:"empty,omitempty"`
	// NotEmpty matches the value against a not-empty value.
	NotEmpty bool `protobuf:"varint,2,opt,name=not_empty,json=notEmpty,proto3" json:"notEmpty,omitempty"`
	// Value matches an exact value.
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// Values matches one or more exact values.
	// If any of the values match, this field is considered matched.
	Values []string `protobuf:"bytes,4,rep,name=values,proto3" json:"values,omitempty"`
	// Re matches the value against a regular expression.
	Re string `protobuf:"bytes,5,opt,name=re,proto3" json:"re,omitempty"`
	// HasPrefix checks if the value has the given prefix.
	HasPrefix string `protobuf:"bytes,6,opt,name=has_prefix,json=hasPrefix,proto3" json:"hasPrefix,omitempty"`
	// HasSuffix checks if the value has the given suffix.
	HasSuffix string `protobuf:"bytes,7,opt,name=has_suffix,json=hasSuffix,proto3" json:"hasSuffix,omitempty"`
	// Contains checks if the value contains the given value.
	Contains string `protobuf:"bytes,8,opt,name=contains,proto3" json:"contains,omitempty"`
	// contains filtered or unexported fields
}

StringFilter matches the value of a string against a set of rules. All of the non-zero rules must match for the filter to match. An empty filter matches any.

func (*StringFilter) CheckMatch

func (f *StringFilter) CheckMatch(value string) bool

CheckMatch checks if the given value matches the string filter.

func (*StringFilter) CloneMessageVT

func (m *StringFilter) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*StringFilter) CloneVT

func (m *StringFilter) CloneVT() *StringFilter

func (*StringFilter) EqualMessageVT

func (this *StringFilter) EqualMessageVT(thatMsg any) bool

func (*StringFilter) EqualVT

func (this *StringFilter) EqualVT(that *StringFilter) bool

func (*StringFilter) GetContains

func (x *StringFilter) GetContains() string

func (*StringFilter) GetEmpty

func (x *StringFilter) GetEmpty() bool

func (*StringFilter) GetHasPrefix

func (x *StringFilter) GetHasPrefix() string

func (*StringFilter) GetHasSuffix

func (x *StringFilter) GetHasSuffix() string

func (*StringFilter) GetNotEmpty

func (x *StringFilter) GetNotEmpty() bool

func (*StringFilter) GetRe

func (x *StringFilter) GetRe() string

func (*StringFilter) GetValue

func (x *StringFilter) GetValue() string

func (*StringFilter) GetValues

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

func (*StringFilter) MarshalJSON added in v1.12.2

func (x *StringFilter) MarshalJSON() ([]byte, error)

MarshalJSON marshals the StringFilter to JSON.

func (*StringFilter) MarshalProtoJSON added in v1.12.2

func (x *StringFilter) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the StringFilter message to JSON.

func (*StringFilter) MarshalProtoText added in v1.12.2

func (x *StringFilter) MarshalProtoText() string

func (*StringFilter) MarshalToSizedBufferVT

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

func (*StringFilter) MarshalToVT

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

func (*StringFilter) MarshalVT

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

func (*StringFilter) ProtoMessage

func (*StringFilter) ProtoMessage()

func (*StringFilter) Reset

func (x *StringFilter) Reset()

func (*StringFilter) SizeVT

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

func (*StringFilter) String

func (x *StringFilter) String() string

func (*StringFilter) UnmarshalJSON added in v1.12.2

func (x *StringFilter) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the StringFilter from JSON.

func (*StringFilter) UnmarshalProtoJSON added in v1.12.2

func (x *StringFilter) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the StringFilter message from JSON.

func (*StringFilter) UnmarshalVT

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

func (*StringFilter) Validate

func (f *StringFilter) Validate() error

Validate validates the string filter.

Jump to

Keyboard shortcuts

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