This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func GetPaginationMeta(limit int, offset int, totalRecords uint) interface{} { | |
| return map[string]interface{}{ | |
| "totalRecords": totalRecords, | |
| "totalPages": getTotalPages(totalRecords, limit), | |
| "currentPage": getCurrentPage(offset, limit), | |
| "pageSize": limit, | |
| } | |
| } | |
| func getCurrentPage(offset int, limit int) int { | |
| if limit == 0 { |