diff --git a/Dockerfile b/Dockerfile index 6c8d015..b9aa08b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,10 @@ FROM golang:1.15.1-alpine3.12 AS be-builder ENV GO111MODULE on -COPY . /go/src/github.com/HFO4/cloudreve -COPY --from=fe-builder /assets/build/ /go/src/github.com/HFO4/cloudreve/assets/build/ +COPY . /go/src/github.com/cloudreve/Cloudreve/v3 +COPY --from=fe-builder /assets/build/ /go/src/github.com/cloudreve/Cloudreve/v3/assets/build/ -WORKDIR /go/src/github.com/HFO4/cloudreve +WORKDIR /go/src/github.com/cloudreve/Cloudreve/v3 RUN set -ex \ && apk upgrade \ @@ -27,8 +27,8 @@ RUN set -ex \ && export VERSION=$(git describe --tags) \ && (cd && go get github.com/rakyll/statik) \ && statik -src=assets/build/ -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico -f \ - && go install -ldflags "-X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=${VERSION}' \ - -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=${COMMIT_SHA}'\ + && go install -ldflags "-X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=${VERSION}' \ + -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=${COMMIT_SHA}'\ -w -s" # build final image diff --git a/README.md b/README.md index e897210..4420f66 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ export COMMIT_SHA=$(git rev-parse --short HEAD) export VERSION=$(git describe --tags) # 开始编译 -go build -a -o cloudreve -ldflags " -X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=$VERSION' -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=$COMMIT_SHA'" +go build -a -o cloudreve -ldflags " -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'" ``` 你也可以使用项目根目录下的`build.sh`快速开始构建: diff --git a/bootstrap/app.go b/bootstrap/app.go index ccb4fdc..093e3f4 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 91309a8..98f2c8d 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 d3f8967..7b8a987 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/build.sh b/build.sh index ea7e101..dd18f3a 100755 --- a/build.sh +++ b/build.sh @@ -39,7 +39,7 @@ buildAssets () { buildBinary () { cd $REPO - go build -a -o cloudreve -ldflags " -X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=$VERSION' -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=$COMMIT_SHA'" + go build -a -o cloudreve -ldflags " -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'" } _build() { @@ -61,7 +61,7 @@ _build() { out="release/cloudreve_${COMMIT_SHA}_${os}_${arch}" fi - go build -a -o "${out}" -ldflags " -X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=$VERSION' -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=$COMMIT_SHA'" + go build -a -o "${out}" -ldflags " -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'" if [ "$os" = "windows" ]; then mv $out release/cloudreve.exe @@ -130,4 +130,4 @@ fi if [ "$RELEASE" = "true" ]; then release -fi \ No newline at end of file +fi diff --git a/go.mod b/go.mod index 2b38ee4..e7233f5 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 @@ -16,7 +16,6 @@ require ( github.com/gin-gonic/gin v1.5.0 github.com/go-ini/ini v1.50.0 github.com/go-mail/mail v2.3.1+incompatible - github.com/gofrs/uuid v3.2.0+incompatible github.com/gomodule/redigo v2.0.0+incompatible github.com/google/go-querystring v1.0.0 github.com/gorilla/websocket v1.4.1 @@ -28,12 +27,10 @@ require ( github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/pkg/errors v0.9.1 github.com/pquerna/otp v1.2.0 - github.com/qingwg/payjs v0.0.0-20190928033402-c53dbe16b371 github.com/qiniu/api.v7/v7 v7.4.0 github.com/rafaeljusto/redigomock v0.0.0-20191117212112-00b2509252a1 github.com/rakyll/statik v0.1.7 github.com/robfig/cron/v3 v3.0.1 - github.com/smartwalle/alipay/v3 v3.0.13 github.com/smartystreets/goconvey v1.6.4 // indirect github.com/speps/go-hashids v2.0.0+incompatible github.com/stretchr/testify v1.5.1 diff --git a/go.sum b/go.sum index bb6ef14..280b0f8 100644 --- a/go.sum +++ b/go.sum @@ -54,13 +54,11 @@ github.com/gin-contrib/gzip v0.0.2-0.20200226035851-25bef2ef21e8 h1:/DnKeA2+K83h github.com/gin-contrib/gzip v0.0.2-0.20200226035851-25bef2ef21e8/go.mod h1:M+xPw/lXk+uAU4iYVnwPZs0iIpR/KwSQSXcJabN+gPs= github.com/gin-contrib/sessions v0.0.1 h1:xr9V/u3ERQnkugKSY/u36cNnC4US4bHJpdxcB6eIZLk= github.com/gin-contrib/sessions v0.0.1/go.mod h1:iziXm/6pvTtf7og1uxT499sel4h3S9DfwsrhNZ+REXM= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 h1:t8FVkw33L+wilf2QiWkw0UV77qRpcH/JHPKGpKa2E8g= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-contrib/static v0.0.0-20191128031702-f81c604d8ac2 h1:xLG16iua01X7Gzms9045s2Y2niNpvSY/Zb1oBwgNYZY= github.com/gin-contrib/static v0.0.0-20191128031702-f81c604d8ac2/go.mod h1:VhW/Ch/3FhimwZb8Oj+qJmdMmoB8r7lmJ5auRjm50oQ= -github.com/gin-gonic/gin v1.4.0 h1:3tMoCCfM7ppqsR0ptz/wi1impNpT7/9wQtMZ8lr1mCQ= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.5.0 h1:fi+bqFAx/oLK54somfCtEZs9HeH1LHVoEPUgARpTqyc= github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= @@ -75,13 +73,10 @@ github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotf github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rmGrCjJ8eAeUP/K/EKx4DM= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= -github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= @@ -90,7 +85,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -162,7 +156,6 @@ github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= @@ -190,7 +183,6 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -205,8 +197,6 @@ github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1: github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/qingwg/payjs v0.0.0-20190928033402-c53dbe16b371 h1:8VWtyY2IwjEQZSNT4Kyyct9zv9hoegD5GQhFr+TMdCI= -github.com/qingwg/payjs v0.0.0-20190928033402-c53dbe16b371/go.mod h1:9UFrQveqNm3ELF6HSvMtDR3KYpJ7Ib9s0WVmYhaUBlU= github.com/qiniu/api.v7/v7 v7.4.0 h1:9dZMVQifh31QGFLVaHls6akCaS2rlj3du8MnEFd7XjQ= github.com/qiniu/api.v7/v7 v7.4.0/go.mod h1:VE5oC5rkE1xul0u1S2N0b2Uxq9/6hZzhyqjgK25XDcM= github.com/quasoft/memstore v0.0.0-20180925164028-84a050167438 h1:jnz/4VenymvySjE+Ez511s0pqVzkUOmr1fwCVytNNWk= @@ -221,10 +211,6 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartwalle/alipay/v3 v3.0.13 h1:f1Cdnxh6TfbaziLw0i/4h+f8tw9RJwG8y4xye7vTTgY= -github.com/smartwalle/alipay/v3 v3.0.13/go.mod h1:cZUMCCnsux9YAxA0/f3PWUR+7wckWtE1BqxbVRtGij0= -github.com/smartwalle/crypto4go v1.0.2 h1:9DUEOOsPhmp00438L4oBdcL8EZG1zumecft5bWj5phI= -github.com/smartwalle/crypto4go v1.0.2/go.mod h1:LQ7vCZIb7BE5+MuMtJBuO8ORkkQ01m4DXDBWPzLbkMY= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= @@ -237,7 +223,6 @@ github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -256,7 +241,6 @@ go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -276,8 +260,8 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -295,7 +279,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e h1:D5TXcfTk7xF7hvieo4QErS3qqCB4teTffacDWr7CI+0= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -314,7 +297,6 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -330,7 +312,6 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/go-playground/validator.v9 v9.29.1 h1:SvGtYmN60a5CVKTOzMSyfzWDeZRxRuGvRQyEAKbw1xc= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= diff --git a/main.go b/main.go index 558a66a..d1b4e53 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 cd2fe43..ca68f0e 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 e2531e3..95ab75c 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 482b080..d026e77 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 cc715b1..1ebee20 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 3aaf619..6704bcf 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 1a75f61..512c2e8 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 f89609d..9c3b679 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 674f4bd..ac9403c 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 a67a67b..99e5647 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 6b75c30..129076b 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 da47b95..e73ae5f 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 54de0f5..bc2f011 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 1366f71..70c5509 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 1996c6d..0ccd821 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 80a6b3d..02af046 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 85969e4..4683d81 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 5c1cf8c..55faefe 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 61fd171..7c0dee4 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 5519ff6..6168148 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 d14cf72..f8157cf 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 e6c716c..d9bf962 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 535a04a..137e745 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 0f0c185..52e2ee6 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 92c9a9e..5c5250f 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 01ec5e5..e880f85 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 b6ae0fb..c4226f0 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 d9b2be5..ba329bf 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 3a241df..ea346a2 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 6c2ad58..40ce36a 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 7992556..51605a1 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 5ed2e59..6e287a2 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 ca065b8..f215689 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 eeb9226..bd27f74 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 c04e89a..9172894 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 9eb3c52..e2ead91 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 5b00019..21a7ac1 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 a0f89b7..86d02c6 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 44fba71..1092cb5 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 90f55c7..706f617 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 ee719e1..5c5b4b7 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 036aa53..3df60cf 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 07d7152..35f6922 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 3b5c366..8b7522b 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 de0c45b..c2b9bb7 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 43f2481..c135a50 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 35aeb17..aa95a7e 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 512f8b5..be6798b 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 78f1756..1b8a322 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 65abd75..64771a9 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 26946ac..9b77cd9 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 7b25ce3..cb9cb3a 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 f867de4..1359e28 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 64c6f5d..7a697ce 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 6e76a94..008c863 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 2874f5a..9ddb29c 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 360e9c2..633150a 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 e0c3ddb..2256db7 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 51d69a1..b791bbf 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 e80c618..62888e8 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 ccf1512..2767fe2 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 c298a82..aa3c132 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 e91ba2f..8afe66a 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 ccb5414..a4a5be1 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 28dbd9c..607accd 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 33857d8..62243dc 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 dbfc4bc..7ca1e23 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 20c8a2c..1d29341 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 626ba9a..c68e25c 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 5bd83c2..e571d55 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 355e466..4b24cc5 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 4b584ec..c80e24d 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 bf2790b..7ec91dc 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 4cf44e2..4a4a079 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 165ed93..d6caefd 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 9b4fc19..30fafa5 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 56f3d35..a7b8c90 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 deaf98a..efe5101 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 efb4c9b..d80cd37 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 030f6cf..b6c80e3 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 140024f..6ec56db 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 1c39ee4..9c6692f 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 9a00265..59fe56b 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 16c1b77..a2e7e08 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 eb642fd..0c4d026 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 9a5a636..ba99571 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 2d795ce..4156f34 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 a57a57e..b0637aa 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 57d8e6d..e4065a4 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 7ca9b0f..2ff8997 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 8010664..2c0d827 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 4288760..1639675 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 6e2c078..8a39ae2 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 ce89b48..942c953 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 80c17e2..36195c8 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 0dd8d37..1dac105 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 1d52c73..0bd1ca3 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 d97f79e..a7f9fcf 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 0f0ffa0..61afafa 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 3f0ad7d..48e7383 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 1b55afa..c5b310b 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 a286e65..04fb8f6 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 2bc7979..9f67704 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 f501e14..72feb0c 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 688ba23..a4f3ed0 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 603175c..cb70fcc 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 22934c2..b134922 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 4c71bc4..681b9fb 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 ab98fde..5a75871 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 e5f3713..33887fc 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 21684d6..45941b1 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 21d1d3c..ea22cb8 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 8f96514..22adc79 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 e8e274b..432bbb3 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 4982f90..d44877d 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 739527f..0ed9641 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 7f03df4..80aa124 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 c31c5ea..a29043a 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 980d339..07ef36b 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 1f132a5..64c6551 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 4e25f89..3b96ccc 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 201f15d..7fe65a1 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 983696e..2858776 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 636745f..80464e3 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 c859349..a4f9f20 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 5d93fb3..34b4f66 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 3e347db..473cd30 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 2c6aade..7abe444 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 69f93bb..56dd1e0 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 74f84f1..a2e0685 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 92fdf4b..5fb7edb 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 c104184..1864770 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 267d1e0..8f65d73 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 bdc7d1e..10e8980 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 8b592dd..8de9707 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 29c115a..4f7a98a 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 5f67f3f..341841b 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 818dff5..bbbf925 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 48e91c3..daf10e7 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 8d9f76f..50104b7 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 6182242..83664bd 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 71a3d57..73243f5 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 28b3746..4c65d4e 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 358efac..8801c96 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 a08a3fa..bf9bd18 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 0968b3a..c761611 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 b8a0141..bd84e35 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 c066d7f..7cd55fd 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 12d3d4f..5846bb2 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 c611987..fd1177a 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 a6a9b34..6b0f861 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 124ba79..f4a58a9 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 8f552a2..be7213a 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 4d3ab7d..1da3e05 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 9f124c7..1515f99 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 e9894d5..5ccf79a 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 fffc585..0291ba5 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 164fbfe..1015b98 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 6275136..e090a2c 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 4cb62fd..5e661f9 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 4accb08..ffada1c 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 8b219ef..4495461 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 7e1931c..f2d7e8f 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 a9c1d47..6f4c739 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 03c64a3..0eb0c8e 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 f9ebd98..6c2262e 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 a69ac7a..c968ba6 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 4e1a02a..7561320 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 通用设置服务