data_converter

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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.

func (*DataConverter) ToString

func (r *DataConverter) ToString(input *commonpb.Payload) string

ToString converts payload object into human-readable string.

func (*DataConverter) ToStrings

func (r *DataConverter) ToStrings(input *commonpb.Payloads) []string

ToStrings converts payloads object into human-readable strings.

Jump to

Keyboard shortcuts

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