Decode bytes to protobuf struct.
(data []byte, pb proto.Message)
| 42 | |
| 43 | // Decode bytes to protobuf struct. |
| 44 | func (e JSONPBEncoder) Decode(data []byte, pb proto.Message) error { |
| 45 | return e.unmarshaler.Unmarshal(data, pb) |
| 46 | } |
| 47 | |
| 48 | // Encode HistoryEvent slice to bytes. |
| 49 | func (e *JSONPBEncoder) EncodeHistoryEvents(historyEvents []*historypb.HistoryEvent) ([]byte, error) { |