MemoryHistory returns bounded, redacted memory operation history.
(c *gin.Context)
| 106 | |
| 107 | // MemoryHistory returns bounded, redacted memory operation history. |
| 108 | func (h *BaseHandlers) MemoryHistory(c *gin.Context) { |
| 109 | if h.MemoryStore == nil { |
| 110 | h.respondMemoryError(c, http.StatusInternalServerError, errors.New("memory store is not configured"), nil) |
| 111 | return |
| 112 | } |
| 113 | |
| 114 | query, err := parseMemoryHistoryQuery(c) |
| 115 | if err != nil { |
| 116 | h.respondMemoryError(c, StatusForMemoryError(err), err, nil) |
| 117 | return |
| 118 | } |
| 119 | records, err := h.MemoryStore.History(c.Request.Context(), query) |
| 120 | if err != nil { |
| 121 | h.respondMemoryError(c, StatusForMemoryError(err), err, nil) |
| 122 | return |
| 123 | } |
| 124 | |
| 125 | c.JSON(http.StatusOK, contract.MemoryOperationHistoryResponse{Operations: MemoryOperationHistoryPayloads(records)}) |
| 126 | } |
| 127 | |
| 128 | // MemoryScopeShow reports the effective selector and precedence chain. |
| 129 | func (h *BaseHandlers) MemoryScopeShow(c *gin.Context) { |
nothing calls this directly
no test coverage detected