Hello,
I have similar question related to using message types with string fields
e.g.
message Document
{
On Tuesday, September 25, 2018 at 6:41:46 PM UTC+5:30, omid pourhadi wrote:
>
> Hi,
>
> I'm new to protobuf and I'm trying to create a simple CRUD app with grpc
> my proto file is :
>
> service AcceptorService {
> rpc create (Acceptor) returns (Acceptor) {};
> rpc update (Acceptor) returns (Acceptor) {};
> rpc list(Pagination) returns (AcceptorList) {};
> rpc count(Pagination) returns (AcceptorCount) {};
> }
>
>
>
> message Acceptor {
> string name = 1;
> string acceptorCode = 3;
> }
>
> message AcceptorList {
> repeated Acceptor acceptors=100;
> }
>
> message AcceptorCount {
> int64 count = 1;
> }
>
> message Pagination{
> int32 page = 1;
> int32 pageSize = 2;
> }
>
>
>
> What I want to achieve is not to use message as return type for example I
> want to change count rpc as follow :
>
> service AcceptorService {
> rpc count(int32 page, int32 pageSize) returns (int32 count) {};
> }
>
> is it possible ? because I get this error proto:15:34: Expected message
> type.
>
> PS: I'm using proto3
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/b1136134-196d-43c1-bbcb-23a40e140df5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.