gateway

package
v1.54.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGatewayServeMux

func NewGatewayServeMux(logger *zap.Logger, opts ...runtime.ServeMuxOption) *runtime.ServeMux

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 (*V1toV2MarshallerAdapter) NewEncoder added in v1.54.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL