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

protofilter

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateAgainst

func EvaluateAgainst(filter string, obj FieldGetter) (bool, error)

func ParseProtofilter

func ParseProtofilter(filter string) ([]string, error)

ParseProtofilter parses a full filter string into SQL WHERE conditions

Types

type FieldGetter

type FieldGetter interface {
	GetField(name string) (any, bool)
}

FieldGetter allows evaluating filters on arbitrary objects by name-based lookup

type WorkerStateAdapter

type WorkerStateAdapter struct {
	Fields map[string]any
}

func NewWorkerStateAdapter

func NewWorkerStateAdapter(worker interface{}) *WorkerStateAdapter

func (*WorkerStateAdapter) GetField

func (w *WorkerStateAdapter) GetField(name string) (any, bool)

Jump to

Keyboard shortcuts

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