validation

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

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