From 095028647124abe23a2bb7ea8e02731dc7b5e7b0 Mon Sep 17 00:00:00 2001 From: Elias Bouassaba Date: Wed, 10 Jul 2024 00:18:55 +0200 Subject: [PATCH] chore: unique package for webdav, sync workspace --- api/go.mod | 5 +++-- api/go.sum | 8 +++----- conversion/go.mod | 4 ++-- conversion/go.sum | 9 +++------ go.work | 1 + mosaic/go.mod | 8 +++----- mosaic/go.sum | 10 ++-------- ui/go.mod | 15 +++++++++------ ui/go.sum | 15 +++++---------- webdav/cache/workspace_cache.go | 2 +- webdav/client/api_client.go | 6 +++--- webdav/client/idp_client.go | 4 ++-- webdav/go.mod | 15 +++------------ webdav/go.sum | 16 ---------------- webdav/handler/handler.go | 6 +++--- webdav/handler/method_copy.go | 6 +++--- webdav/handler/method_delete.go | 6 +++--- webdav/handler/method_get.go | 6 +++--- webdav/handler/method_head.go | 6 +++--- webdav/handler/method_mkcol.go | 6 +++--- webdav/handler/method_move.go | 6 +++--- webdav/handler/method_propfind.go | 6 +++--- webdav/handler/method_put.go | 7 +++---- webdav/helper/token.go | 2 +- webdav/infra/redis.go | 3 +-- webdav/infra/s3.go | 3 +-- webdav/main.go | 16 ++++++++-------- 27 files changed, 78 insertions(+), 119 deletions(-) diff --git a/api/go.mod b/api/go.mod index 9ff05bbab..2a7ecced7 100644 --- a/api/go.mod +++ b/api/go.mod @@ -14,7 +14,7 @@ require ( github.com/gosimple/slug v1.14.0 github.com/joho/godotenv v1.5.1 github.com/meilisearch/meilisearch-go v0.27.0 - github.com/minio/minio-go/v7 v7.0.72 + github.com/minio/minio-go/v7 v7.0.73 github.com/reactivex/rxgo/v2 v2.5.0 github.com/redis/go-redis/v9 v9.5.3 github.com/speps/go-hashids/v2 v2.0.1 @@ -36,11 +36,13 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-ini/ini v1.67.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/gosimple/unidecode v1.0.1 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect @@ -74,7 +76,6 @@ require ( golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/driver/mysql v1.5.7 // indirect ) diff --git a/api/go.sum b/api/go.sum index 596ec2c8f..f036e41b6 100644 --- a/api/go.sum +++ b/api/go.sum @@ -26,6 +26,7 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= +github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -51,8 +52,8 @@ github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0kt github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gosimple/slug v1.14.0 h1:RtTL/71mJNDfpUbCOmnf/XFkzKRtD6wL6Uy+3akm4Es= @@ -108,8 +109,7 @@ github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLg github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.72 h1:ZSbxs2BfJensLyHdVOgHv+pfmvxYraaUy07ER04dWnA= -github.com/minio/minio-go/v7 v7.0.72/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= +github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/reactivex/rxgo/v2 v2.5.0 h1:FhPgHwX9vKdNQB2gq9EPt+EKk9QrrzoeztGbEEnZam4= @@ -200,8 +200,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/conversion/go.mod b/conversion/go.mod index d2399ba43..9e9a087f6 100644 --- a/conversion/go.mod +++ b/conversion/go.mod @@ -10,7 +10,7 @@ require ( github.com/gofiber/fiber/v2 v2.52.5 github.com/google/uuid v1.6.0 github.com/joho/godotenv v1.5.1 - github.com/minio/minio-go/v7 v7.0.72 + github.com/minio/minio-go/v7 v7.0.73 github.com/speps/go-hashids/v2 v2.0.1 go.uber.org/zap v1.27.0 ) @@ -18,6 +18,7 @@ require ( require ( github.com/andybalholm/brotli v1.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/go-ini/ini v1.67.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/goccy/go-json v0.10.3 // indirect @@ -38,5 +39,4 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/conversion/go.sum b/conversion/go.sum index 63322eff5..30d539da1 100644 --- a/conversion/go.sum +++ b/conversion/go.sum @@ -6,6 +6,7 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= +github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -38,8 +39,7 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.72 h1:ZSbxs2BfJensLyHdVOgHv+pfmvxYraaUy07ER04dWnA= -github.com/minio/minio-go/v7 v7.0.72/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= +github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -49,8 +49,7 @@ github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/speps/go-hashids/v2 v2.0.1 h1:ViWOEqWES/pdOSq+C1SLVa8/Tnsd52XC34RY7lt7m4g= github.com/speps/go-hashids/v2 v2.0.1/go.mod h1:47LKunwvDZki/uRVD6NImtyk712yFzIs3UF3KlHohGw= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8= @@ -74,7 +73,5 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.work b/go.work index 34a5a3931..33f68fc0d 100644 --- a/go.work +++ b/go.work @@ -5,4 +5,5 @@ use ( ./conversion ./mosaic ./ui + ./webdav ) diff --git a/mosaic/go.mod b/mosaic/go.mod index b2e114219..beb7b2ac5 100644 --- a/mosaic/go.mod +++ b/mosaic/go.mod @@ -5,20 +5,20 @@ go 1.22 toolchain go1.22.2 require ( + github.com/disintegration/imaging v1.6.2 github.com/gabriel-vasile/mimetype v1.4.4 github.com/gofiber/fiber/v2 v2.52.5 github.com/google/uuid v1.6.0 github.com/joho/godotenv v1.5.1 - github.com/minio/minio-go/v7 v7.0.72 + github.com/minio/minio-go/v7 v7.0.73 github.com/speps/go-hashids/v2 v2.0.1 go.uber.org/zap v1.27.0 - gopkg.in/gographics/imagick.v3 v3.7.0 ) require ( github.com/andybalholm/brotli v1.1.0 // indirect - github.com/disintegration/imaging v1.6.2 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/go-ini/ini v1.67.0 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect @@ -28,7 +28,6 @@ require ( github.com/minio/md5-simd v1.1.2 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rs/xid v1.5.0 // indirect - github.com/stretchr/testify v1.9.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.55.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect @@ -38,5 +37,4 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/mosaic/go.sum b/mosaic/go.sum index ce4837c1b..58fc17def 100644 --- a/mosaic/go.sum +++ b/mosaic/go.sum @@ -8,8 +8,7 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo= @@ -32,8 +31,7 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.72 h1:ZSbxs2BfJensLyHdVOgHv+pfmvxYraaUy07ER04dWnA= -github.com/minio/minio-go/v7 v7.0.72/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= +github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -71,9 +69,5 @@ golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -gopkg.in/gographics/imagick.v3 v3.7.0 h1:w8iQa58ikuqjX4l2OVML3pgqFcDMD8ywXJ9/cXa33fk= -gopkg.in/gographics/imagick.v3 v3.7.0/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/ui/go.mod b/ui/go.mod index 7348ff58c..d186061e3 100644 --- a/ui/go.mod +++ b/ui/go.mod @@ -2,19 +2,22 @@ module github.com/kouprlabs/voltaserve/ui go 1.22.2 -require github.com/labstack/echo/v4 v4.12.0 +require ( + github.com/joho/godotenv v1.5.1 + github.com/labstack/echo/v4 v4.12.0 +) require ( github.com/golang-jwt/jwt v3.2.2+incompatible // indirect - github.com/joho/godotenv v1.5.1 // indirect github.com/labstack/gommon v0.4.2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/stretchr/testify v1.9.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect ) diff --git a/ui/go.sum b/ui/go.sum index e52391877..b22f289cf 100644 --- a/ui/go.sum +++ b/ui/go.sum @@ -15,22 +15,17 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/webdav/cache/workspace_cache.go b/webdav/cache/workspace_cache.go index 8023ca330..fb54a1876 100644 --- a/webdav/cache/workspace_cache.go +++ b/webdav/cache/workspace_cache.go @@ -12,7 +12,7 @@ package cache import ( "encoding/json" - "voltaserve/infra" + "github.com/kouprlabs/voltaserve/webdav/infra" ) type WorkspaceCache struct { diff --git a/webdav/client/api_client.go b/webdav/client/api_client.go index 493959e92..e0f41137a 100644 --- a/webdav/client/api_client.go +++ b/webdav/client/api_client.go @@ -15,14 +15,14 @@ import ( "encoding/json" "errors" "fmt" + "github.com/kouprlabs/voltaserve/webdav/config" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "io" "net/http" "net/url" "os" "strings" - "voltaserve/config" - "voltaserve/helper" - "voltaserve/infra" ) const ( diff --git a/webdav/client/idp_client.go b/webdav/client/idp_client.go index 6fd57550a..55186dd05 100644 --- a/webdav/client/idp_client.go +++ b/webdav/client/idp_client.go @@ -15,12 +15,12 @@ import ( "encoding/json" "errors" "fmt" + "github.com/kouprlabs/voltaserve/webdav/config" + "github.com/kouprlabs/voltaserve/webdav/infra" "io" "net/http" "net/url" "strings" - "voltaserve/config" - "voltaserve/infra" ) const ( diff --git a/webdav/go.mod b/webdav/go.mod index e60039c5b..8b4d5b897 100644 --- a/webdav/go.mod +++ b/webdav/go.mod @@ -1,33 +1,24 @@ -module voltaserve +module github.com/kouprlabs/voltaserve/webdav go 1.22 toolchain go1.22.2 require ( + github.com/gabriel-vasile/mimetype v1.4.4 github.com/google/uuid v1.6.0 github.com/joho/godotenv v1.5.1 + github.com/minio/minio-go/v7 v7.0.73 github.com/speps/go-hashids/v2 v2.0.1 go.uber.org/zap v1.27.0 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/goccy/go-json v0.10.3 // indirect - github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.73 // indirect - github.com/redis/go-redis/v9 v9.5.3 // indirect - github.com/rs/xid v1.5.0 // indirect - github.com/stretchr/testify v1.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.24.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect ) diff --git a/webdav/go.sum b/webdav/go.sum index 511dbfef7..6ade4c7b3 100644 --- a/webdav/go.sum +++ b/webdav/go.sum @@ -1,11 +1,5 @@ -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= @@ -16,8 +10,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -27,10 +19,6 @@ github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12h github.com/minio/minio-go/v7 v7.0.73/go.mod h1:qydcVzV8Hqtj1VtEocfxbmVFa2siu6HGa+LDEPogjD8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/redis/go-redis/v9 v9.5.3 h1:fOAp1/uJG+ZtcITgZOfYFmTKPE7n4Vclj1wZFgRciUU= -github.com/redis/go-redis/v9 v9.5.3/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= -github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/speps/go-hashids/v2 v2.0.1 h1:ViWOEqWES/pdOSq+C1SLVa8/Tnsd52XC34RY7lt7m4g= github.com/speps/go-hashids/v2 v2.0.1/go.mod h1:47LKunwvDZki/uRVD6NImtyk712yFzIs3UF3KlHohGw= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= @@ -41,14 +29,10 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/webdav/handler/handler.go b/webdav/handler/handler.go index 03ca84850..caa87ffd9 100644 --- a/webdav/handler/handler.go +++ b/webdav/handler/handler.go @@ -11,10 +11,10 @@ package handler import ( + "github.com/kouprlabs/voltaserve/webdav/cache" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" - "voltaserve/cache" - "voltaserve/client" - "voltaserve/infra" ) type Handler struct { diff --git a/webdav/handler/method_copy.go b/webdav/handler/method_copy.go index 30832c2a0..cafe39f4d 100644 --- a/webdav/handler/method_copy.go +++ b/webdav/handler/method_copy.go @@ -12,11 +12,11 @@ package handler import ( "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" "path" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_delete.go b/webdav/handler/method_delete.go index 5063ff15c..ecb883145 100644 --- a/webdav/handler/method_delete.go +++ b/webdav/handler/method_delete.go @@ -12,10 +12,10 @@ package handler import ( "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_get.go b/webdav/handler/method_get.go index 53c229eb4..d79866587 100644 --- a/webdav/handler/method_get.go +++ b/webdav/handler/method_get.go @@ -13,15 +13,15 @@ package handler import ( "fmt" "github.com/google/uuid" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "io" "net/http" "os" "path/filepath" "strconv" "strings" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_head.go b/webdav/handler/method_head.go index dad4f792c..6be2bd8a9 100644 --- a/webdav/handler/method_head.go +++ b/webdav/handler/method_head.go @@ -12,10 +12,10 @@ package handler import ( "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_mkcol.go b/webdav/handler/method_mkcol.go index 976390f5d..191226d55 100644 --- a/webdav/handler/method_mkcol.go +++ b/webdav/handler/method_mkcol.go @@ -12,11 +12,11 @@ package handler import ( "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" "path" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_move.go b/webdav/handler/method_move.go index 537b4c770..eda6ad9c4 100644 --- a/webdav/handler/method_move.go +++ b/webdav/handler/method_move.go @@ -12,12 +12,12 @@ package handler import ( "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" "path" "strings" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_propfind.go b/webdav/handler/method_propfind.go index 0a3311c65..bd04cf55a 100644 --- a/webdav/handler/method_propfind.go +++ b/webdav/handler/method_propfind.go @@ -12,10 +12,10 @@ package handler import ( "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "net/http" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/handler/method_put.go b/webdav/handler/method_put.go index 0197c6969..79299c48f 100644 --- a/webdav/handler/method_put.go +++ b/webdav/handler/method_put.go @@ -13,16 +13,15 @@ package handler import ( "fmt" "github.com/google/uuid" - "github.com/minio/minio-go/v7" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "io" "net/http" "os" "path" "path/filepath" "strings" - "voltaserve/client" - "voltaserve/helper" - "voltaserve/infra" ) /* diff --git a/webdav/helper/token.go b/webdav/helper/token.go index 937d7eff9..d175e2b4d 100644 --- a/webdav/helper/token.go +++ b/webdav/helper/token.go @@ -11,8 +11,8 @@ package helper import ( + "github.com/kouprlabs/voltaserve/webdav/infra" "time" - "voltaserve/infra" ) func NewExpiry(token *infra.Token) time.Time { diff --git a/webdav/infra/redis.go b/webdav/infra/redis.go index e60469d16..a21dfff39 100644 --- a/webdav/infra/redis.go +++ b/webdav/infra/redis.go @@ -12,9 +12,8 @@ package infra import ( "context" - "github.com/redis/go-redis/v9" + "github.com/kouprlabs/voltaserve/webdav/config" "strings" - "voltaserve/config" ) type RedisManager struct { diff --git a/webdav/infra/s3.go b/webdav/infra/s3.go index e22f3792f..d1d911a26 100644 --- a/webdav/infra/s3.go +++ b/webdav/infra/s3.go @@ -14,11 +14,10 @@ import ( "bytes" "context" "errors" - "github.com/minio/minio-go/v7" + "github.com/kouprlabs/voltaserve/webdav/config" "github.com/minio/minio-go/v7/pkg/credentials" "io" "strings" - "voltaserve/config" ) type S3Manager struct { diff --git a/webdav/main.go b/webdav/main.go index 4e3d2cbf8..8a7b7403c 100644 --- a/webdav/main.go +++ b/webdav/main.go @@ -13,19 +13,19 @@ package main import ( "context" "fmt" + "github.com/kouprlabs/voltaserve/webdav/client" + "github.com/kouprlabs/voltaserve/webdav/handler" + "github.com/kouprlabs/voltaserve/webdav/helper" + "github.com/kouprlabs/voltaserve/webdav/infra" "log" "net/http" "os" "strings" "sync" "time" - "voltaserve/client" - "voltaserve/handler" - "voltaserve/helper" - "voltaserve/infra" "github.com/joho/godotenv" - "voltaserve/config" + "github.com/kouprlabs/voltaserve/webdav/config" ) var ( @@ -87,9 +87,9 @@ func basicAuthMiddleware(next http.Handler, idpClient *client.IdPClient) http.Ha }) } -// @title Voltaserve WebDAV -// @version 2.0.0 -// @BasePath /v2 +// @title Voltaserve WebDAV +// @version 2.0.0 +// @BasePath /v2 func main() { if _, err := os.Stat(".env.local"); err == nil { if err := godotenv.Load(".env.local"); err != nil {