Documentation ¶
Index ¶
- func NewDataConverter(fallback converter.DataConverter) converter.DataConverter
- type DataConverter
- func (r *DataConverter) FromPayload(payload *commonpb.Payload, valuePtr any) error
- func (r *DataConverter) FromPayloads(payloads *commonpb.Payloads, valuePtrs ...any) error
- func (r *DataConverter) ToPayload(value any) (*commonpb.Payload, error)
- func (r *DataConverter) ToPayloads(values ...any) (*commonpb.Payloads, error)
- func (r *DataConverter) ToString(input *commonpb.Payload) string
- func (r *DataConverter) ToStrings(input *commonpb.Payloads) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataConverter ¶
func NewDataConverter(fallback converter.DataConverter) converter.DataConverter
NewDataConverter creates new data converter.
Types ¶
type DataConverter ¶
type DataConverter struct {
// contains filtered or unexported fields
}
DataConverter wraps Temporal data converter to enable direct access to the payloads.
func (*DataConverter) FromPayload ¶
func (r *DataConverter) FromPayload(payload *commonpb.Payload, valuePtr any) error
FromPayload converts single value from payload.
func (*DataConverter) FromPayloads ¶
func (r *DataConverter) FromPayloads(payloads *commonpb.Payloads, valuePtrs ...any) error
FromPayloads converts to a list of values of different types. Useful for deserializing arguments of function invocations.
func (*DataConverter) ToPayload ¶
func (r *DataConverter) ToPayload(value any) (*commonpb.Payload, error)
ToPayload converts single value to payload.
func (*DataConverter) ToPayloads ¶
func (r *DataConverter) ToPayloads(values ...any) (*commonpb.Payloads, error)
ToPayloads converts a list of values.
Click to show internal directories.
Click to hide internal directories.