Added filtered GET request

This commit is contained in:
Fran Jurmanović
2021-05-22 16:51:18 +02:00
parent f9ea943ed9
commit 8d4dc3ff57
6 changed files with 83 additions and 8 deletions

14
pkg/models/models.go Normal file
View File

@@ -0,0 +1,14 @@
package models
import "github.com/gin-gonic/gin"
type FilteredResponse struct {
Items interface{} `json:"items"`
SortBy string `json:"sortBy"`
Embed string `json:"embed"`
Page int `json:"page"`
Rpp int `json:"rpp"`
TotalRecords int `json:"totalRecords"`
}
type ResponseFunc func(*gin.Context) *[]interface{}