Description

An Unmarshaler is an interface to provide custom unmarshaling of AttributeValues. Use this to provide custom logic determining how AttributeValues should be unmarshaled.

type ExampleUnmarshaler struct {
	Value int
}

type (u *exampleUnmarshaler) UnmarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error {
	if av.N == nil {
		return nil
	}

	n, err := strconv.ParseInt(*av.N, 10, 0)
	if err != nil {
		return err
	}

	u.Value = n
	return nil
}

Unmarshaler is referenced in 1 repository

github.com/aws/aws-sdk-go