All Questions
Tagged with go protocol-buffers
716
questions
1
vote
1
answer
50
views
Protobuf failing to produce the code with the `unable to determine Go import path for` error
I have two proto files according to the following structure in my file system:
protos
├── kws
│ └── kws.proto
├── common
│ └── common.proto
And here is their content:
common.proto
syntax = "...
0
votes
0
answers
31
views
How renaming a proto field can be a breaking change during the rolling deployment? [duplicate]
I have several Golang microservices communicating with each other via gRPC, using protocol buffers (proto) to define the APIs. The proto file is centralized and shared across multiple services.
Is ...
0
votes
0
answers
28
views
Postgresql TIME to proto timestamppb conversion giving negative value
I have a field in the postgres with TIME datatype. For GRPC in proto file as time.Time is not supported, so I'm using google.protobuf.Timestamp.
message Msg {
string id = 1;
google.protobuf....
1
vote
0
answers
82
views
Why the Protobuff is slower than JSON.stringify() in NodeJS?
In our system, we are trying to reduce the data transfer duration between two applications through RabbitMQ. To do so, we are doing some tests with Protobuff and Flatbuffer. According to our test, ...
1
vote
1
answer
52
views
Golang proto not generate method SendAndClose for stream
Just start to looking how to configure grpc by examples (i am new into grpc, golang). I tried to build bidirectional stream using this greet.proto file
message GreetRequest {
string first_name = 1;
}...
3
votes
1
answer
98k
views
Why the default implementation of foo.pb.go use global registry, can I modify it to avoid namesapce conflict?
From the official doc says. It will meet a namespace conflict if I have a single proto file and using it generated two pb in different pkg. For example, example.proto is generate into two example.pb....
0
votes
1
answer
52
views
Relative Import in Protobuf
Folder structure:
service.proto
syntax = "proto3";
package service;
option go_package = "../../../proto-generated/user/service";
import "user/models/models....
2
votes
1
answer
115
views
Extend grpc-gateway generated functions with custom decode logic in proto.Message
In the course of work there appeared a necessity to perform strings.TrimSpace on all fields with protobuf type string
As a result it was decided to write a plugin that generates the necessary ...
2
votes
0
answers
40
views
Go-grpc-gateway: invalid character '<' looking for beginning of value
I'm trying to create an app using go grpc gateway but I faced with the problem. I integrate external service using it's webhooks that use XML format. But as I understand grpc gateway doesn't support ...
1
vote
1
answer
495
views
Why its reported "proto: cannot parse invalid wire-format data" when using protobuf in golang to unmarshal pb message?
There are two pb struct in my message.pb.go, the file is generate by messsage.proto.
The message.proto is like:
syntax = "proto2";
option go_package = "../record_proto";
package ...
1
vote
0
answers
99
views
User agent becomes grpc-go/1.64. on server side of grpc gateway
I'm trying to create an app using grpc-gateway and go but faced with the problem. I'm trying to write an interceptor that will authorize users before the requests using cookie and user agent. However ...
4
votes
1
answer
113
views
Serialization problem in grpc gateway(go)
I'm trying to create a microservice app using grpc gateway, but faced with a small problem. When I try to send request to api, my fields initialize as zero-value. It's the first time when I'm trying ...
0
votes
0
answers
56
views
retain data type of unstructured json attributes sent over go rpc
I'm encountering an issue with JSON marshaling and unmarshaling in Go. Specifically, I have an unstructured JSON object that includes attributes like "port", which is of type uint64. However,...
1
vote
2
answers
93
views
Importing wrong package when autogenerating code using proto buff (.proto files)
So I am working on a project using proto buff where I need to generate golang code using .proto files.
My issue is that it is importing wrong package when I generate golang code.
So this is how my ...
1
vote
1
answer
133
views
How does the protoregistry.GlobalTypes load the types?
I am trying to unmarshal an envoy config from JSON to a Go proto struct. The JSON has an Any field with type information. I know that protojson somehow magically determines the proto definitions in ...