Decode HistoryEvent slice from bytes.
(data []byte)
| 61 | |
| 62 | // Decode HistoryEvent slice from bytes. |
| 63 | func (e *JSONPBEncoder) DecodeHistoryEvents(data []byte) ([]*historypb.HistoryEvent, error) { |
| 64 | var historyEvents []*historypb.HistoryEvent |
| 65 | err := e.DecodeSlice( |
| 66 | data, |
| 67 | func() proto.Message { |
| 68 | historyEvent := &historypb.HistoryEvent{} |
| 69 | historyEvents = append(historyEvents, historyEvent) |
| 70 | return historyEvent |
| 71 | }) |
| 72 | return historyEvents, err |
| 73 | } |
| 74 | |
| 75 | // Decode History slice from bytes. |
| 76 | func (e *JSONPBEncoder) DecodeHistories(data []byte) ([]*historypb.History, error) { |
no test coverage detected