Documentation
¶
Index ¶
- func NewGatewayServeMux(logger *zap.Logger, opts ...runtime.ServeMuxOption) *runtime.ServeMux
- type V1toV2MarshallerAdapter
- func (m *V1toV2MarshallerAdapter) ContentType(v interface{}) string
- func (m *V1toV2MarshallerAdapter) Marshal(v interface{}) ([]byte, error)
- func (m *V1toV2MarshallerAdapter) NewDecoder(r io.Reader) grpc_gateway_v2.Decoder
- func (m *V1toV2MarshallerAdapter) NewEncoder(w io.Writer) grpc_gateway_v2.Encoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGatewayServeMux ¶
NewGatewayServeMux builds a new gateway serve mux with common options.
Types ¶
type V1toV2MarshallerAdapter ¶ added in v1.54.0
type V1toV2MarshallerAdapter struct { *grpc_gateway_v2.JSONPb // contains filtered or unexported fields }
V1toV2MarshallerAdapter is a V1 to V2 marshaller adapter to be able to use the v1 marshaller from grpc-gateway v2.
This is required to fix a backwards compatibility issue with the v2 marshaller where `null` map values cause an error because they are not allowed by the proto spec, but they were handled by the v1 marshaller.
See: https://github.com/flipt-io/flipt/issues/664
TODO: remove this custom marshaller for Flipt API v2 as we want to use the default v2 marshaller directly.
func NewV1toV2MarshallerAdapter ¶ added in v1.54.0
func NewV1toV2MarshallerAdapter(logger *zap.Logger) *V1toV2MarshallerAdapter
func (*V1toV2MarshallerAdapter) ContentType ¶ added in v1.54.0
func (m *V1toV2MarshallerAdapter) ContentType(v interface{}) string
func (*V1toV2MarshallerAdapter) Marshal ¶ added in v1.54.0
func (m *V1toV2MarshallerAdapter) Marshal(v interface{}) ([]byte, error)
func (*V1toV2MarshallerAdapter) NewDecoder ¶ added in v1.54.0
func (m *V1toV2MarshallerAdapter) NewDecoder(r io.Reader) grpc_gateway_v2.Decoder
func (*V1toV2MarshallerAdapter) NewEncoder ¶ added in v1.54.0
func (m *V1toV2MarshallerAdapter) NewEncoder(w io.Writer) grpc_gateway_v2.Encoder
Click to show internal directories.
Click to hide internal directories.