(resp *types.SignedResponseHeader)
| 597 | } |
| 598 | |
| 599 | func (a *explorerAPI) formatResponseHeader(resp *types.SignedResponseHeader) map[string]interface{} { |
| 600 | return map[string]interface{}{ |
| 601 | "response": map[string]interface{}{ |
| 602 | "hash": resp.Hash().String(), |
| 603 | "timestamp": a.formatTime(resp.Timestamp), |
| 604 | "node": resp.NodeID, |
| 605 | "row_count": resp.RowCount, |
| 606 | "log_id": resp.LogOffset, |
| 607 | "last_insert_id": resp.LastInsertID, |
| 608 | "affected_rows": resp.AffectedRows, |
| 609 | }, |
| 610 | "request": map[string]interface{}{ |
| 611 | "hash": resp.GetRequestHash().String(), |
| 612 | "timestamp": a.formatTime(resp.GetRequestTimestamp()), |
| 613 | "node": resp.Request.NodeID, |
| 614 | "type": resp.Request.QueryType.String(), |
| 615 | "count": resp.Request.BatchCount, |
| 616 | }, |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | func (a *explorerAPI) formatAck(ack *types.SignedAckHeader) map[string]interface{} { |
| 621 | return map[string]interface{}{ |
no test coverage detected