Documentation ¶
Index ¶
- func DeserializeBatchEvents(data *commonpb.DataBlob) ([]*historypb.HistoryEvent, error)
- func DeserializeBlobDataToHistoryEvents(dataBlobs []*commonpb.DataBlob, filterType enumspb.HistoryEventFilterType) (*historypb.History, error)
- func NewDataBlob(data []byte, encodingType enumspb.EncodingType) *commonpb.DataBlob
- func NewDeserializationError(msg string) error
- func NewSerializationError(msg string) error
- func NewUnknownEncodingTypeError(encodingType enumspb.EncodingType) error
- func SerializeBatchEvents(events []*historypb.HistoryEvent, encodingType enumspb.EncodingType) (*commonpb.DataBlob, error)
- type DeserializationError
- type JSONPBEncoder
- type SerializationError
- type UnknownEncodingTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeBatchEvents ¶
func DeserializeBatchEvents(data *commonpb.DataBlob) ([]*historypb.HistoryEvent, error)
DeserializeBatchEvents deserializes batch events from a datablob proto
func DeserializeBlobDataToHistoryEvents ¶
func DeserializeBlobDataToHistoryEvents( dataBlobs []*commonpb.DataBlob, filterType enumspb.HistoryEventFilterType, ) (*historypb.History, error)
DeserializeBlobDataToHistoryEvents deserialize the blob data to history event data
func NewDataBlob ¶
func NewDataBlob(data []byte, encodingType enumspb.EncodingType) *commonpb.DataBlob
NewDataBlob creates new blob data
func NewDeserializationError ¶
NewDeserializationError returns a DeserializationError
func NewSerializationError ¶
NewSerializationError returns a SerializationError
func NewUnknownEncodingTypeError ¶
func NewUnknownEncodingTypeError(encodingType enumspb.EncodingType) error
NewUnknownEncodingTypeError returns a new instance of encoding type error
func SerializeBatchEvents ¶
func SerializeBatchEvents(events []*historypb.HistoryEvent, encodingType enumspb.EncodingType) (*commonpb.DataBlob, error)
SerializeBatchEvents serializes batch events into a datablob proto
Types ¶
type DeserializationError ¶
type DeserializationError struct {
// contains filtered or unexported fields
}
DeserializationError is an error type for deserialization
func (*DeserializationError) Error ¶
func (e *DeserializationError) Error() string
type JSONPBEncoder ¶
type JSONPBEncoder struct {
// contains filtered or unexported fields
}
JSONPBEncoder is JSON encoder/decoder for protobuf structs and slices of protobuf structs. This is an wrapper on top of jsonpb.Marshaler which supports not only single object serialization but also slices of concrete objects.
func NewJSONPBEncoder ¶
func NewJSONPBEncoder() *JSONPBEncoder
NewJSONPBEncoder creates a new JSONPBEncoder.
func NewJSONPBIndentEncoder ¶
func NewJSONPBIndentEncoder(indent string) *JSONPBEncoder
NewJSONPBIndentEncoder creates a new JSONPBEncoder with indent.
type SerializationError ¶
type SerializationError struct {
// contains filtered or unexported fields
}
SerializationError is an error type for serialization
func (*SerializationError) Error ¶
func (e *SerializationError) Error() string
type UnknownEncodingTypeError ¶
type UnknownEncodingTypeError struct {
// contains filtered or unexported fields
}
UnknownEncodingTypeError is an error type for unknown or unsupported encoding type
func (*UnknownEncodingTypeError) Error ¶
func (e *UnknownEncodingTypeError) Error() string