validator

package
Version: v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 10 Imported by: 2

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,
	validSearchAttributes dynamicconfig.MapPropertyFn,
	searchAttributesNumberOfKeysLimit dynamicconfig.IntPropertyFnWithDomainFilter,
	searchAttributesSizeOfValueLimit dynamicconfig.IntPropertyFnWithDomainFilter,
	searchAttributesTotalSizeLimit dynamicconfig.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 dynamicconfig.MapPropertyFn) *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
t or T : Toggle theme light dark auto
y or Y : Canonical URL