Does anyone know of a library that exists or the suggested way to copy a struct into another struct . A kind of mapper.
I am trying to do something similar to this explained in this video
https://www.youtube.com/watch?v=nLskCRJOdxM (see video starting at 13:00)
The above 2 transports have their own way of dealing with things, HTTP Handler uses a request / response, gRPC pb generated files.
Controller – both the gRPC and Http handler would talk to the controller in generic / agnostic way. So I need a good way of mapping from Handler / gRPC into a “ControllerRequest” and then the Controller would return its ControllerResponse (again not specific to any transport) – do I need a way of mapping from a ControllerResponse back to the Http Handler Response or pb response.
This keeps the controller agnostic and can be shared amongst different transports.
I was looking for the best way of doing this , can anyone help ?