MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / formatResponseHeader

Method formatResponseHeader

sqlchain/observer/api.go:599–618  ·  view source on GitHub ↗
(resp *types.SignedResponseHeader)

Source from the content-addressed store, hash-verified

597}
598
599func (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
620func (a *explorerAPI) formatAck(ack *types.SignedAckHeader) map[string]interface{} {
621 return map[string]interface{}{

Callers 2

GetResponseMethod · 0.95
formatBlockV3Method · 0.95

Calls 5

formatTimeMethod · 0.95
HashMethod · 0.65
StringMethod · 0.45
GetRequestHashMethod · 0.45
GetRequestTimestampMethod · 0.45

Tested by

no test coverage detected