-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamodb/attributevalue: allow registration of custom type marshal/unmarshal functions #2042
Comments
so.. turns out this still isn't a thing, could you point me to a fork/custom implementation of an attributevalue encoder/decoder that allows me to register a uuid type? |
Just closed PR exists https://github.com/aws/aws-sdk-go-v2/pull/2060/files |
Hi all, thank you for your patience. At this point in time, there is no plan to implement this. We are aware that there discussions happening on the standard library level, and we want to see how this is developing before taking any action on it from our side. I hope we can revisit this sooner than later. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
+1 to @ztison proposal on how to ideally expose custom marshaler/unmarshaller. The existing interface makes the code extremely verbose and complex. For example, we use go generics when interacting with DynamoDB. DynamoDB does not handle |
I work with @ztison, we were ultimately forced to fork |
Describe the feature
As a DynamoDB user, I want to be able to register custom marshaler/unmarshaler functions.
Use Case
I want to have common API types not coupled with the repository layer. So I don't want to implement
MarshalDynamoDBAttributeValue
andUnmarshalDynamoDBAttributeValue
functions with dependency onAttributeValue
in my high-level code.I want to implement custom marshaler/unmarshaler for types that I don't own. It can be required because of data masking or to omit empty values.
Proposed Solution
Other Information
Based on customer marshaler/unmarshaler for json
Rejected Alternatives
API without exposing reflect:
API based on generics:
Acknowledgements
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue@v1.10.14
github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression@v1.4.39
github.com/aws/aws-sdk-go-v2/service/dynamodb@v1.18.4
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams@v1.14.4
Go version used
go version go1.19.5 darwin/arm64
The text was updated successfully, but these errors were encountered: