(c *gin.Context)
| 2577 | } |
| 2578 | |
| 2579 | func parseMemoryHistoryQuery(c *gin.Context) (memcontract.OperationHistoryQuery, error) { |
| 2580 | scope, workspace, err := resolveMemoryScopeAndWorkspace( |
| 2581 | c.Query("scope"), |
| 2582 | firstNonEmptyString(c.Query("workspace_id"), c.Query("workspace")), |
| 2583 | ) |
| 2584 | if err != nil { |
| 2585 | return memcontract.OperationHistoryQuery{}, err |
| 2586 | } |
| 2587 | since, err := ParseOptionalTime(c.Query("since")) |
| 2588 | if err != nil { |
| 2589 | return memcontract.OperationHistoryQuery{}, NewMemoryValidationError(err) |
| 2590 | } |
| 2591 | limit, err := parseMemoryLimit(c.Query("limit")) |
| 2592 | if err != nil { |
| 2593 | return memcontract.OperationHistoryQuery{}, err |
| 2594 | } |
| 2595 | return memcontract.OperationHistoryQuery{ |
| 2596 | Scope: scope, |
| 2597 | Workspace: workspace, |
| 2598 | Operation: memcontract.Operation(strings.TrimSpace(c.Query("operation"))), |
| 2599 | Since: since, |
| 2600 | Limit: limit, |
| 2601 | }, nil |
| 2602 | } |
no test coverage detected