aboutsummaryrefslogtreecommitdiff
path: root/utils/meta/functions.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-08 02:27:15 +0530
committerBobby <[email protected]>2026-03-08 02:27:15 +0530
commitcca905d35412f1549400fc3d1aca6dc704d8cae6 (patch)
tree0c0231f5c2ebaeb7700e08a2c1f07373d3251658 /utils/meta/functions.go
parent547384c41181c034a5eaf340c5e569d36eb013be (diff)
downloaddove-cca905d35412f1549400fc3d1aca6dc704d8cae6.tar.xz
dove-cca905d35412f1549400fc3d1aca6dc704d8cae6.zip
feat(domains): add new TLD creation page and update sidebar
- Introduced a new HTMX template for creating TLDs. - Created a new Django template for the new TLD page. - Updated the sidebar to include a link to the domains section. refactor(types): remove unused types and consolidate request handling - Deleted unused type definitions related to authentication, errors, mailboxes, overview, requests, responses, and users. - Introduced a new collections package for generic data structures. - Refactored request handling to use a more streamlined approach with RequestInfo and Param types. fix(meta): improve pagination and sorting functionality - Updated pagination logic to handle default values and edge cases. - Introduced a new Sorting type for better sorting management in queries. chore(urls): refactor URL handling and registry - Replaced enums with string constants for HTTP methods. - Consolidated route registration logic and improved type safety with RegisteredRoute. style(shortcuts): clean up error handling and rendering functions - Enhanced error handling functions for better readability and maintainability. - Removed deprecated functions and improved the structure of rendering logic.
Diffstat (limited to 'utils/meta/functions.go')
-rw-r--r--utils/meta/functions.go53
1 files changed, 0 insertions, 53 deletions
diff --git a/utils/meta/functions.go b/utils/meta/functions.go
deleted file mode 100644
index 0b8f309..0000000
--- a/utils/meta/functions.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package meta
-
-import (
- "dove/types"
-
- "github.com/gofiber/fiber/v2"
-)
-
-func findParam(params []types.Param, key string) (string, bool) {
- for _, param := range params {
- if param.Key == key {
- return param.Value, true
- }
- }
-
- return "", false
-}
-
-func buildQueryParams(context *fiber.Ctx) []types.Param {
- params := make([]types.Param, 0)
- context.Request().URI().QueryArgs().VisitAll(func(name []byte, paramValue []byte) {
- params = append(params, types.Param{
- Key: string(name),
- Value: string(paramValue),
- })
- })
-
- return params
-}
-
-func buildRouteParams(context *fiber.Ctx) []types.Param {
- params := make([]types.Param, 0)
- for name, routeValue := range context.AllParams() {
- params = append(params, types.Param{
- Key: name,
- Value: routeValue,
- })
- }
-
- return params
-}
-
-func buildHeaders(context *fiber.Ctx) []types.Param {
- params := make([]types.Param, 0)
- context.Request().Header.VisitAll(func(name []byte, headerValue []byte) {
- params = append(params, types.Param{
- Key: string(name),
- Value: string(headerValue),
- })
- })
-
- return params
-}