summaryrefslogtreecommitdiff
path: root/shrine/utils/meta/functions.go
diff options
context:
space:
mode:
Diffstat (limited to 'shrine/utils/meta/functions.go')
-rw-r--r--shrine/utils/meta/functions.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/shrine/utils/meta/functions.go b/shrine/utils/meta/functions.go
index e36e296..d89143e 100644
--- a/shrine/utils/meta/functions.go
+++ b/shrine/utils/meta/functions.go
@@ -1,15 +1,15 @@
package meta
import (
- "shrine/types"
+ "shrine/types/hypertext"
"github.com/gofiber/fiber/v2"
)
-func buildQueryParams(context *fiber.Ctx) []types.HTTPParam {
- params := make([]types.HTTPParam, 0)
+func buildQueryParams(context *fiber.Ctx) []hypertext.Param {
+ params := make([]hypertext.Param, 0)
context.Request().URI().QueryArgs().VisitAll(func(k, v []byte) {
- params = append(params, types.HTTPParam{
+ params = append(params, hypertext.Param{
Key: string(k),
Value: string(v),
})
@@ -17,10 +17,10 @@ func buildQueryParams(context *fiber.Ctx) []types.HTTPParam {
return params
}
-func buildRouteParams(context *fiber.Ctx) []types.HTTPParam {
- params := make([]types.HTTPParam, 0)
+func buildRouteParams(context *fiber.Ctx) []hypertext.Param {
+ params := make([]hypertext.Param, 0)
for k, v := range context.AllParams() {
- params = append(params, types.HTTPParam{
+ params = append(params, hypertext.Param{
Key: k,
Value: v,
})
@@ -28,10 +28,10 @@ func buildRouteParams(context *fiber.Ctx) []types.HTTPParam {
return params
}
-func buildHeaders(context *fiber.Ctx) []types.HTTPParam {
- params := make([]types.HTTPParam, 0)
+func buildHeaders(context *fiber.Ctx) []hypertext.Param {
+ params := make([]hypertext.Param, 0)
context.Request().Header.VisitAll(func(k, v []byte) {
- params = append(params, types.HTTPParam{
+ params = append(params, hypertext.Param{
Key: string(k),
Value: string(v),
})