api: add static router and improve path parser in rpc handler (#1437)
* api: add static router and improve path parser in rpc handler Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * expose metadata context key to be able to get unmodified map keys Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * server/grpc: fix jsonpb codec for protobuf msg Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * api/handler/rpc: write 204 status code when rsp is nil Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * api/handler/rpc: add check for nil response for non javascript Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
bf7cb081f4
commit
b7887155ba
6
codec.go
6
codec.go
@ -20,7 +20,11 @@ type bytesCodec struct{}
|
|||||||
type protoCodec struct{}
|
type protoCodec struct{}
|
||||||
type wrapCodec struct{ encoding.Codec }
|
type wrapCodec struct{ encoding.Codec }
|
||||||
|
|
||||||
var jsonpbMarshaler = &jsonpb.Marshaler{}
|
var jsonpbMarshaler = &jsonpb.Marshaler{
|
||||||
|
EnumsAsInts: false,
|
||||||
|
EmitDefaults: false,
|
||||||
|
OrigName: true,
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
defaultGRPCCodecs = map[string]encoding.Codec{
|
defaultGRPCCodecs = map[string]encoding.Codec{
|
||||||
|
Loading…
Reference in New Issue
Block a user