diff --git a/backend/app/api/app.go b/backend/app/api/app.go index 0f442974..16c0ea9e 100644 --- a/backend/app/api/app.go +++ b/backend/app/api/app.go @@ -8,7 +8,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/config" "github.com/hay-kot/homebox/backend/pkgs/mailer" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/server" ) type app struct { diff --git a/backend/app/api/handlers/v1/controller.go b/backend/app/api/handlers/v1/controller.go index bf14a9d4..801eca8d 100644 --- a/backend/app/api/handlers/v1/controller.go +++ b/backend/app/api/handlers/v1/controller.go @@ -5,8 +5,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" ) type Results[T any] struct { diff --git a/backend/app/api/handlers/v1/v1_ctrl_actions.go b/backend/app/api/handlers/v1/v1_ctrl_actions.go index 10c9f2e1..3b31c855 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_actions.go +++ b/backend/app/api/handlers/v1/v1_ctrl_actions.go @@ -7,8 +7,8 @@ import ( "github.com/google/uuid" "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog/log" ) diff --git a/backend/app/api/handlers/v1/v1_ctrl_assets.go b/backend/app/api/handlers/v1/v1_ctrl_assets.go index 117ebe47..ce531eac 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_assets.go +++ b/backend/app/api/handlers/v1/v1_ctrl_assets.go @@ -9,8 +9,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog/log" ) diff --git a/backend/app/api/handlers/v1/v1_ctrl_auth.go b/backend/app/api/handlers/v1/v1_ctrl_auth.go index 936f38e1..14e864c2 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_auth.go +++ b/backend/app/api/handlers/v1/v1_ctrl_auth.go @@ -8,8 +8,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog/log" ) diff --git a/backend/app/api/handlers/v1/v1_ctrl_group.go b/backend/app/api/handlers/v1/v1_ctrl_group.go index bd9ff4c2..8b1624da 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_group.go +++ b/backend/app/api/handlers/v1/v1_ctrl_group.go @@ -7,7 +7,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) type ( diff --git a/backend/app/api/handlers/v1/v1_ctrl_items.go b/backend/app/api/handlers/v1/v1_ctrl_items.go index 7e7600cd..c6cd3285 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_items.go +++ b/backend/app/api/handlers/v1/v1_ctrl_items.go @@ -12,8 +12,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/validate" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog/log" ) diff --git a/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go b/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go index 97455382..8da8eb45 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go +++ b/backend/app/api/handlers/v1/v1_ctrl_items_attachments.go @@ -8,8 +8,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/data/ent/attachment" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog/log" ) diff --git a/backend/app/api/handlers/v1/v1_ctrl_labels.go b/backend/app/api/handlers/v1/v1_ctrl_labels.go index e21036d5..dae23db0 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_labels.go +++ b/backend/app/api/handlers/v1/v1_ctrl_labels.go @@ -7,7 +7,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) // HandleLabelsGetAll godoc diff --git a/backend/app/api/handlers/v1/v1_ctrl_locations.go b/backend/app/api/handlers/v1/v1_ctrl_locations.go index c9ffa57a..1b053d36 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_locations.go +++ b/backend/app/api/handlers/v1/v1_ctrl_locations.go @@ -7,7 +7,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) // HandleLocationTreeQuery diff --git a/backend/app/api/handlers/v1/v1_ctrl_maint_entry.go b/backend/app/api/handlers/v1/v1_ctrl_maint_entry.go index eeed7174..5a65a4be 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_maint_entry.go +++ b/backend/app/api/handlers/v1/v1_ctrl_maint_entry.go @@ -7,7 +7,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) // HandleMaintenanceGetLog godoc diff --git a/backend/app/api/handlers/v1/v1_ctrl_notifiers.go b/backend/app/api/handlers/v1/v1_ctrl_notifiers.go index da561c44..3c64dc7f 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_notifiers.go +++ b/backend/app/api/handlers/v1/v1_ctrl_notifiers.go @@ -8,7 +8,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) // HandleGetUserNotifiers godoc diff --git a/backend/app/api/handlers/v1/v1_ctrl_qrcode.go b/backend/app/api/handlers/v1/v1_ctrl_qrcode.go index 1f06e2f8..a4352dfc 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_qrcode.go +++ b/backend/app/api/handlers/v1/v1_ctrl_qrcode.go @@ -7,7 +7,7 @@ import ( "net/http" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" "github.com/yeqown/go-qrcode/v2" "github.com/yeqown/go-qrcode/writer/standard" diff --git a/backend/app/api/handlers/v1/v1_ctrl_reporting.go b/backend/app/api/handlers/v1/v1_ctrl_reporting.go index 030a1ffb..40f0d22c 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_reporting.go +++ b/backend/app/api/handlers/v1/v1_ctrl_reporting.go @@ -4,7 +4,7 @@ import ( "net/http" "github.com/hay-kot/homebox/backend/internal/core/services" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) // HandleBillOfMaterialsExport godoc diff --git a/backend/app/api/handlers/v1/v1_ctrl_statistics.go b/backend/app/api/handlers/v1/v1_ctrl_statistics.go index 55a8dcbb..2a91a8ed 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_statistics.go +++ b/backend/app/api/handlers/v1/v1_ctrl_statistics.go @@ -8,8 +8,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/validate" "github.com/hay-kot/homebox/backend/internal/web/adapters" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" ) // HandleGroupGet godoc diff --git a/backend/app/api/handlers/v1/v1_ctrl_user.go b/backend/app/api/handlers/v1/v1_ctrl_user.go index cc573051..8708d24c 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_user.go +++ b/backend/app/api/handlers/v1/v1_ctrl_user.go @@ -8,8 +8,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog/log" ) diff --git a/backend/app/api/main.go b/backend/app/api/main.go index e9f498eb..befc0de5 100644 --- a/backend/app/api/main.go +++ b/backend/app/api/main.go @@ -19,8 +19,8 @@ import ( "github.com/hay-kot/homebox/backend/internal/data/repo" "github.com/hay-kot/homebox/backend/internal/sys/config" "github.com/hay-kot/homebox/backend/internal/web/mid" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/rs/zerolog/pkgerrors" diff --git a/backend/app/api/middleware.go b/backend/app/api/middleware.go index 3617c09e..fb6b9cfc 100644 --- a/backend/app/api/middleware.go +++ b/backend/app/api/middleware.go @@ -9,7 +9,7 @@ import ( "github.com/hay-kot/homebox/backend/internal/core/services" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" ) type tokenHasKey struct { diff --git a/backend/app/api/routes.go b/backend/app/api/routes.go index f27069ec..affc79fc 100644 --- a/backend/app/api/routes.go +++ b/backend/app/api/routes.go @@ -15,7 +15,7 @@ import ( _ "github.com/hay-kot/homebox/backend/app/api/static/docs" "github.com/hay-kot/homebox/backend/internal/data/ent/authroles" "github.com/hay-kot/homebox/backend/internal/data/repo" - "github.com/hay-kot/safeserve/errchain" + "github.com/hay-kot/httpkit/errchain" httpSwagger "github.com/swaggo/http-swagger" // http-swagger middleware ) diff --git a/backend/go.mod b/backend/go.mod index a1e6954a..6d4a4f46 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -12,7 +12,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20230325173030-9a18a846a479 github.com/google/uuid v1.3.0 github.com/gorilla/schema v1.2.0 - github.com/hay-kot/safeserve v0.0.2 + github.com/hay-kot/httpkit v0.0.3 github.com/mattn/go-sqlite3 v1.14.16 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.29.0 diff --git a/backend/go.sum b/backend/go.sum index 8a7bf4ab..8eb56957 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -441,8 +441,8 @@ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.9.8/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hay-kot/safeserve v0.0.2 h1:o2MbfwRTphwuz3Pohdpw8EQiuxxTvVc/Dmav9AQTez0= -github.com/hay-kot/safeserve v0.0.2/go.mod h1:RUvwyfQTmbNgm5sHt+tQOqtdcpWadXWMhLty74Vedzw= +github.com/hay-kot/httpkit v0.0.3 h1:QYq01J5Jrn+ie0s1ptavNSEyydkOHqsrw4RLp+2LeJQ= +github.com/hay-kot/httpkit v0.0.3/go.mod h1:1s/OJwWRyH6tBtTw76jTp6kwBYvjswziXaokPQH7eKQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= diff --git a/backend/internal/web/adapters/actions.go b/backend/internal/web/adapters/actions.go index db9a4109..39057235 100644 --- a/backend/internal/web/adapters/actions.go +++ b/backend/internal/web/adapters/actions.go @@ -3,8 +3,8 @@ package adapters import ( "net/http" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" ) // Action is a function that adapts a function to the server.Handler interface. diff --git a/backend/internal/web/adapters/command.go b/backend/internal/web/adapters/command.go index 3d7eb065..d3d099bc 100644 --- a/backend/internal/web/adapters/command.go +++ b/backend/internal/web/adapters/command.go @@ -4,8 +4,8 @@ import ( "net/http" "github.com/google/uuid" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" ) type CommandFunc[T any] func(*http.Request) (T, error) diff --git a/backend/internal/web/adapters/decoders.go b/backend/internal/web/adapters/decoders.go index ef4bf6cc..ad5b82b2 100644 --- a/backend/internal/web/adapters/decoders.go +++ b/backend/internal/web/adapters/decoders.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/gorilla/schema" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/server" ) var queryDecoder = schema.NewDecoder() diff --git a/backend/internal/web/adapters/query.go b/backend/internal/web/adapters/query.go index 8f669f0d..b0444752 100644 --- a/backend/internal/web/adapters/query.go +++ b/backend/internal/web/adapters/query.go @@ -3,8 +3,8 @@ package adapters import ( "net/http" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" ) // Query is a server.Handler that decodes a query from the request and calls the provided function. diff --git a/backend/internal/web/mid/errors.go b/backend/internal/web/mid/errors.go index 269387cd..318d3237 100644 --- a/backend/internal/web/mid/errors.go +++ b/backend/internal/web/mid/errors.go @@ -6,8 +6,8 @@ import ( "github.com/go-chi/chi/v5/middleware" "github.com/hay-kot/homebox/backend/internal/data/ent" "github.com/hay-kot/homebox/backend/internal/sys/validate" - "github.com/hay-kot/safeserve/errchain" - "github.com/hay-kot/safeserve/server" + "github.com/hay-kot/httpkit/errchain" + "github.com/hay-kot/httpkit/server" "github.com/rs/zerolog" )