anonymous

package
v6.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 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

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. Every ancestor container is examined for an exclusion tag even when flat encoding is enabled: flat encoding writes the promoted field directly into the root map, so a skipped container must suppress the field rather than merely omitting the nested container names.

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