Support the ‘Any’ protobuf type from an external grpc-gateway process


This is just a quick one. I had some trouble making the Any protobuf type work when running grpc-gateway from a separate process with the gateway throwing an unknown message type error. A quick fix for this is to import the generated pb.go file to your proxy source. Something like: package main import ( … _ "" )

Any · Grpc-Gateway · Protobuf

1 minute

Extract gRPC-generated functions to a list


This might be hacky and there might be a proper way to do this but recently, I needed to generate all the functions’ gRPC-generated full names from our protobuf definitions. This is part of our RBAC module that needs to filter gRPC function calls. I got the list from our generated Go client using the following command(s): Main command: $ grep -o -R -i -E '"/blueapi..*"' . | awk -F':' '{gsub(/"/, "", $2); print "-", substr($2, 2);}' | sort | uniq # Actual commands; save as yaml: $ echo "functions:" > /tmp/funcs.

Cmdline · Golang · Grpc · Grpc-Gateway

1 minute