Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*QueryGenerator)
Option is a function that configures a query generator.
func WithFieldValidator ¶
WithFieldValidator allows checking incoming field names. This can be used to prevent users from querying fields that they are not allowed to query. Example usage:
WithFieldValidator(func(name string) error { if !allowedFields[name] { return fmt.Errorf("field %s is not allowed", name) } return nil })
type QueryGenerator ¶
type QueryGenerator struct {
// contains filtered or unexported fields
}
func NewQueryGenerator ¶
func NewQueryGenerator(options ...Option) *QueryGenerator
func (*QueryGenerator) ConvertAST ¶
ConvertAST converts a KQL AST to an Elasticsearch query.
Click to show internal directories.
Click to hide internal directories.