Skip to content

refactor: update metadata models#180

Merged
ravisuhag merged 2 commits intomainfrom
update-metadata-models
Aug 28, 2021
Merged

refactor: update metadata models#180
ravisuhag merged 2 commits intomainfrom
update-metadata-models

Conversation

@StewartJingga
Copy link
Contributor

func (s *Sink) getDataMapper(data interface{}) func(interface{}) interface{} {
if s.cachedDataMapper == nil {
s.cachedDataMapper = s.buildDataMapper(data)
func (s *Sink) mapData(data interface{}) (interface{}, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravisuhag We need this function to map fields (e.g. resource.urn to urn) so Columbus will accept the payload.

I gave myself a time to find a better approach but I could not orchestrate a better way to map these nested fields before sending to Columbus without making it overly complicated. I tried a few efforts using reflect library and it made it super complicated and without success.

So now I'm using the most easier approach just to get it working.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for now. Anyway, we are likely to change Columbus contract and there might be some changes in models as well.

@ravisuhag ravisuhag merged commit d7b3814 into main Aug 28, 2021
@ravisuhag ravisuhag deleted the update-metadata-models branch August 28, 2021 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants