validator

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchAttributesValidator

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

SearchAttributesValidator is used to validate search attributes

func NewSearchAttributesValidator

func NewSearchAttributesValidator(
	logger log.Logger,
	enableQueryAttributeValidation dynamicproperties.BoolPropertyFn,
	validSearchAttributes dynamicproperties.MapPropertyFn,
	searchAttributesNumberOfKeysLimit dynamicproperties.IntPropertyFnWithDomainFilter,
	searchAttributesSizeOfValueLimit dynamicproperties.IntPropertyFnWithDomainFilter,
	searchAttributesTotalSizeLimit dynamicproperties.IntPropertyFnWithDomainFilter,
) *SearchAttributesValidator

NewSearchAttributesValidator create SearchAttributesValidator

func (*SearchAttributesValidator) ValidateSearchAttributes

func (sv *SearchAttributesValidator) ValidateSearchAttributes(input *types.SearchAttributes, domain string) error

ValidateSearchAttributes validate search attributes are valid for writing and not exceed limits

type VisibilityQueryValidator

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

VisibilityQueryValidator for sql query validation

func NewQueryValidator

func NewQueryValidator(
	validSearchAttributes dynamicproperties.MapPropertyFn,
	enableQueryAttributeValidation dynamicproperties.BoolPropertyFn) *VisibilityQueryValidator

NewQueryValidator create VisibilityQueryValidator

func (*VisibilityQueryValidator) ValidateQuery added in v0.17.0

func (qv *VisibilityQueryValidator) ValidateQuery(whereClause string) (string, error)

ValidateQuery validates that search attributes in the query are legal. Adds attr prefix for customized fields and returns modified query.

Jump to

Keyboard shortcuts

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