From 4c8a0f304638eccdda57c359cbe884b401e9d58c Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Sun, 15 Nov 2020 12:48:10 +0800 Subject: [PATCH] Code: compatible with semantic import versioning --- bootstrap/app.go | 7 +++-- bootstrap/init.go | 16 +++++------ bootstrap/static.go | 10 +++---- go.mod | 2 +- main.go | 9 +++--- middleware/auth.go | 16 +++++------ middleware/auth_test.go | 21 +++++++------- middleware/mock.go | 2 +- middleware/mock_test.go | 7 +++-- middleware/option.go | 13 +++++---- middleware/option_test.go | 15 +++++----- middleware/session.go | 6 ++-- middleware/session_test.go | 9 +++--- middleware/share.go | 7 +++-- middleware/share_test.go | 9 +++--- models/download.go | 5 ++-- models/file.go | 5 ++-- models/folder.go | 5 ++-- models/folder_test.go | 7 +++-- models/init.go | 4 +-- models/migration.go | 6 ++-- models/migration_test.go | 5 ++-- models/policy.go | 4 +-- models/policy_test.go | 9 +++--- models/setting.go | 5 ++-- models/setting_test.go | 5 ++-- models/share.go | 11 ++++---- models/share_test.go | 11 ++++---- models/tag.go | 2 +- models/task.go | 2 +- models/user.go | 5 ++-- models/user_authn.go | 5 ++-- models/user_test.go | 5 ++-- pkg/aria2/aria2.go | 9 +++--- pkg/aria2/aria2_test.go | 7 +++-- pkg/aria2/caller.go | 7 +++-- pkg/aria2/caller_test.go | 7 +++-- pkg/aria2/monitor.go | 15 +++++----- pkg/aria2/monitor_test.go | 17 +++++------ pkg/aria2/notification.go | 3 +- pkg/aria2/notification_test.go | 5 ++-- pkg/auth/auth.go | 9 +++--- pkg/auth/auth_test.go | 5 ++-- pkg/auth/hmac_test.go | 11 ++++---- pkg/authn/auth.go | 2 +- pkg/authn/auth_test.go | 5 ++-- pkg/cache/driver.go | 2 +- pkg/cache/memo.go | 3 +- pkg/cache/redis.go | 5 ++-- pkg/conf/conf.go | 4 +-- pkg/conf/conf_test.go | 5 ++-- pkg/crontab/collect.go | 7 +++-- pkg/crontab/init.go | 4 +-- pkg/email/init.go | 5 ++-- pkg/email/smtp.go | 5 ++-- pkg/email/template.go | 5 ++-- pkg/filesystem/archive.go | 13 +++++---- pkg/filesystem/archive_test.go | 19 +++++++------ pkg/filesystem/driver/cos/handler.go | 15 +++++----- pkg/filesystem/driver/cos/scf.go | 11 ++++---- pkg/filesystem/driver/local/handler.go | 17 +++++------ pkg/filesystem/driver/local/handler_test.go | 15 +++++----- pkg/filesystem/driver/onedrive/api.go | 11 ++++---- pkg/filesystem/driver/onedrive/api_test.go | 11 ++++---- pkg/filesystem/driver/onedrive/client.go | 5 ++-- pkg/filesystem/driver/onedrive/client_test.go | 5 ++-- pkg/filesystem/driver/onedrive/handler.go | 13 +++++---- .../driver/onedrive/handler_test.go | 17 +++++------ pkg/filesystem/driver/onedrive/oauth.go | 7 +++-- pkg/filesystem/driver/onedrive/oauth_test.go | 15 +++++----- pkg/filesystem/driver/oss/callback.go | 5 ++-- pkg/filesystem/driver/oss/callback_test.go | 5 ++-- pkg/filesystem/driver/oss/handler.go | 15 +++++----- pkg/filesystem/driver/oss/handler_test.go | 13 +++++---- pkg/filesystem/driver/qiniu/handler.go | 15 +++++----- pkg/filesystem/driver/remote/handler.go | 13 +++++---- pkg/filesystem/driver/remote/handler_test.go | 17 +++++------ pkg/filesystem/driver/s3/handler.go | 10 +++---- pkg/filesystem/driver/template/handler.go | 7 +++-- pkg/filesystem/driver/upyun/handler.go | 13 +++++---- pkg/filesystem/errors.go | 3 +- pkg/filesystem/file.go | 15 +++++----- pkg/filesystem/file_test.go | 19 +++++++------ pkg/filesystem/filesystem.go | 28 +++++++++---------- pkg/filesystem/filesystem_test.go | 13 +++++---- pkg/filesystem/hooks.go | 13 +++++---- pkg/filesystem/hooks_test.go | 23 +++++++-------- pkg/filesystem/image.go | 13 +++++---- pkg/filesystem/image_test.go | 9 +++--- pkg/filesystem/manage.go | 11 ++++---- pkg/filesystem/manage_test.go | 19 +++++++------ pkg/filesystem/path.go | 5 ++-- pkg/filesystem/path_test.go | 5 ++-- pkg/filesystem/upload.go | 17 +++++------ pkg/filesystem/upload_test.go | 21 +++++++------- pkg/filesystem/validator.go | 3 +- pkg/filesystem/validator_test.go | 7 +++-- pkg/hashid/hash.go | 5 ++-- pkg/request/request.go | 9 +++--- pkg/request/request_test.go | 7 +++-- pkg/request/slave.go | 7 +++-- pkg/request/slave_test.go | 7 +++-- pkg/serializer/aria2.go | 5 ++-- pkg/serializer/aria2_test.go | 9 +++--- pkg/serializer/setting.go | 2 +- pkg/serializer/setting_test.go | 5 ++-- pkg/serializer/share.go | 5 ++-- pkg/serializer/share_test.go | 7 +++-- pkg/serializer/user.go | 5 ++-- pkg/serializer/user_test.go | 7 +++-- pkg/task/compress.go | 7 +++-- pkg/task/compress_test.go | 9 +++--- pkg/task/decompress.go | 5 ++-- pkg/task/decompress_test.go | 5 ++-- pkg/task/import.go | 11 ++++---- pkg/task/import_test.go | 9 +++--- pkg/task/job.go | 4 +-- pkg/task/job_test.go | 5 ++-- pkg/task/pool.go | 4 +-- pkg/task/pool_test.go | 7 +++-- pkg/task/tranfer.go | 7 +++-- pkg/task/transfer_test.go | 5 ++-- pkg/task/worker.go | 2 +- pkg/task/worker_test.go | 5 ++-- pkg/thumb/image.go | 5 ++-- pkg/thumb/image_test.go | 7 +++-- pkg/webdav/file.go | 5 ++-- pkg/webdav/prop.go | 3 +- pkg/webdav/webdav.go | 11 ++++---- pkg/webdav/xml.go | 2 +- routers/controllers/admin.go | 13 +++++---- routers/controllers/aria2.go | 7 +++-- routers/controllers/callback.go | 6 ++-- routers/controllers/directory.go | 2 +- routers/controllers/file.go | 17 +++++------ routers/controllers/main.go | 5 ++-- routers/controllers/objects.go | 3 +- routers/controllers/share.go | 11 ++++---- routers/controllers/site.go | 8 +++--- routers/controllers/slave.go | 15 +++++----- routers/controllers/tag.go | 2 +- routers/controllers/user.go | 15 +++++----- routers/controllers/webdav.go | 10 +++---- routers/file_router_test.go | 11 ++++---- routers/main_test.go | 5 ++-- routers/router.go | 12 ++++---- routers/router_test.go | 7 +++-- service/admin/aria2.go | 5 ++-- service/admin/file.go | 13 +++++---- service/admin/group.go | 5 ++-- service/admin/list.go | 4 +-- service/admin/policy.go | 22 +++++++-------- service/admin/share.go | 9 +++--- service/admin/site.go | 11 ++++---- service/admin/task.go | 9 +++--- service/admin/user.go | 7 +++-- service/aria2/add.go | 8 +++--- service/aria2/manage.go | 6 ++-- service/callback/oauth.go | 11 ++++---- service/callback/upload.go | 16 +++++------ service/explorer/directory.go | 7 +++-- service/explorer/file.go | 17 +++++------ service/explorer/objects.go | 21 +++++++------- service/explorer/search.go | 11 ++++---- service/explorer/tag.go | 9 +++--- service/explorer/upload.go | 7 +++-- service/setting/webdav.go | 6 ++-- service/share/manage.go | 9 +++--- service/share/visit.go | 17 +++++------ service/user/login.go | 21 +++++++------- service/user/register.go | 19 +++++++------ service/user/setting.go | 11 ++++---- 172 files changed, 837 insertions(+), 699 deletions(-) diff --git a/bootstrap/app.go b/bootstrap/app.go index ccb4fdcc..093e3f48 100644 --- a/bootstrap/app.go +++ b/bootstrap/app.go @@ -3,9 +3,10 @@ package bootstrap import ( "encoding/json" "fmt" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/util" + + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/hashicorp/go-version" ) diff --git a/bootstrap/init.go b/bootstrap/init.go index 91309a89..98f2c8da 100644 --- a/bootstrap/init.go +++ b/bootstrap/init.go @@ -1,14 +1,14 @@ package bootstrap import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/crontab" - "github.com/HFO4/cloudreve/pkg/email" - "github.com/HFO4/cloudreve/pkg/task" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/crontab" + "github.com/cloudreve/Cloudreve/v3/pkg/email" + "github.com/cloudreve/Cloudreve/v3/pkg/task" "github.com/gin-gonic/gin" ) diff --git a/bootstrap/static.go b/bootstrap/static.go index d3f89679..7b8a9875 100644 --- a/bootstrap/static.go +++ b/bootstrap/static.go @@ -2,15 +2,15 @@ package bootstrap import ( "encoding/json" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/util" - _ "github.com/HFO4/cloudreve/statik" - "github.com/gin-contrib/static" - "github.com/rakyll/statik/fs" "io" "io/ioutil" "net/http" "path" + + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-contrib/static" + "github.com/rakyll/statik/fs" ) const StaticFolder = "statics" diff --git a/go.mod b/go.mod index 2b38ee47..14344f8f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/HFO4/cloudreve +module github.com/cloudreve/Cloudreve/v3 go 1.13 diff --git a/main.go b/main.go index 558a66aa..d1b4e53e 100644 --- a/main.go +++ b/main.go @@ -2,10 +2,11 @@ package main import ( "flag" - "github.com/HFO4/cloudreve/bootstrap" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/routers" + + "github.com/cloudreve/Cloudreve/v3/bootstrap" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/routers" ) var ( diff --git a/middleware/auth.go b/middleware/auth.go index cd2fe43b..ca68f0e4 100644 --- a/middleware/auth.go +++ b/middleware/auth.go @@ -8,14 +8,14 @@ import ( "io/ioutil" "net/http" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/onedrive" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/oss" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/upyun" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/onedrive" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/oss" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/upyun" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" "github.com/qiniu/api.v7/v7/auth/qbox" diff --git a/middleware/auth_test.go b/middleware/auth_test.go index e2531e39..95ab75c0 100644 --- a/middleware/auth_test.go +++ b/middleware/auth_test.go @@ -3,21 +3,22 @@ package middleware import ( "database/sql" "errors" - "github.com/DATA-DOG/go-sqlmock" - "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/jinzhu/gorm" - "github.com/qiniu/api.v7/v7/auth/qbox" - "github.com/stretchr/testify/assert" "io/ioutil" "net/http" "net/http/httptest" "strings" "testing" + + "github.com/DATA-DOG/go-sqlmock" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/jinzhu/gorm" + "github.com/qiniu/api.v7/v7/auth/qbox" + "github.com/stretchr/testify/assert" ) var mock sqlmock.Sqlmock diff --git a/middleware/mock.go b/middleware/mock.go index 482b0809..d026e77a 100644 --- a/middleware/mock.go +++ b/middleware/mock.go @@ -1,7 +1,7 @@ package middleware import ( - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" ) diff --git a/middleware/mock_test.go b/middleware/mock_test.go index cc715b1f..1ebee20d 100644 --- a/middleware/mock_test.go +++ b/middleware/mock_test.go @@ -1,12 +1,13 @@ package middleware import ( - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/stretchr/testify/assert" ) func TestMockHelper(t *testing.T) { diff --git a/middleware/option.go b/middleware/option.go index 3aaf6191..6704bcf8 100644 --- a/middleware/option.go +++ b/middleware/option.go @@ -1,13 +1,14 @@ package middleware import ( - "github.com/HFO4/cloudreve/bootstrap" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" "io/ioutil" + + "github.com/cloudreve/Cloudreve/v3/bootstrap" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" ) // HashID 将给定对象的HashID转换为真实ID diff --git a/middleware/option_test.go b/middleware/option_test.go index 1a75f61c..512c2e8f 100644 --- a/middleware/option_test.go +++ b/middleware/option_test.go @@ -2,17 +2,18 @@ package middleware import ( "errors" - "github.com/HFO4/cloudreve/bootstrap" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "net/http" "net/http/httptest" "os" "testing" + + "github.com/cloudreve/Cloudreve/v3/bootstrap" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestHashID(t *testing.T) { diff --git a/middleware/session.go b/middleware/session.go index f89609d3..9c3b6798 100644 --- a/middleware/session.go +++ b/middleware/session.go @@ -1,9 +1,9 @@ package middleware import ( - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-contrib/sessions" "github.com/gin-contrib/sessions/memstore" "github.com/gin-contrib/sessions/redis" diff --git a/middleware/session_test.go b/middleware/session_test.go index 674f4bd9..ac9403c5 100644 --- a/middleware/session_test.go +++ b/middleware/session_test.go @@ -1,13 +1,14 @@ package middleware import ( - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/stretchr/testify/assert" ) func TestSession(t *testing.T) { diff --git a/middleware/share.go b/middleware/share.go index a67a67b4..99e56474 100644 --- a/middleware/share.go +++ b/middleware/share.go @@ -2,9 +2,10 @@ package middleware import ( "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" ) diff --git a/middleware/share_test.go b/middleware/share_test.go index 6b75c304..129076b5 100644 --- a/middleware/share_test.go +++ b/middleware/share_test.go @@ -1,14 +1,15 @@ package middleware import ( + "net/http/httptest" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "net/http/httptest" - "testing" ) func TestShareAvailable(t *testing.T) { diff --git a/models/download.go b/models/download.go index da47b958..e73ae5fc 100644 --- a/models/download.go +++ b/models/download.go @@ -2,8 +2,9 @@ package model import ( "encoding/json" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/HFO4/cloudreve/pkg/util" + + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" ) diff --git a/models/file.go b/models/file.go index 54de0f54..bc2f0114 100644 --- a/models/file.go +++ b/models/file.go @@ -2,10 +2,11 @@ package model import ( "encoding/gob" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/jinzhu/gorm" "path" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/jinzhu/gorm" ) // File 文件 diff --git a/models/folder.go b/models/folder.go index 1366f716..70c55090 100644 --- a/models/folder.go +++ b/models/folder.go @@ -2,10 +2,11 @@ package model import ( "errors" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/jinzhu/gorm" "path" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/jinzhu/gorm" ) // Folder 目录 diff --git a/models/folder_test.go b/models/folder_test.go index 1996c6d2..0ccd821b 100644 --- a/models/folder_test.go +++ b/models/folder_test.go @@ -2,12 +2,13 @@ package model import ( "errors" + "testing" + "time" + "github.com/DATA-DOG/go-sqlmock" - "github.com/HFO4/cloudreve/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" - "time" ) func TestFolder_Create(t *testing.T) { diff --git a/models/init.go b/models/init.go index 80a6b3d8..02af046d 100644 --- a/models/init.go +++ b/models/init.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" diff --git a/models/migration.go b/models/migration.go index 85969e4f..4683d812 100644 --- a/models/migration.go +++ b/models/migration.go @@ -1,9 +1,9 @@ package model import ( - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/fatih/color" "github.com/jinzhu/gorm" ) diff --git a/models/migration_test.go b/models/migration_test.go index 5c1cf8c9..55faefe5 100644 --- a/models/migration_test.go +++ b/models/migration_test.go @@ -1,10 +1,11 @@ package model import ( - "github.com/HFO4/cloudreve/pkg/conf" + "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/conf" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestMigration(t *testing.T) { diff --git a/models/policy.go b/models/policy.go index 61fd1711..7c0dee41 100644 --- a/models/policy.go +++ b/models/policy.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" ) diff --git a/models/policy_test.go b/models/policy_test.go index 5519ff66..61681483 100644 --- a/models/policy_test.go +++ b/models/policy_test.go @@ -2,13 +2,14 @@ package model import ( "encoding/json" - "github.com/DATA-DOG/go-sqlmock" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" "strconv" "testing" "time" + + "github.com/DATA-DOG/go-sqlmock" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" ) func TestGetPolicyByID(t *testing.T) { diff --git a/models/setting.go b/models/setting.go index d14cf72b..f8157cfa 100644 --- a/models/setting.go +++ b/models/setting.go @@ -1,10 +1,11 @@ package model import ( - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/jinzhu/gorm" "net/url" "strconv" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/jinzhu/gorm" ) // Setting 系统设置模型 diff --git a/models/setting_test.go b/models/setting_test.go index e6c716ca..d9bf9626 100644 --- a/models/setting_test.go +++ b/models/setting_test.go @@ -2,11 +2,12 @@ package model import ( "database/sql" + "testing" + "github.com/DATA-DOG/go-sqlmock" - "github.com/HFO4/cloudreve/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) var mock sqlmock.Sqlmock diff --git a/models/share.go b/models/share.go index 535a04ae..137e7451 100644 --- a/models/share.go +++ b/models/share.go @@ -3,13 +3,14 @@ package model import ( "errors" "fmt" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/jinzhu/gorm" "strings" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/jinzhu/gorm" ) // Share 分享模型 diff --git a/models/share_test.go b/models/share_test.go index 0f0c1857..52e2ee66 100644 --- a/models/share_test.go +++ b/models/share_test.go @@ -2,15 +2,16 @@ package model import ( "errors" + "net/http/httptest" + "testing" + "time" + "github.com/DATA-DOG/go-sqlmock" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "net/http/httptest" - "testing" - "time" ) func TestShare_Create(t *testing.T) { diff --git a/models/tag.go b/models/tag.go index 92c9a9e5..5c5250f9 100644 --- a/models/tag.go +++ b/models/tag.go @@ -1,7 +1,7 @@ package model import ( - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" ) diff --git a/models/task.go b/models/task.go index 01ec5e52..e880f85a 100644 --- a/models/task.go +++ b/models/task.go @@ -1,7 +1,7 @@ package model import ( - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" ) diff --git a/models/user.go b/models/user.go index b6ae0fbf..c4226f07 100644 --- a/models/user.go +++ b/models/user.go @@ -5,10 +5,11 @@ import ( "crypto/sha1" "encoding/hex" "encoding/json" - "github.com/HFO4/cloudreve/pkg/util" + "strings" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" "github.com/pkg/errors" - "strings" ) const ( diff --git a/models/user_authn.go b/models/user_authn.go index d9b2be5c..ba329bf1 100644 --- a/models/user_authn.go +++ b/models/user_authn.go @@ -5,9 +5,10 @@ import ( "encoding/binary" "encoding/json" "fmt" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/duo-labs/webauthn/webauthn" "net/url" + + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/duo-labs/webauthn/webauthn" ) /* diff --git a/models/user_test.go b/models/user_test.go index 3a241df2..ea346a2d 100644 --- a/models/user_test.go +++ b/models/user_test.go @@ -2,12 +2,13 @@ package model import ( "encoding/json" + "testing" + "github.com/DATA-DOG/go-sqlmock" - "github.com/HFO4/cloudreve/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/jinzhu/gorm" "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "testing" ) func TestGetUserByID(t *testing.T) { diff --git a/pkg/aria2/aria2.go b/pkg/aria2/aria2.go index 6c2ad582..40ce36ae 100644 --- a/pkg/aria2/aria2.go +++ b/pkg/aria2/aria2.go @@ -2,12 +2,13 @@ package aria2 import ( "encoding/json" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" "net/url" "sync" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // Instance 默认使用的Aria2处理实例 diff --git a/pkg/aria2/aria2_test.go b/pkg/aria2/aria2_test.go index 79925562..51605a1a 100644 --- a/pkg/aria2/aria2_test.go +++ b/pkg/aria2/aria2_test.go @@ -2,12 +2,13 @@ package aria2 import ( "database/sql" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) var mock sqlmock.Sqlmock diff --git a/pkg/aria2/caller.go b/pkg/aria2/caller.go index 5ed2e59e..6e287a2a 100644 --- a/pkg/aria2/caller.go +++ b/pkg/aria2/caller.go @@ -2,13 +2,14 @@ package aria2 import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/HFO4/cloudreve/pkg/util" "path/filepath" "strconv" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // RPCService 通过RPC服务的Aria2任务管理器 diff --git a/pkg/aria2/caller_test.go b/pkg/aria2/caller_test.go index ca065b84..f2156893 100644 --- a/pkg/aria2/caller_test.go +++ b/pkg/aria2/caller_test.go @@ -1,10 +1,11 @@ package aria2 import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/stretchr/testify/assert" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/stretchr/testify/assert" ) func TestRPCService_Init(t *testing.T) { diff --git a/pkg/aria2/monitor.go b/pkg/aria2/monitor.go index eeb9226d..bd27f749 100644 --- a/pkg/aria2/monitor.go +++ b/pkg/aria2/monitor.go @@ -4,17 +4,18 @@ import ( "context" "encoding/json" "errors" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/task" - "github.com/HFO4/cloudreve/pkg/util" "os" "path/filepath" "strconv" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/task" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // Monitor 离线下载状态监控 diff --git a/pkg/aria2/monitor_test.go b/pkg/aria2/monitor_test.go index c04e89a8..91728942 100644 --- a/pkg/aria2/monitor_test.go +++ b/pkg/aria2/monitor_test.go @@ -2,18 +2,19 @@ package aria2 import ( "errors" + "testing" + "time" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/task" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/task" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" testMock "github.com/stretchr/testify/mock" - "testing" - "time" ) type InstanceMock struct { diff --git a/pkg/aria2/notification.go b/pkg/aria2/notification.go index 9eb3c525..e2ead914 100644 --- a/pkg/aria2/notification.go +++ b/pkg/aria2/notification.go @@ -1,8 +1,9 @@ package aria2 import ( - "github.com/HFO4/cloudreve/pkg/aria2/rpc" "sync" + + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" ) // Notifier aria2实践通知处理 diff --git a/pkg/aria2/notification_test.go b/pkg/aria2/notification_test.go index 5b000191..21a7ac11 100644 --- a/pkg/aria2/notification_test.go +++ b/pkg/aria2/notification_test.go @@ -1,9 +1,10 @@ package aria2 import ( - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/stretchr/testify/assert" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/stretchr/testify/assert" ) func TestNotifier_Notify(t *testing.T) { diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index a0f89b7b..86d02c6c 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -2,15 +2,16 @@ package auth import ( "bytes" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" "io/ioutil" "net/http" "net/url" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) var ( diff --git a/pkg/auth/auth_test.go b/pkg/auth/auth_test.go index 44fba71e..1092cb52 100644 --- a/pkg/auth/auth_test.go +++ b/pkg/auth/auth_test.go @@ -1,12 +1,13 @@ package auth import ( - "github.com/HFO4/cloudreve/pkg/util" - "github.com/stretchr/testify/assert" "io/ioutil" "net/http" "strings" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/stretchr/testify/assert" ) func TestSignURI(t *testing.T) { diff --git a/pkg/auth/hmac_test.go b/pkg/auth/hmac_test.go index 90f55c70..706f617e 100644 --- a/pkg/auth/hmac_test.go +++ b/pkg/auth/hmac_test.go @@ -3,15 +3,16 @@ package auth import ( "database/sql" "fmt" + "testing" + "time" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" - "time" ) var mock sqlmock.Sqlmock diff --git a/pkg/authn/auth.go b/pkg/authn/auth.go index ee719e18..5c5b4b71 100644 --- a/pkg/authn/auth.go +++ b/pkg/authn/auth.go @@ -1,7 +1,7 @@ package authn import ( - model "github.com/HFO4/cloudreve/models" + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/duo-labs/webauthn/webauthn" ) diff --git a/pkg/authn/auth_test.go b/pkg/authn/auth_test.go index 036aa533..3df60cfc 100644 --- a/pkg/authn/auth_test.go +++ b/pkg/authn/auth_test.go @@ -1,9 +1,10 @@ package authn import ( - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/stretchr/testify/assert" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/stretchr/testify/assert" ) func TestInit(t *testing.T) { diff --git a/pkg/cache/driver.go b/pkg/cache/driver.go index 07d71522..35f69228 100644 --- a/pkg/cache/driver.go +++ b/pkg/cache/driver.go @@ -1,7 +1,7 @@ package cache import ( - "github.com/HFO4/cloudreve/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" "github.com/gin-gonic/gin" ) diff --git a/pkg/cache/memo.go b/pkg/cache/memo.go index 3b5c3660..8b7522b7 100644 --- a/pkg/cache/memo.go +++ b/pkg/cache/memo.go @@ -1,9 +1,10 @@ package cache import ( - "github.com/HFO4/cloudreve/pkg/util" "sync" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // MemoStore 内存存储驱动 diff --git a/pkg/cache/redis.go b/pkg/cache/redis.go index de0c45b4..c2b9bb7b 100644 --- a/pkg/cache/redis.go +++ b/pkg/cache/redis.go @@ -3,10 +3,11 @@ package cache import ( "bytes" "encoding/gob" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gomodule/redigo/redis" "strconv" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gomodule/redigo/redis" ) // RedisStore redis存储驱动 diff --git a/pkg/conf/conf.go b/pkg/conf/conf.go index 43f24814..c135a50e 100644 --- a/pkg/conf/conf.go +++ b/pkg/conf/conf.go @@ -1,7 +1,7 @@ package conf import ( - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/go-ini/ini" "gopkg.in/go-playground/validator.v9" ) @@ -34,7 +34,7 @@ type ssl struct { } type unix struct { - Listen string + Listen string } // slave 作为slave存储端配置 diff --git a/pkg/conf/conf_test.go b/pkg/conf/conf_test.go index 35aeb175..aa95a7ef 100644 --- a/pkg/conf/conf_test.go +++ b/pkg/conf/conf_test.go @@ -1,11 +1,12 @@ package conf import ( - "github.com/HFO4/cloudreve/pkg/util" - "github.com/stretchr/testify/assert" "io/ioutil" "os" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/stretchr/testify/assert" ) // 测试Init日志路径错误 diff --git a/pkg/crontab/collect.go b/pkg/crontab/collect.go index 512f8b5c..be6798b7 100644 --- a/pkg/crontab/collect.go +++ b/pkg/crontab/collect.go @@ -1,13 +1,14 @@ package crontab import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/util" "os" "path/filepath" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) func garbageCollect() { diff --git a/pkg/crontab/init.go b/pkg/crontab/init.go index 78f17561..1b8a3221 100644 --- a/pkg/crontab/init.go +++ b/pkg/crontab/init.go @@ -1,8 +1,8 @@ package crontab import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/robfig/cron/v3" ) diff --git a/pkg/email/init.go b/pkg/email/init.go index 65abd756..64771a98 100644 --- a/pkg/email/init.go +++ b/pkg/email/init.go @@ -1,9 +1,10 @@ package email import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" "sync" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // Client 默认的邮件发送客户端 diff --git a/pkg/email/smtp.go b/pkg/email/smtp.go index 26946acc..9b77cd9a 100644 --- a/pkg/email/smtp.go +++ b/pkg/email/smtp.go @@ -1,9 +1,10 @@ package email import ( - "github.com/HFO4/cloudreve/pkg/util" - "github.com/go-mail/mail" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/go-mail/mail" ) // SMTP SMTP协议发送邮件 diff --git a/pkg/email/template.go b/pkg/email/template.go index 7b25ce39..cb9cb3a1 100644 --- a/pkg/email/template.go +++ b/pkg/email/template.go @@ -2,8 +2,9 @@ package email import ( "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // NewActivationEmail 新建激活邮件 diff --git a/pkg/filesystem/archive.go b/pkg/filesystem/archive.go index f867de4f..1359e282 100644 --- a/pkg/filesystem/archive.go +++ b/pkg/filesystem/archive.go @@ -5,12 +5,6 @@ import ( "bytes" "context" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "golang.org/x/text/encoding/simplifiedchinese" - "golang.org/x/text/transform" "io" "io/ioutil" "os" @@ -19,6 +13,13 @@ import ( "strings" "sync" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "golang.org/x/text/encoding/simplifiedchinese" + "golang.org/x/text/transform" ) /* =============== diff --git a/pkg/filesystem/archive_test.go b/pkg/filesystem/archive_test.go index 64c6f5d8..7a697ce7 100644 --- a/pkg/filesystem/archive_test.go +++ b/pkg/filesystem/archive_test.go @@ -3,19 +3,20 @@ package filesystem import ( "context" "errors" - "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "os" "strings" "testing" + + "github.com/DATA-DOG/go-sqlmock" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestFileSystem_Compress(t *testing.T) { diff --git a/pkg/filesystem/driver/cos/handler.go b/pkg/filesystem/driver/cos/handler.go index 6e76a944..008c863a 100644 --- a/pkg/filesystem/driver/cos/handler.go +++ b/pkg/filesystem/driver/cos/handler.go @@ -8,13 +8,6 @@ import ( "encoding/json" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/google/go-querystring/query" - cossdk "github.com/tencentyun/cos-go-sdk-v5" "io" "net/http" "net/url" @@ -22,6 +15,14 @@ import ( "path/filepath" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/google/go-querystring/query" + cossdk "github.com/tencentyun/cos-go-sdk-v5" ) // UploadPolicy 腾讯云COS上传策略 diff --git a/pkg/filesystem/driver/cos/scf.go b/pkg/filesystem/driver/cos/scf.go index 2874f5a3..9ddb29c1 100644 --- a/pkg/filesystem/driver/cos/scf.go +++ b/pkg/filesystem/driver/cos/scf.go @@ -4,17 +4,18 @@ import ( "archive/zip" "bytes" "encoding/base64" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" - scf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf/v20180416" "io" "io/ioutil" "net/url" "strconv" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" + scf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf/v20180416" ) const scfFunc = `# -*- coding: utf8 -*- diff --git a/pkg/filesystem/driver/local/handler.go b/pkg/filesystem/driver/local/handler.go index 360e9c2d..633150ad 100644 --- a/pkg/filesystem/driver/local/handler.go +++ b/pkg/filesystem/driver/local/handler.go @@ -4,18 +4,19 @@ import ( "context" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" "io" "net/url" "os" "path/filepath" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // Driver 本地策略适配器 diff --git a/pkg/filesystem/driver/local/handler_test.go b/pkg/filesystem/driver/local/handler_test.go index e0c3ddba..2256db73 100644 --- a/pkg/filesystem/driver/local/handler_test.go +++ b/pkg/filesystem/driver/local/handler_test.go @@ -2,19 +2,20 @@ package local import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" "io" "io/ioutil" "net/url" "os" "strings" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" ) func TestHandler_Put(t *testing.T) { diff --git a/pkg/filesystem/driver/onedrive/api.go b/pkg/filesystem/driver/onedrive/api.go index 51d69a10..b791bbfe 100644 --- a/pkg/filesystem/driver/onedrive/api.go +++ b/pkg/filesystem/driver/onedrive/api.go @@ -6,11 +6,6 @@ import ( "encoding/json" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/util" "io" "io/ioutil" "net/http" @@ -19,6 +14,12 @@ import ( "strconv" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) const ( diff --git a/pkg/filesystem/driver/onedrive/api_test.go b/pkg/filesystem/driver/onedrive/api_test.go index e80c6184..62888e85 100644 --- a/pkg/filesystem/driver/onedrive/api_test.go +++ b/pkg/filesystem/driver/onedrive/api_test.go @@ -4,16 +4,17 @@ import ( "context" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io/ioutil" "net/http" "strings" "testing" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestRequest(t *testing.T) { diff --git a/pkg/filesystem/driver/onedrive/client.go b/pkg/filesystem/driver/onedrive/client.go index ccf1512b..2767fe28 100644 --- a/pkg/filesystem/driver/onedrive/client.go +++ b/pkg/filesystem/driver/onedrive/client.go @@ -2,8 +2,9 @@ package onedrive import ( "errors" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/request" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/request" ) var ( diff --git a/pkg/filesystem/driver/onedrive/client_test.go b/pkg/filesystem/driver/onedrive/client_test.go index c298a823..aa3c1320 100644 --- a/pkg/filesystem/driver/onedrive/client_test.go +++ b/pkg/filesystem/driver/onedrive/client_test.go @@ -1,9 +1,10 @@ package onedrive import ( - model "github.com/HFO4/cloudreve/models" - "github.com/stretchr/testify/assert" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/stretchr/testify/assert" ) func TestNewClient(t *testing.T) { diff --git a/pkg/filesystem/driver/onedrive/handler.go b/pkg/filesystem/driver/onedrive/handler.go index e91ba2f3..8afe66a9 100644 --- a/pkg/filesystem/driver/onedrive/handler.go +++ b/pkg/filesystem/driver/onedrive/handler.go @@ -4,18 +4,19 @@ import ( "context" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" "io" "net/url" "path" "path/filepath" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // Driver OneDrive 适配器 diff --git a/pkg/filesystem/driver/onedrive/handler_test.go b/pkg/filesystem/driver/onedrive/handler_test.go index ccb5414f..a4a5be14 100644 --- a/pkg/filesystem/driver/onedrive/handler_test.go +++ b/pkg/filesystem/driver/onedrive/handler_test.go @@ -2,14 +2,6 @@ package onedrive import ( "context" - "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" @@ -17,6 +9,15 @@ import ( "strings" "testing" "time" + + "github.com/DATA-DOG/go-sqlmock" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestDriver_Token(t *testing.T) { diff --git a/pkg/filesystem/driver/onedrive/oauth.go b/pkg/filesystem/driver/onedrive/oauth.go index 28dbd9c6..607accd4 100644 --- a/pkg/filesystem/driver/onedrive/oauth.go +++ b/pkg/filesystem/driver/onedrive/oauth.go @@ -3,14 +3,15 @@ package onedrive import ( "context" "encoding/json" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/util" "io/ioutil" "net/http" "net/url" "strings" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // Error 实现error接口 diff --git a/pkg/filesystem/driver/onedrive/oauth_test.go b/pkg/filesystem/driver/onedrive/oauth_test.go index 33857d87..62243dc9 100644 --- a/pkg/filesystem/driver/onedrive/oauth_test.go +++ b/pkg/filesystem/driver/onedrive/oauth_test.go @@ -4,13 +4,6 @@ import ( "context" "database/sql" "errors" - "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" @@ -18,6 +11,14 @@ import ( "strings" "testing" "time" + + "github.com/DATA-DOG/go-sqlmock" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) var mock sqlmock.Sqlmock diff --git a/pkg/filesystem/driver/oss/callback.go b/pkg/filesystem/driver/oss/callback.go index dbfc4bcf..7ca1e230 100644 --- a/pkg/filesystem/driver/oss/callback.go +++ b/pkg/filesystem/driver/oss/callback.go @@ -10,12 +10,13 @@ import ( "encoding/pem" "errors" "fmt" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/request" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/request" ) // GetPublicKey 从回调请求或缓存中获取OSS的回调签名公钥 diff --git a/pkg/filesystem/driver/oss/callback_test.go b/pkg/filesystem/driver/oss/callback_test.go index 20c8a2cd..1d293414 100644 --- a/pkg/filesystem/driver/oss/callback_test.go +++ b/pkg/filesystem/driver/oss/callback_test.go @@ -1,13 +1,14 @@ package oss import ( - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/stretchr/testify/assert" "io/ioutil" "net/http" "net/url" "strings" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/stretchr/testify/assert" ) func TestGetPublicKey(t *testing.T) { diff --git a/pkg/filesystem/driver/oss/handler.go b/pkg/filesystem/driver/oss/handler.go index 626ba9a0..c68e25c0 100644 --- a/pkg/filesystem/driver/oss/handler.go +++ b/pkg/filesystem/driver/oss/handler.go @@ -8,19 +8,20 @@ import ( "encoding/json" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/aliyun/aliyun-oss-go-sdk/oss" "io" "net/url" "path" "path/filepath" "strings" "time" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // UploadPolicy 阿里云OSS上传策略 diff --git a/pkg/filesystem/driver/oss/handler_test.go b/pkg/filesystem/driver/oss/handler_test.go index 5bd83c23..e571d55e 100644 --- a/pkg/filesystem/driver/oss/handler_test.go +++ b/pkg/filesystem/driver/oss/handler_test.go @@ -2,18 +2,19 @@ package oss import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" "net/url" "strings" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestDriver_InitOSSClient(t *testing.T) { diff --git a/pkg/filesystem/driver/qiniu/handler.go b/pkg/filesystem/driver/qiniu/handler.go index 355e4667..4b24cc53 100644 --- a/pkg/filesystem/driver/qiniu/handler.go +++ b/pkg/filesystem/driver/qiniu/handler.go @@ -4,13 +4,6 @@ import ( "context" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/qiniu/api.v7/v7/auth/qbox" - "github.com/qiniu/api.v7/v7/storage" "io" "net/http" "net/url" @@ -18,6 +11,14 @@ import ( "path/filepath" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/qiniu/api.v7/v7/auth/qbox" + "github.com/qiniu/api.v7/v7/storage" ) // Driver 本地策略适配器 diff --git a/pkg/filesystem/driver/remote/handler.go b/pkg/filesystem/driver/remote/handler.go index 4b584ec6..c80e24d1 100644 --- a/pkg/filesystem/driver/remote/handler.go +++ b/pkg/filesystem/driver/remote/handler.go @@ -6,18 +6,19 @@ import ( "encoding/json" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" "io" "net/http" "net/url" "path" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // Driver 远程存储策略适配器 diff --git a/pkg/filesystem/driver/remote/handler_test.go b/pkg/filesystem/driver/remote/handler_test.go index bf2790b6..7ec91dc7 100644 --- a/pkg/filesystem/driver/remote/handler_test.go +++ b/pkg/filesystem/driver/remote/handler_test.go @@ -2,20 +2,21 @@ package remote import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" "net/url" "strings" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestHandler_Token(t *testing.T) { diff --git a/pkg/filesystem/driver/s3/handler.go b/pkg/filesystem/driver/s3/handler.go index 4cf44e2c..4a4a0792 100644 --- a/pkg/filesystem/driver/s3/handler.go +++ b/pkg/filesystem/driver/s3/handler.go @@ -17,16 +17,16 @@ import ( "sync" "time" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // Driver 适配器模板 diff --git a/pkg/filesystem/driver/template/handler.go b/pkg/filesystem/driver/template/handler.go index 165ed93e..d6caefd3 100644 --- a/pkg/filesystem/driver/template/handler.go +++ b/pkg/filesystem/driver/template/handler.go @@ -3,11 +3,12 @@ package template import ( "context" "errors" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/serializer" "io" "net/url" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // Driver 适配器模板 diff --git a/pkg/filesystem/driver/upyun/handler.go b/pkg/filesystem/driver/upyun/handler.go index 9b4fc190..30fafa56 100644 --- a/pkg/filesystem/driver/upyun/handler.go +++ b/pkg/filesystem/driver/upyun/handler.go @@ -9,12 +9,6 @@ import ( "encoding/json" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/upyun/go-sdk/upyun" "io" "net/http" "net/url" @@ -23,6 +17,13 @@ import ( "strings" "sync" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/upyun/go-sdk/upyun" ) // UploadPolicy 又拍云上传策略 diff --git a/pkg/filesystem/errors.go b/pkg/filesystem/errors.go index 56f3d356..a7b8c905 100644 --- a/pkg/filesystem/errors.go +++ b/pkg/filesystem/errors.go @@ -2,7 +2,8 @@ package filesystem import ( "errors" - "github.com/HFO4/cloudreve/pkg/serializer" + + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) var ( diff --git a/pkg/filesystem/file.go b/pkg/filesystem/file.go index deaf98aa..efe5101d 100644 --- a/pkg/filesystem/file.go +++ b/pkg/filesystem/file.go @@ -2,14 +2,15 @@ package filesystem import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/juju/ratelimit" "io" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/juju/ratelimit" ) /* ============ diff --git a/pkg/filesystem/file_test.go b/pkg/filesystem/file_test.go index efb4c9bc..d80cd378 100644 --- a/pkg/filesystem/file_test.go +++ b/pkg/filesystem/file_test.go @@ -2,18 +2,19 @@ package filesystem import ( "context" + "os" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "os" - "testing" ) func TestFileSystem_AddFile(t *testing.T) { diff --git a/pkg/filesystem/filesystem.go b/pkg/filesystem/filesystem.go index 030f6cfc..b6c80e3c 100644 --- a/pkg/filesystem/filesystem.go +++ b/pkg/filesystem/filesystem.go @@ -8,20 +8,20 @@ import ( "net/url" "sync" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/cos" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/onedrive" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/oss" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/qiniu" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/remote" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/s3" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/upyun" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/cos" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/onedrive" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/oss" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/qiniu" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/remote" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/s3" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/upyun" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" cossdk "github.com/tencentyun/cos-go-sdk-v5" ) diff --git a/pkg/filesystem/filesystem_test.go b/pkg/filesystem/filesystem_test.go index 140024fe..6ec56db7 100644 --- a/pkg/filesystem/filesystem_test.go +++ b/pkg/filesystem/filesystem_test.go @@ -1,15 +1,16 @@ package filesystem import ( + "net/http/httptest" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/remote" - "github.com/HFO4/cloudreve/pkg/serializer" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/remote" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" "github.com/stretchr/testify/assert" - "net/http/httptest" "testing" ) diff --git a/pkg/filesystem/hooks.go b/pkg/filesystem/hooks.go index 1c39ee42..9c6692f7 100644 --- a/pkg/filesystem/hooks.go +++ b/pkg/filesystem/hooks.go @@ -3,14 +3,15 @@ package filesystem import ( "context" "errors" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" "io/ioutil" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // Hook 钩子函数 diff --git a/pkg/filesystem/hooks_test.go b/pkg/filesystem/hooks_test.go index 9a00265b..59fe56b6 100644 --- a/pkg/filesystem/hooks_test.go +++ b/pkg/filesystem/hooks_test.go @@ -3,23 +3,24 @@ package filesystem import ( "context" "errors" - "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" "os" "strings" "testing" + + "github.com/DATA-DOG/go-sqlmock" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestGenericBeforeUpload(t *testing.T) { diff --git a/pkg/filesystem/image.go b/pkg/filesystem/image.go index 16c1b774..a2e7e08d 100644 --- a/pkg/filesystem/image.go +++ b/pkg/filesystem/image.go @@ -3,13 +3,14 @@ package filesystem import ( "context" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/thumb" - "github.com/HFO4/cloudreve/pkg/util" "strconv" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/thumb" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) /* ================ diff --git a/pkg/filesystem/image_test.go b/pkg/filesystem/image_test.go index eb642fdd..0c4d0261 100644 --- a/pkg/filesystem/image_test.go +++ b/pkg/filesystem/image_test.go @@ -2,12 +2,13 @@ package filesystem import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/response" + "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" "github.com/stretchr/testify/assert" testMock "github.com/stretchr/testify/mock" - "testing" ) func TestFileSystem_GetThumb(t *testing.T) { diff --git a/pkg/filesystem/manage.go b/pkg/filesystem/manage.go index 9a5a636d..ba99571e 100644 --- a/pkg/filesystem/manage.go +++ b/pkg/filesystem/manage.go @@ -3,13 +3,14 @@ package filesystem import ( "context" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" "path" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) /* ================= diff --git a/pkg/filesystem/manage_test.go b/pkg/filesystem/manage_test.go index 2d795ce5..4156f346 100644 --- a/pkg/filesystem/manage_test.go +++ b/pkg/filesystem/manage_test.go @@ -3,19 +3,20 @@ package filesystem import ( "context" "errors" + "os" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" testMock "github.com/stretchr/testify/mock" - "os" - "testing" ) func TestFileSystem_ListPhysical(t *testing.T) { diff --git a/pkg/filesystem/path.go b/pkg/filesystem/path.go index a57a57ed..b0637aa7 100644 --- a/pkg/filesystem/path.go +++ b/pkg/filesystem/path.go @@ -1,9 +1,10 @@ package filesystem import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" "path" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) /* ================= diff --git a/pkg/filesystem/path_test.go b/pkg/filesystem/path_test.go index 57d8e6d0..e4065a4f 100644 --- a/pkg/filesystem/path_test.go +++ b/pkg/filesystem/path_test.go @@ -1,11 +1,12 @@ package filesystem import ( + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestFileSystem_IsFileExist(t *testing.T) { diff --git a/pkg/filesystem/upload.go b/pkg/filesystem/upload.go index 7ca9b0fc..2ff8997f 100644 --- a/pkg/filesystem/upload.go +++ b/pkg/filesystem/upload.go @@ -2,17 +2,18 @@ package filesystem import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" "io" "os" "path" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" ) /* ================ diff --git a/pkg/filesystem/upload_test.go b/pkg/filesystem/upload_test.go index 80106649..2c0d827c 100644 --- a/pkg/filesystem/upload_test.go +++ b/pkg/filesystem/upload_test.go @@ -3,16 +3,6 @@ package filesystem import ( "context" "errors" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/filesystem/response" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/gin-gonic/gin" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" @@ -20,6 +10,17 @@ import ( "net/url" "strings" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/response" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/gin-gonic/gin" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) type FileHeaderMock struct { diff --git a/pkg/filesystem/validator.go b/pkg/filesystem/validator.go index 42887608..16396758 100644 --- a/pkg/filesystem/validator.go +++ b/pkg/filesystem/validator.go @@ -2,9 +2,10 @@ package filesystem import ( "context" - "github.com/HFO4/cloudreve/pkg/util" "path/filepath" "strings" + + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) /* ========== diff --git a/pkg/filesystem/validator_test.go b/pkg/filesystem/validator_test.go index 6e2c078c..8a39ae28 100644 --- a/pkg/filesystem/validator_test.go +++ b/pkg/filesystem/validator_test.go @@ -3,12 +3,13 @@ package filesystem import ( "context" "database/sql" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) var mock sqlmock.Sqlmock diff --git a/pkg/hashid/hash.go b/pkg/hashid/hash.go index ce89b485..942c9536 100644 --- a/pkg/hashid/hash.go +++ b/pkg/hashid/hash.go @@ -2,9 +2,10 @@ package hashid import ( "errors" - "github.com/HFO4/cloudreve/pkg/conf" + + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/speps/go-hashids" ) -import "github.com/speps/go-hashids" // ID类型 const ( diff --git a/pkg/request/request.go b/pkg/request/request.go index 80c17e2f..36195c8d 100644 --- a/pkg/request/request.go +++ b/pkg/request/request.go @@ -5,14 +5,15 @@ import ( "encoding/json" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" "io" "io/ioutil" "net/http" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // GeneralClient 通用 HTTP Client diff --git a/pkg/request/request_test.go b/pkg/request/request_test.go index 0dd8d378..1dac1059 100644 --- a/pkg/request/request_test.go +++ b/pkg/request/request_test.go @@ -3,15 +3,16 @@ package request import ( "context" "errors" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io" "io/ioutil" "net/http" "strings" "testing" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) type ClientMock struct { diff --git a/pkg/request/slave.go b/pkg/request/slave.go index 1d52c735..0bd1ca3a 100644 --- a/pkg/request/slave.go +++ b/pkg/request/slave.go @@ -4,10 +4,11 @@ import ( "bytes" "encoding/json" "errors" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/serializer" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // RemoteCallback 发送远程存储策略上传回调请求 diff --git a/pkg/request/slave_test.go b/pkg/request/slave_test.go index d97f79e6..a7f9fcff 100644 --- a/pkg/request/slave_test.go +++ b/pkg/request/slave_test.go @@ -4,13 +4,14 @@ import ( "bytes" "encoding/json" "errors" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/stretchr/testify/assert" - testMock "github.com/stretchr/testify/mock" "io/ioutil" "net/http" "strings" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/stretchr/testify/assert" + testMock "github.com/stretchr/testify/mock" ) func TestRemoteCallback(t *testing.T) { diff --git a/pkg/serializer/aria2.go b/pkg/serializer/aria2.go index 0f0ffa0b..61afafac 100644 --- a/pkg/serializer/aria2.go +++ b/pkg/serializer/aria2.go @@ -1,9 +1,10 @@ package serializer import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" "path" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" ) // DownloadListResponse 下载列表响应条目 diff --git a/pkg/serializer/aria2_test.go b/pkg/serializer/aria2_test.go index 3f0ad7d0..48e73837 100644 --- a/pkg/serializer/aria2_test.go +++ b/pkg/serializer/aria2_test.go @@ -1,12 +1,13 @@ package serializer import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2/rpc" - "github.com/HFO4/cloudreve/pkg/cache" + "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2/rpc" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestBuildFinishedListResponse(t *testing.T) { diff --git a/pkg/serializer/setting.go b/pkg/serializer/setting.go index 1b55afa9..c5b310bd 100644 --- a/pkg/serializer/setting.go +++ b/pkg/serializer/setting.go @@ -1,6 +1,6 @@ package serializer -import model "github.com/HFO4/cloudreve/models" +import model "github.com/cloudreve/Cloudreve/v3/models" // SiteConfig 站点全局设置序列 type SiteConfig struct { diff --git a/pkg/serializer/setting_test.go b/pkg/serializer/setting_test.go index a286e65e..04fb8f6d 100644 --- a/pkg/serializer/setting_test.go +++ b/pkg/serializer/setting_test.go @@ -1,10 +1,11 @@ package serializer import ( - model "github.com/HFO4/cloudreve/models" + "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestCheckSettingValue(t *testing.T) { diff --git a/pkg/serializer/share.go b/pkg/serializer/share.go index 2bc79796..9f677041 100644 --- a/pkg/serializer/share.go +++ b/pkg/serializer/share.go @@ -1,9 +1,10 @@ package serializer import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" ) // Share 分享信息序列化 diff --git a/pkg/serializer/share_test.go b/pkg/serializer/share_test.go index f501e149..72feb0cc 100644 --- a/pkg/serializer/share_test.go +++ b/pkg/serializer/share_test.go @@ -1,11 +1,12 @@ package serializer import ( - model "github.com/HFO4/cloudreve/models" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" "testing" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" ) func TestBuildShareList(t *testing.T) { diff --git a/pkg/serializer/user.go b/pkg/serializer/user.go index 688ba230..a4f3ed0f 100644 --- a/pkg/serializer/user.go +++ b/pkg/serializer/user.go @@ -2,8 +2,9 @@ package serializer import ( "fmt" - "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" "github.com/duo-labs/webauthn/webauthn" ) diff --git a/pkg/serializer/user_test.go b/pkg/serializer/user_test.go index 603175cb..cb70fcc8 100644 --- a/pkg/serializer/user_test.go +++ b/pkg/serializer/user_test.go @@ -2,13 +2,14 @@ package serializer import ( "database/sql" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/duo-labs/webauthn/webauthn" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) var mock sqlmock.Sqlmock diff --git a/pkg/task/compress.go b/pkg/task/compress.go index 22934c20..b1349221 100644 --- a/pkg/task/compress.go +++ b/pkg/task/compress.go @@ -3,10 +3,11 @@ package task import ( "context" "encoding/json" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/util" "os" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // CompressTask 文件压缩任务 diff --git a/pkg/task/compress_test.go b/pkg/task/compress_test.go index 4c71bc40..681b9fb5 100644 --- a/pkg/task/compress_test.go +++ b/pkg/task/compress_test.go @@ -2,13 +2,14 @@ package task import ( "errors" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestCompressTask_Props(t *testing.T) { diff --git a/pkg/task/decompress.go b/pkg/task/decompress.go index ab98fde7..5a758710 100644 --- a/pkg/task/decompress.go +++ b/pkg/task/decompress.go @@ -3,8 +3,9 @@ package task import ( "context" "encoding/json" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" ) // DecompressTask 文件压缩任务 diff --git a/pkg/task/decompress_test.go b/pkg/task/decompress_test.go index e5f37133..33887fc3 100644 --- a/pkg/task/decompress_test.go +++ b/pkg/task/decompress_test.go @@ -2,11 +2,12 @@ package task import ( "errors" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestDecompressTask_Props(t *testing.T) { diff --git a/pkg/task/import.go b/pkg/task/import.go index 21684d6a..45941b1e 100644 --- a/pkg/task/import.go +++ b/pkg/task/import.go @@ -3,12 +3,13 @@ package task import ( "context" "encoding/json" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/util" "path" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // ImportTask 导入务 diff --git a/pkg/task/import_test.go b/pkg/task/import_test.go index 21d1d3c2..ea22cb83 100644 --- a/pkg/task/import_test.go +++ b/pkg/task/import_test.go @@ -2,13 +2,14 @@ package task import ( "errors" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestImportTask_Props(t *testing.T) { diff --git a/pkg/task/job.go b/pkg/task/job.go index 8f965141..22adc791 100644 --- a/pkg/task/job.go +++ b/pkg/task/job.go @@ -1,8 +1,8 @@ package task import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // 任务类型 diff --git a/pkg/task/job_test.go b/pkg/task/job_test.go index e8e274ba..432bbb37 100644 --- a/pkg/task/job_test.go +++ b/pkg/task/job_test.go @@ -2,10 +2,11 @@ package task import ( "errors" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/stretchr/testify/assert" - "testing" ) func TestRecord(t *testing.T) { diff --git a/pkg/task/pool.go b/pkg/task/pool.go index 4982f90f..d44877d0 100644 --- a/pkg/task/pool.go +++ b/pkg/task/pool.go @@ -1,8 +1,8 @@ package task import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // TaskPoll 要使用的任务池 diff --git a/pkg/task/pool_test.go b/pkg/task/pool_test.go index 739527fc..0ed9641d 100644 --- a/pkg/task/pool_test.go +++ b/pkg/task/pool_test.go @@ -2,12 +2,13 @@ package task import ( "database/sql" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) var mock sqlmock.Sqlmock diff --git a/pkg/task/tranfer.go b/pkg/task/tranfer.go index 7f03df4a..80aa1241 100644 --- a/pkg/task/tranfer.go +++ b/pkg/task/tranfer.go @@ -3,12 +3,13 @@ package task import ( "context" "encoding/json" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/util" "os" "path" "path/filepath" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) // TransferTask 文件中转任务 diff --git a/pkg/task/transfer_test.go b/pkg/task/transfer_test.go index c31c5ea6..a29043ae 100644 --- a/pkg/task/transfer_test.go +++ b/pkg/task/transfer_test.go @@ -2,11 +2,12 @@ package task import ( "errors" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "testing" ) func TestTransferTask_Props(t *testing.T) { diff --git a/pkg/task/worker.go b/pkg/task/worker.go index 980d339d..07ef36bf 100644 --- a/pkg/task/worker.go +++ b/pkg/task/worker.go @@ -1,6 +1,6 @@ package task -import "github.com/HFO4/cloudreve/pkg/util" +import "github.com/cloudreve/Cloudreve/v3/pkg/util" // Worker 处理任务的对象 type Worker interface { diff --git a/pkg/task/worker_test.go b/pkg/task/worker_test.go index 1f132a59..64c6551c 100644 --- a/pkg/task/worker_test.go +++ b/pkg/task/worker_test.go @@ -1,9 +1,10 @@ package task import ( - model "github.com/HFO4/cloudreve/models" - "github.com/stretchr/testify/assert" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/stretchr/testify/assert" ) type MockJob struct { diff --git a/pkg/thumb/image.go b/pkg/thumb/image.go index 4e25f891..3b96ccca 100644 --- a/pkg/thumb/image.go +++ b/pkg/thumb/image.go @@ -3,8 +3,6 @@ package thumb import ( "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/util" "image" "image/gif" "image/jpeg" @@ -13,6 +11,9 @@ import ( "path/filepath" "strings" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/nfnt/resize" ) diff --git a/pkg/thumb/image_test.go b/pkg/thumb/image_test.go index 201f15d1..7fe65a18 100644 --- a/pkg/thumb/image_test.go +++ b/pkg/thumb/image_test.go @@ -2,13 +2,14 @@ package thumb import ( "fmt" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/stretchr/testify/assert" "image" "image/jpeg" "os" "testing" + + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/stretchr/testify/assert" ) func CreateTestImage() *os.File { diff --git a/pkg/webdav/file.go b/pkg/webdav/file.go index 983696e2..28587761 100644 --- a/pkg/webdav/file.go +++ b/pkg/webdav/file.go @@ -6,11 +6,12 @@ package webdav import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" "net/http" "path" "path/filepath" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" ) // slashClean is equivalent to but slightly more efficient than diff --git a/pkg/webdav/prop.go b/pkg/webdav/prop.go index 636745f5..80464e3a 100644 --- a/pkg/webdav/prop.go +++ b/pkg/webdav/prop.go @@ -10,10 +10,11 @@ import ( "encoding/xml" "errors" "fmt" - "github.com/HFO4/cloudreve/pkg/filesystem" "net/http" "strconv" "time" + + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" ) type FileInfo interface { diff --git a/pkg/webdav/webdav.go b/pkg/webdav/webdav.go index c8593495..a4f9f205 100644 --- a/pkg/webdav/webdav.go +++ b/pkg/webdav/webdav.go @@ -9,17 +9,18 @@ import ( "context" "errors" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/util" "net/http" "net/url" "path" "strconv" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/util" ) type Handler struct { diff --git a/pkg/webdav/xml.go b/pkg/webdav/xml.go index 5d93fb34..34b4f668 100644 --- a/pkg/webdav/xml.go +++ b/pkg/webdav/xml.go @@ -32,7 +32,7 @@ import ( // In the long term, this package should use the standard library's version // only, and the internal fork deleted, once // https://github.com/golang/go/issues/13400 is resolved. - ixml "github.com/HFO4/cloudreve/pkg/webdav/internal/xml" + ixml "github.com/cloudreve/Cloudreve/v3/pkg/webdav/internal/xml" ) // http://www.webdav.org/specs/rfc4918.html#ELEMENT_lockinfo diff --git a/routers/controllers/admin.go b/routers/controllers/admin.go index 3e347db4..473cd30a 100644 --- a/routers/controllers/admin.go +++ b/routers/controllers/admin.go @@ -1,13 +1,14 @@ package controllers import ( - "github.com/HFO4/cloudreve/pkg/aria2" - "github.com/HFO4/cloudreve/pkg/email" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/service/admin" - "github.com/gin-gonic/gin" "io" + + "github.com/cloudreve/Cloudreve/v3/pkg/aria2" + "github.com/cloudreve/Cloudreve/v3/pkg/email" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/service/admin" + "github.com/gin-gonic/gin" ) // AdminSummary 获取管理站点概况 diff --git a/routers/controllers/aria2.go b/routers/controllers/aria2.go index 2c6aade9..7abe4443 100644 --- a/routers/controllers/aria2.go +++ b/routers/controllers/aria2.go @@ -2,9 +2,10 @@ package controllers import ( "context" - ariaCall "github.com/HFO4/cloudreve/pkg/aria2" - "github.com/HFO4/cloudreve/service/aria2" - "github.com/HFO4/cloudreve/service/explorer" + + ariaCall "github.com/cloudreve/Cloudreve/v3/pkg/aria2" + "github.com/cloudreve/Cloudreve/v3/service/aria2" + "github.com/cloudreve/Cloudreve/v3/service/explorer" "github.com/gin-gonic/gin" ) diff --git a/routers/controllers/callback.go b/routers/controllers/callback.go index 69f93bbd..56dd1e0a 100644 --- a/routers/controllers/callback.go +++ b/routers/controllers/callback.go @@ -4,9 +4,9 @@ import ( "net/url" "strconv" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/service/callback" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/service/callback" "github.com/gin-gonic/gin" ) diff --git a/routers/controllers/directory.go b/routers/controllers/directory.go index 74f84f10..a2e06851 100644 --- a/routers/controllers/directory.go +++ b/routers/controllers/directory.go @@ -1,7 +1,7 @@ package controllers import ( - "github.com/HFO4/cloudreve/service/explorer" + "github.com/cloudreve/Cloudreve/v3/service/explorer" "github.com/gin-gonic/gin" ) diff --git a/routers/controllers/file.go b/routers/controllers/file.go index 92fdf4bf..5fb7edb5 100644 --- a/routers/controllers/file.go +++ b/routers/controllers/file.go @@ -4,17 +4,18 @@ import "C" import ( "context" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/service/explorer" - "github.com/gin-gonic/gin" "net/http" "net/url" "strconv" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/service/explorer" + "github.com/gin-gonic/gin" ) func DownloadArchive(c *gin.Context) { diff --git a/routers/controllers/main.go b/routers/controllers/main.go index c1041844..18647700 100644 --- a/routers/controllers/main.go +++ b/routers/controllers/main.go @@ -2,8 +2,9 @@ package controllers import ( "encoding/json" - "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" "gopkg.in/go-playground/validator.v9" ) diff --git a/routers/controllers/objects.go b/routers/controllers/objects.go index 267d1e03..8f65d73d 100644 --- a/routers/controllers/objects.go +++ b/routers/controllers/objects.go @@ -2,7 +2,8 @@ package controllers import ( "context" - "github.com/HFO4/cloudreve/service/explorer" + + "github.com/cloudreve/Cloudreve/v3/service/explorer" "github.com/gin-gonic/gin" ) diff --git a/routers/controllers/share.go b/routers/controllers/share.go index bdc7d1e5..10e89807 100644 --- a/routers/controllers/share.go +++ b/routers/controllers/share.go @@ -2,13 +2,14 @@ package controllers import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/service/share" - "github.com/gin-gonic/gin" "path" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/service/share" + "github.com/gin-gonic/gin" ) // CreateShare 创建分享 diff --git a/routers/controllers/site.go b/routers/controllers/site.go index 8b592dd9..8de97073 100644 --- a/routers/controllers/site.go +++ b/routers/controllers/site.go @@ -1,10 +1,10 @@ package controllers import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" "github.com/mojocn/base64Captcha" ) diff --git a/routers/controllers/slave.go b/routers/controllers/slave.go index 29c115ac..4f7a98ab 100644 --- a/routers/controllers/slave.go +++ b/routers/controllers/slave.go @@ -2,15 +2,16 @@ package controllers import ( "context" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/service/admin" - "github.com/HFO4/cloudreve/service/explorer" - "github.com/gin-gonic/gin" "net/url" "strconv" + + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/service/admin" + "github.com/cloudreve/Cloudreve/v3/service/explorer" + "github.com/gin-gonic/gin" ) // SlaveUpload 从机文件上传 diff --git a/routers/controllers/tag.go b/routers/controllers/tag.go index 5f67f3f0..341841bd 100644 --- a/routers/controllers/tag.go +++ b/routers/controllers/tag.go @@ -1,7 +1,7 @@ package controllers import ( - "github.com/HFO4/cloudreve/service/explorer" + "github.com/cloudreve/Cloudreve/v3/service/explorer" "github.com/gin-gonic/gin" ) diff --git a/routers/controllers/user.go b/routers/controllers/user.go index 818dff5e..bbbf9257 100644 --- a/routers/controllers/user.go +++ b/routers/controllers/user.go @@ -3,13 +3,14 @@ package controllers import ( "encoding/json" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/authn" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/thumb" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/service/user" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/authn" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/thumb" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/service/user" "github.com/duo-labs/webauthn/webauthn" "github.com/gin-gonic/gin" ) diff --git a/routers/controllers/webdav.go b/routers/controllers/webdav.go index 48e91c38..daf10e7e 100644 --- a/routers/controllers/webdav.go +++ b/routers/controllers/webdav.go @@ -1,11 +1,11 @@ package controllers import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/pkg/webdav" - "github.com/HFO4/cloudreve/service/setting" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/webdav" + "github.com/cloudreve/Cloudreve/v3/service/setting" "github.com/gin-gonic/gin" ) diff --git a/routers/file_router_test.go b/routers/file_router_test.go index 8d9f76fc..50104b7a 100644 --- a/routers/file_router_test.go +++ b/routers/file_router_test.go @@ -3,15 +3,16 @@ package routers import ( "bytes" "encoding/json" - "github.com/HFO4/cloudreve/middleware" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/service/explorer" - "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "strings" "testing" + + "github.com/cloudreve/Cloudreve/v3/middleware" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/service/explorer" + "github.com/stretchr/testify/assert" ) func TestListDirectoryRoute(t *testing.T) { diff --git a/routers/main_test.go b/routers/main_test.go index 61822420..83664bdb 100644 --- a/routers/main_test.go +++ b/routers/main_test.go @@ -2,11 +2,12 @@ package routers import ( "database/sql" + "testing" + "github.com/DATA-DOG/go-sqlmock" - model "github.com/HFO4/cloudreve/models" + model "github.com/cloudreve/Cloudreve/v3/models" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" - "testing" ) var mock sqlmock.Sqlmock diff --git a/routers/router.go b/routers/router.go index 71a3d57b..73243f5f 100644 --- a/routers/router.go +++ b/routers/router.go @@ -1,12 +1,12 @@ package routers import ( - "github.com/HFO4/cloudreve/bootstrap" - "github.com/HFO4/cloudreve/middleware" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/routers/controllers" + "github.com/cloudreve/Cloudreve/v3/bootstrap" + "github.com/cloudreve/Cloudreve/v3/middleware" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/routers/controllers" "github.com/gin-contrib/cors" "github.com/gin-contrib/gzip" "github.com/gin-contrib/static" diff --git a/routers/router_test.go b/routers/router_test.go index 28b37467..4c65d4e4 100644 --- a/routers/router_test.go +++ b/routers/router_test.go @@ -1,12 +1,13 @@ package routers import ( - "github.com/HFO4/cloudreve/models" - "github.com/jinzhu/gorm" - "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "testing" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" ) func TestPing(t *testing.T) { diff --git a/service/admin/aria2.go b/service/admin/aria2.go index 358efacf..8801c962 100644 --- a/service/admin/aria2.go +++ b/service/admin/aria2.go @@ -1,9 +1,10 @@ package admin import ( - "github.com/HFO4/cloudreve/pkg/aria2" - "github.com/HFO4/cloudreve/pkg/serializer" "net/url" + + "github.com/cloudreve/Cloudreve/v3/pkg/aria2" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // Aria2TestService aria2连接测试服务 diff --git a/service/admin/file.go b/service/admin/file.go index a08a3fab..bf9bd187 100644 --- a/service/admin/file.go +++ b/service/admin/file.go @@ -2,13 +2,14 @@ package admin import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/service/explorer" - "github.com/gin-gonic/gin" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/service/explorer" + "github.com/gin-gonic/gin" ) // FileService 文件ID服务 diff --git a/service/admin/group.go b/service/admin/group.go index 0968b3a7..c7616119 100644 --- a/service/admin/group.go +++ b/service/admin/group.go @@ -2,8 +2,9 @@ package admin import ( "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // AddGroupService 用户组添加服务 diff --git a/service/admin/list.go b/service/admin/list.go index b8a0141b..bd84e357 100644 --- a/service/admin/list.go +++ b/service/admin/list.go @@ -1,8 +1,8 @@ package admin import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // AdminListService 仪表盘列条目服务 diff --git a/service/admin/policy.go b/service/admin/policy.go index c066d7f8..7cd55fd5 100644 --- a/service/admin/policy.go +++ b/service/admin/policy.go @@ -12,17 +12,17 @@ import ( "strings" "time" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/cos" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/onedrive" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/oss" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/s3" - "github.com/HFO4/cloudreve/pkg/request" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/cos" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/onedrive" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/oss" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/s3" + "github.com/cloudreve/Cloudreve/v3/pkg/request" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" cossdk "github.com/tencentyun/cos-go-sdk-v5" ) diff --git a/service/admin/share.go b/service/admin/share.go index 12d3d4f1..5846bb26 100644 --- a/service/admin/share.go +++ b/service/admin/share.go @@ -1,11 +1,12 @@ package admin import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/gin-gonic/gin" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/gin-gonic/gin" ) // ShareBatchService 分享批量操作服务 diff --git a/service/admin/site.go b/service/admin/site.go index c6119873..fd1177a7 100644 --- a/service/admin/site.go +++ b/service/admin/site.go @@ -1,12 +1,13 @@ package admin import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/conf" - "github.com/HFO4/cloudreve/pkg/email" - "github.com/HFO4/cloudreve/pkg/serializer" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/conf" + "github.com/cloudreve/Cloudreve/v3/pkg/email" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // NoParamService 无需参数的服务 diff --git a/service/admin/task.go b/service/admin/task.go index a6a9b34d..6b0f861b 100644 --- a/service/admin/task.go +++ b/service/admin/task.go @@ -1,11 +1,12 @@ package admin import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/task" - "github.com/gin-gonic/gin" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/task" + "github.com/gin-gonic/gin" ) // TaskBatchService 任务批量操作服务 diff --git a/service/admin/user.go b/service/admin/user.go index 124ba797..f4a58a97 100644 --- a/service/admin/user.go +++ b/service/admin/user.go @@ -2,10 +2,11 @@ package admin import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/serializer" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" ) // AddUserService 用户添加服务 diff --git a/service/aria2/add.go b/service/aria2/add.go index 8f552a29..be7213ac 100644 --- a/service/aria2/add.go +++ b/service/aria2/add.go @@ -1,10 +1,10 @@ package aria2 import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/serializer" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" ) diff --git a/service/aria2/manage.go b/service/aria2/manage.go index 4d3ab7d3..1da3e058 100644 --- a/service/aria2/manage.go +++ b/service/aria2/manage.go @@ -1,9 +1,9 @@ package aria2 import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/aria2" - "github.com/HFO4/cloudreve/pkg/serializer" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/aria2" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" ) diff --git a/service/callback/oauth.go b/service/callback/oauth.go index 9f124c7c..1515f99d 100644 --- a/service/callback/oauth.go +++ b/service/callback/oauth.go @@ -2,11 +2,12 @@ package callback import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/onedrive" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/onedrive" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" ) diff --git a/service/callback/upload.go b/service/callback/upload.go index e9894d55..5ccf79a6 100644 --- a/service/callback/upload.go +++ b/service/callback/upload.go @@ -5,14 +5,14 @@ import ( "fmt" "strings" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/cos" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/onedrive" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/s3" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/cos" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/onedrive" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/s3" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" ) diff --git a/service/explorer/directory.go b/service/explorer/directory.go index fffc5851..0291ba59 100644 --- a/service/explorer/directory.go +++ b/service/explorer/directory.go @@ -2,9 +2,10 @@ package explorer import ( "context" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" + + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" ) diff --git a/service/explorer/file.go b/service/explorer/file.go index 164fbfea..1015b98c 100644 --- a/service/explorer/file.go +++ b/service/explorer/file.go @@ -5,14 +5,6 @@ import ( "encoding/base64" "encoding/json" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/driver/local" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/gin-gonic/gin" - "github.com/jinzhu/gorm" "io/ioutil" "net/http" "net/url" @@ -20,6 +12,15 @@ import ( "strconv" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/driver/local" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/gin-gonic/gin" + "github.com/jinzhu/gorm" ) // SingleFileService 对单文件进行操作的五福,path为文件完整路径 diff --git a/service/explorer/objects.go b/service/explorer/objects.go index 62751368..e090a2c2 100644 --- a/service/explorer/objects.go +++ b/service/explorer/objects.go @@ -3,21 +3,22 @@ package explorer import ( "context" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/task" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" "math" "net/url" "path" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/task" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" ) // ItemMoveService 处理多文件/目录移动 diff --git a/service/explorer/search.go b/service/explorer/search.go index 4cb62fd2..5e661f9b 100644 --- a/service/explorer/search.go +++ b/service/explorer/search.go @@ -2,12 +2,13 @@ package explorer import ( "context" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/gin-gonic/gin" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/gin-gonic/gin" ) // ItemSearchService 文件搜索服务 diff --git a/service/explorer/tag.go b/service/explorer/tag.go index 4accb08f..ffada1c9 100644 --- a/service/explorer/tag.go +++ b/service/explorer/tag.go @@ -2,11 +2,12 @@ package explorer import ( "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/gin-gonic/gin" "strings" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/gin-gonic/gin" ) // FilterTagCreateService 文件分类标签创建服务 diff --git a/service/explorer/upload.go b/service/explorer/upload.go index 8b219efa..44954611 100644 --- a/service/explorer/upload.go +++ b/service/explorer/upload.go @@ -2,9 +2,10 @@ package explorer import ( "context" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/serializer" + + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" "github.com/gin-gonic/gin" ) diff --git a/service/setting/webdav.go b/service/setting/webdav.go index 7e1931c2..f2d7e8f5 100644 --- a/service/setting/webdav.go +++ b/service/setting/webdav.go @@ -1,9 +1,9 @@ package setting import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" "github.com/gin-gonic/gin" ) diff --git a/service/share/manage.go b/service/share/manage.go index a9c1d47f..6f4c739a 100644 --- a/service/share/manage.go +++ b/service/share/manage.go @@ -1,12 +1,13 @@ package share import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/gin-gonic/gin" "net/url" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/gin-gonic/gin" ) // ShareCreateService 创建新分享服务 diff --git a/service/share/visit.go b/service/share/visit.go index 03c64a3d..0eb0c8ed 100644 --- a/service/share/visit.go +++ b/service/share/visit.go @@ -3,16 +3,17 @@ package share import ( "context" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/filesystem" - "github.com/HFO4/cloudreve/pkg/filesystem/fsctx" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/HFO4/cloudreve/service/explorer" - "github.com/gin-gonic/gin" "net/http" "path" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem" + "github.com/cloudreve/Cloudreve/v3/pkg/filesystem/fsctx" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/cloudreve/Cloudreve/v3/service/explorer" + "github.com/gin-gonic/gin" ) // ShareUserGetService 获取用户的分享服务 diff --git a/service/user/login.go b/service/user/login.go index f9ebd980..6c2262e5 100644 --- a/service/user/login.go +++ b/service/user/login.go @@ -2,19 +2,20 @@ package user import ( "fmt" - "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/cache" - "github.com/HFO4/cloudreve/pkg/email" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/recaptcha" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/mojocn/base64Captcha" - "github.com/pquerna/otp/totp" "net/url" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/cache" + "github.com/cloudreve/Cloudreve/v3/pkg/email" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/recaptcha" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/mojocn/base64Captcha" + "github.com/pquerna/otp/totp" ) // UserLoginService 管理用户登录的服务 diff --git a/service/user/register.go b/service/user/register.go index a69ac7ac..c968ba63 100644 --- a/service/user/register.go +++ b/service/user/register.go @@ -1,18 +1,19 @@ package user import ( - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/auth" - "github.com/HFO4/cloudreve/pkg/email" - "github.com/HFO4/cloudreve/pkg/hashid" - "github.com/HFO4/cloudreve/pkg/recaptcha" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/mojocn/base64Captcha" "net/url" "strings" "time" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/auth" + "github.com/cloudreve/Cloudreve/v3/pkg/email" + "github.com/cloudreve/Cloudreve/v3/pkg/hashid" + "github.com/cloudreve/Cloudreve/v3/pkg/recaptcha" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/mojocn/base64Captcha" ) // UserRegisterService 管理用户注册的服务 diff --git a/service/user/setting.go b/service/user/setting.go index 4e1a02aa..75613206 100644 --- a/service/user/setting.go +++ b/service/user/setting.go @@ -3,15 +3,16 @@ package user import ( "crypto/md5" "fmt" - model "github.com/HFO4/cloudreve/models" - "github.com/HFO4/cloudreve/pkg/serializer" - "github.com/HFO4/cloudreve/pkg/util" - "github.com/gin-gonic/gin" - "github.com/pquerna/otp/totp" "net/http" "net/url" "os" "path/filepath" + + model "github.com/cloudreve/Cloudreve/v3/models" + "github.com/cloudreve/Cloudreve/v3/pkg/serializer" + "github.com/cloudreve/Cloudreve/v3/pkg/util" + "github.com/gin-gonic/gin" + "github.com/pquerna/otp/totp" ) // SettingService 通用设置服务