validation

package
v6.5.2-rc Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 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

View Source
const (
	MaxFieldNameLength   = 255
	MaxOperatorLength    = 20
	MaxValueStringLength = 400000 // DynamoDB item size limit
	MaxNestedDepth       = 32
	MaxExpressionLength  = 4096
)

Field validation constants

Variables

This section is empty.

Functions

func ValidateExpression

func ValidateExpression(expression string) error

ValidateExpression validates a complete expression for security

func ValidateFieldName

func ValidateFieldName(field string) error

ValidateFieldName validates a DynamoDB attribute name according to AWS rules and security best practices

func ValidateIndexName

func ValidateIndexName(name string) error

ValidateIndexName validates a DynamoDB index name

func ValidateOperator

func ValidateOperator(op string) error

ValidateOperator validates a DynamoDB condition operator

func ValidateTableName

func ValidateTableName(name string) error

ValidateTableName validates a DynamoDB table name

func ValidateValue

func ValidateValue(value any) error

ValidateValue validates a value used in DynamoDB expressions

Types

type SecurityError

type SecurityError struct {
	Type   string
	Field  string
	Detail string
}

SecurityError represents a security validation error

func (*SecurityError) Error

func (e *SecurityError) Error() string

Jump to

Keyboard shortcuts

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