# Functions
InputPayloadFor determines the InputPayload for the type stored in i, respecting [RestateUnmarshaler] implementors.
Marshal converts its input v into []byte using the codec, respecting [RestateMarshaler] implementors.
OutputPayloadFor determines the OutputPayload for the type stored in o, respecting [RestateMarshaler] implementors.
Unmarshal converts its input data and stores the result into v using the codec, respecting [RestateUnmarshaler] implementors v is expected to be a mutable concrete type, generally a pointer.
# Variables
BinaryCodec marshals []byte and unmarshals into *[]byte In handlers, it uses a content type of application/octet-stream.
JSONCodec marshals any json.Marshallable type and unmarshals into any json.Unmarshallable type In handlers, it uses a content-type of application/json.
ProtoCodec marshals proto.Message and unmarshals into proto.Message or pointers to types that implement proto.Message In handlers, it uses a content-type of application/proto.
ProtoJSONCodec marshals proto.Message and unmarshals into proto.Message or pointers to types that implement proto.Message It uses the protojson package to marshal and unmarshal In handlers, it uses a content-type of application/json.
# Structs
InputPayload is provided to Restate upon handler discovery, to teach the ingress how to validate incoming request bodies.
OutputPayload is provided to Restate upon handler discovery, to teach the ingress how to annotate outgoing response bodies.
Void is a placeholder to signify 'no value' where a type is otherwise needed It implements [RestateMarshaler] and [RestateUnmarshaler] to ensure that no marshaling or unmarshaling ever happens on this type.
# Interfaces
Codec is a mechanism for serialising and deserialising a wide range of types.
PayloadCodec is implemented by a [Codec] that can also be used in handlers, and so must provide a [InputPayload] and [OutputPayload] i and o are zero values of the input/output types, which the codec may use to influence its response.
RestateMarshaler can be implemented by types that want to control their own marshaling.
RestateUnmarshaler can be implemented by types that want to control their own unmarshaling.