Questions tagged [protoreflect]

4 questions
7
votes
3 answers

Importing proto files from different package causes 'missing method protoreflect'

I am new to Go and Protobufs hence this might be a very noob question. Sorry for that. I have several packages in my go project and I wanted to create a seperate package which contains all my .proto (also .pb.go) files and then I can import those…
Ahsan Nasir
  • 147
  • 1
  • 2
  • 7
2
votes
1 answer

How to add a nil entry in Go protobuf slice field with protoreflect?

My generated protobuf Go struct looks like: type ProtoStruct { A []*SomeStruct } I am now trying to append a nil entry to that slice with protoreflect. I tried: var v protoreflect.Value // somehow get this value from previous…
Zhixin Wen
  • 95
  • 8
1
vote
1 answer

Updating Firestore documents in Golang using structs (or protobuf messages) as data

Given the following API: syntax = "proto3"; service FooService { rpc UpdateFoo(UpdateFooRequest) returns (Foo) {} } message Foo { string name = 1; string description = 2; string action = 3; } message UpdateFooRequest { Foo foo = 1; //…
user8285681
  • 543
  • 4
  • 12
1
vote
0 answers

How do we Marshal dynamic proto (from jhump/protoreflect) using gogo JSONPB marshaler

I have a dynamic proto created using jhump/protoreflect. When I try to marshal the proto object using gogo jsonpb I end up with below mentioned error. Code: import "github.com/gogo/protobuf/types" ... p := protoparse.Parser{ Accessor:…
Kishore Bandi
  • 5,537
  • 2
  • 31
  • 52