Versions in this module Expand all Collapse all v3 v3.0.0 Mar 26, 2026 Changes in this version + const ContentTypeHeaderKey + var ContentTypes = []ContentType + func ContentTypeToString(c ContentType) string + func Decode(data []byte, ct *contentType, dest any) error + func DecodeJSON(data []byte, dest any) error + func MustDecode(data []byte, ct *contentType, dest any) + func MustDecodeJSON(data []byte, dest any) + func MustEncode(data any, ct *contentType) []byte + func MustEncodeJSON(data any) []byte + func MustJSONIntoReader(data any) io.Reader + func RegisterServerEncoderDecoder(i do.Injector) + type ClientEncoder interface + ContentType func() string + Encode func(ctx context.Context, dest io.Writer, v any) error + EncodeReader func(ctx context.Context, data any) (io.Reader, error) + Unmarshal func(ctx context.Context, data []byte, v any) error + func ProvideClientEncoder(logger logging.Logger, tracerProvider tracing.TracerProvider, ...) ClientEncoder + type Config struct + ContentType string + func (cfg *Config) ValidateWithContext(ctx context.Context) error + type ContentType *contentType + var ContentTypeEmoji ContentType = buildContentType(contentTypeEmoji) + var ContentTypeJSON ContentType = buildContentType(contentTypeJSON) + var ContentTypeTOML ContentType = buildContentType(contentTypeTOML) + var ContentTypeXML ContentType = buildContentType(contentTypeXML) + var ContentTypeYAML ContentType = buildContentType(contentTypeYAML) + func ProvideContentType(cfg Config) ContentType + type ServerEncoderDecoder interface + DecodeBytes func(ctx context.Context, payload []byte, dest any) error + DecodeRequest func(ctx context.Context, req *http.Request, dest any) error + EncodeResponseWithStatus func(ctx context.Context, res http.ResponseWriter, val any, statusCode int) + MustEncode func(ctx context.Context, v any) []byte + MustEncodeJSON func(ctx context.Context, v any) []byte + func ProvideServerEncoderDecoder(logger logging.Logger, tracerProvider tracing.TracerProvider, ...) ServerEncoderDecoder Other modules containing this package github.com/verygoodsoftwarenotvirus/platform github.com/verygoodsoftwarenotvirus/platform/v2 github.com/verygoodsoftwarenotvirus/platform/v4