I don't know what type of field type to specify in the message type in the proto file.

Asked 2 years ago, Updated 2 years ago, 275 views

We create proto files, create microservices with Go and Nxt, and develop services that communicate with gRPC.

In order to realize a certain functionality, I am thinking of sending the acquired data to the front service as a response using the YouTube Data API.

The response of the Youtube Data API is returned as a JSON object, but I do not know how to specify the field type in the proto file message type, so I am thinking about it for a long time.

message ChannelListResponse{
   channel_list=1;
}

I would appreciate your advice.

go protocol-buffers

2022-10-07 01:00

1 Answers

You can define the type of structure called Go as the type of Protocol Buffers, so you should use it: https://developers.google.com/protocol-buffers/docs/proto3#other


2022-10-07 01:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.