diff --git a/backend/app/api/app.go b/backend/app/api/app.go index 0f44297..16c0ea9 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 bf14a9d..801eca8 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 10c9f2e..3b31c85 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 117ebe4..ce531ea 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 936f38e..14e864c 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 bd9ff4c..8b1624d 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 7e7600c..c6cd328 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 9745538..8da8eb4 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 e21036d..dae23db 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 c9ffa57..1b053d3 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 eeed717..5a65a4b 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 da561c4..3c64dc7 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 1f06e2f..a4352df 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 030a1ff..40f0d22 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 55a8dcb..2a91a8e 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 cc57305..8708d24 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 e9f498e..befc0de 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 3617c09..fb6b9cf 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 f27069e..affc79f 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 a1e6954..6d4a4f4 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 8a7bf4a..8eb5695 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 db9a410..3905723 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 3d7eb06..d3d099b 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 ef4bf6c..ad5b82b 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 8f669f0..b044475 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 269387c..318d323 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" )