Hi

I've a proto3 file:

======
message Any {
}

message InsertParams {
    Any Record = 1;
}

service myService {
    rpc Insert (InsertParams) returns (InsertResponse);
 }
========

where I have an "Insert" API which expects a InsertParams struct as the 
parameter. However, the InsertParams struct has a Record field, that is 
needed to work across any datatype (a byte array, struct, string, int, 
etc.).

So, I created an Any type of message in the proto file. However, the 
generated _pb.go file is making the "Any" as a struct instead of an 
interface.

Is there any way to define a proto grpc API which will work across a 
generic type of parameter ?

Thanks.

Sankar

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to