anonymous

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalContainerNamesForField

func MarshalContainerNamesForField(
	modelType reflect.Type,
	indexPath []int,
	resolve func(reflect.StructField) (string, bool),
	flatten bool,
) ([]string, bool)

MarshalContainerNamesForField resolves legacy anonymous-container names for a promoted field unless flat encoding is enabled.

func RequestsFlatEncoding

func RequestsFlatEncoding(value any) bool

RequestsFlatEncoding returns true when the supplied value opts into flat anonymous-embed encoding.

func SetMarshaledAttributeValue

func SetMarshaledAttributeValue(
	root map[string]types.AttributeValue,
	containerNames []string,
	fieldName string,
	av types.AttributeValue,
	flatten bool,
) error

SetMarshaledAttributeValue writes a field AttributeValue either directly into the root map for flat encoding or into the nested legacy anonymous-container path for compatibility encoding.

Types

type FlatEncodingLookup

type FlatEncodingLookup interface {
	FlatAnonymousEmbedEncodingEnabled() bool
}

FlatEncodingLookup reports whether a converter or option carrier requests flat promoted-field encoding for exported anonymous embedded structs.

Jump to

Keyboard shortcuts

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