Versions in this module Expand all Collapse all v0 v0.2.0 May 17, 2024 v0.1.0 Oct 25, 2023 Changes in this version + const CodecJSON + const CodecProto + const CompressionGzip + const CompressionIdentity + const DefaultMaxGetURLBytes + const DefaultMaxMessageBufferBytes + const ProtocolConnect + const ProtocolGRPC + const ProtocolGRPCWeb + const ProtocolREST + type Codec interface + MarshalAppend func(base []byte, msg proto.Message) ([]byte, error) + Name func() string + Unmarshal func(data []byte, msg proto.Message) error + type JSONCodec struct + MarshalOptions protojson.MarshalOptions + UnmarshalOptions protojson.UnmarshalOptions + func NewJSONCodec(res TypeResolver) *JSONCodec + func (j JSONCodec) IsBinary() bool + func (j JSONCodec) MarshalAppend(base []byte, msg proto.Message) ([]byte, error) + func (j JSONCodec) MarshalAppendField(base []byte, msg proto.Message, field protoreflect.FieldDescriptor) ([]byte, error) + func (j JSONCodec) MarshalAppendStable(base []byte, msg proto.Message) ([]byte, error) + func (j JSONCodec) Name() string + func (j JSONCodec) Unmarshal(bytes []byte, msg proto.Message) error + func (j JSONCodec) UnmarshalField(data []byte, msg proto.Message, field protoreflect.FieldDescriptor) error + type ProtoCodec struct + func NewProtoCodec(res TypeResolver) *ProtoCodec + func (p *ProtoCodec) IsBinary() bool + func (p *ProtoCodec) MarshalAppend(base []byte, msg proto.Message) ([]byte, error) + func (p *ProtoCodec) MarshalAppendStable(base []byte, msg proto.Message) ([]byte, error) + func (p *ProtoCodec) Name() string + func (p *ProtoCodec) Unmarshal(bytes []byte, msg proto.Message) error + type Protocol int + func (p Protocol) String() string + type RESTCodec interface + MarshalAppendField func(base []byte, msg proto.Message, field protoreflect.FieldDescriptor) ([]byte, error) + UnmarshalField func(data []byte, msg proto.Message, field protoreflect.FieldDescriptor) error + type Service struct + func NewService(servicePath string, handler http.Handler, opts ...ServiceOption) *Service + func NewServiceWithSchema(schema protoreflect.ServiceDescriptor, handler http.Handler, ...) *Service + type ServiceOption interface + func WithMaxGetURLBytes(limit uint32) ServiceOption + func WithMaxMessageBufferBytes(limit uint32) ServiceOption + func WithNoTargetCompression() ServiceOption + func WithTargetCodecs(names ...string) ServiceOption + func WithTargetCompression(names ...string) ServiceOption + func WithTargetProtocols(protocols ...Protocol) ServiceOption + func WithTypeResolver(resolver TypeResolver) ServiceOption + type StableCodec interface + IsBinary func() bool + MarshalAppendStable func(b []byte, msg proto.Message) ([]byte, error) + type Transcoder struct + func NewTranscoder(services []*Service, opts ...TranscoderOption) (*Transcoder, error) + func (t *Transcoder) ServeHTTP(writer http.ResponseWriter, request *http.Request) + type TranscoderOption interface + func WithCodec(newCodec func(TypeResolver) Codec) TranscoderOption + func WithCompression(name string, newCompressor func() connect.Compressor, ...) TranscoderOption + func WithDefaultServiceOptions(serviceOptions ...ServiceOption) TranscoderOption + func WithRules(rules ...*annotations.HttpRule) TranscoderOption + func WithUnknownHandler(unknownHandler http.Handler) TranscoderOption + type TypeResolver interface