Make getting raw responses from iterators easier
codyoss opened this issue · 0 comments
Recently we have had a couple of issues opened around extracting such values. Our current iterator design has us generating an iterator type for each repeated field that automatic pagination for an RPC operates over: https://google.aip.dev/client-libraries/4233. This means that two different RPC could return the same iterator type. This is nice in the fact that we are generating less pagination helper code, but can makes it harder for users that want to extract raw responses from the RPC due to things like extra metadata that are returned from a List RPC. This means the the Response field of every iterator is an interface{}/any
. Unless a user digs into the code a bit it is not always clear what the type could be. We should find a way to make this experience better in the future and/or generate some extra docs/samples somewhere around how and what type to extract the Response two.
Context: