Questions tagged [proto]

Related to Google Protocol Buffers, borrows its name from the .proto file extension containing a protocol schema.

564 questions
-1
votes
1 answer

proto file, generated code in python and go

I am trying to generate python and go code using same proto file. My proto file looks like: message City { string name = 1; int32 street_no = 2; } When I generate the code in python using below command: python3 -m grpc_tools.protoc -I proto/…
u_peerless
  • 644
  • 2
  • 9
  • 23
-1
votes
1 answer

Best way to send object of array in response grpc

I want to make response in proto which is something like this in REST format : response = { "cars":[{'asd':1 , 'date': 1},{'asd':1 , 'date': 1},{'asd':1 , 'date': 1}], "houses":[{'asd':1 , 'date':Flexible Savings 1},{'asd':1 , 'date':…
Ninja
  • 241
  • 2
  • 3
  • 13
-1
votes
1 answer

How do you define a file response as a Message

I'm using proto to define a REST service In my service, I'm trying to document that a service responds with a file. I've looked through here https://github.com/protocolbuffers/protobuf/tree/master/src/google/protobuf but couldn't find anything that…
Daniel
  • 34,125
  • 17
  • 102
  • 150
-1
votes
1 answer

Need to convert python dict in proto message format for gRPC

I have a format like this and want to convert my python dict to this proto format proto code: message template{ message NicSettings{ string network_adapter = 1; string network_name = 2; } message NetConfig{ bool keep_mac_address…
Rohan Nagalkar
  • 433
  • 2
  • 5
  • 15
-2
votes
1 answer

oneof CustomType protobuf

I am tyring to replicate python schema code to golang(protobuf). I am stuck in 1 of the condition. message Type1 { enum Type{ type1 = 1 } Type type = 0; string name = 1; } message Type2 { enum Type{ type2 = 1 } Type type = 0; string name =…
Pawan Kumar
  • 247
  • 6
  • 21
-2
votes
1 answer

How to manipulate kubernetes PodSpec object

I am looking for some help with the golang code to modify the podspec based on user input. This is my flow. User provides an incomplete yaml file to create deployment. Assume they are missing/update environment variables information. User also gives…
-2
votes
2 answers

Difference between Object.create & new keyword in javaScript

why output is coming on one case and not on the other? both of them have a variable inside their proto , yet I am getting undefined in one case.
Abhinav Kant
  • 124
  • 1
  • 6
-2
votes
2 answers

Busybox 1.23 proto option not working in ip link command

I try to issue this command on an ARM box with busybox installed: ip link add link eth0 eth0.100 type vlan proto 802.1q id 100 I get an error: argument of "protocol" must be "on" or "off" What am I doing wrong?
Argonne
  • 11
  • 1
  • 4
-4
votes
1 answer

Why do you need 'this' before a method in a constructor function?

In the code below, I think the way the prototypal chain works (basically) is that if a child object (mike, in this case) doesn't have a method itself, it looks up the prototype chain, via __ proto__, to see if a parent object has it within its…
desalwe
  • 19
  • 6
1 2 3
37
38