Encode HistoryEvent slice to bytes.
(historyEvents []*historypb.HistoryEvent)
| 47 | |
| 48 | // Encode HistoryEvent slice to bytes. |
| 49 | func (e *JSONPBEncoder) EncodeHistoryEvents(historyEvents []*historypb.HistoryEvent) ([]byte, error) { |
| 50 | return e.encodeSlice( |
| 51 | len(historyEvents), |
| 52 | func(i int) proto.Message { return historyEvents[i] }) |
| 53 | } |
| 54 | |
| 55 | // Encode History slice to bytes. |
| 56 | func (e *JSONPBEncoder) EncodeHistories(histories []*historypb.History) ([]byte, error) { |