From 5fd41050e32332e788407e0ce52c5a29f8114578 Mon Sep 17 00:00:00 2001 From: Bhunter <180028024+bhunter234@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:50:17 +0000 Subject: [PATCH] chore: rename packages to org name --- .github/workflows/release.yml | 9 ++++++-- .goreleaser.yml | 18 +++++++-------- Makefile | 2 +- README.md | 10 ++++----- api/router.go | 10 ++++----- cmd/run.go | 26 ++++++++++----------- cmd/version.go | 2 +- docker/compose/teldrive.yml | 2 +- go.mod | 2 +- internal/auth/auth.go | 6 ++--- internal/cache/cache.go | 2 +- internal/cache/cache_test.go | 2 +- internal/database/database.go | 4 ++-- internal/database/logger.go | 2 +- internal/kv/bolt.go | 4 ++-- internal/middleware/middleware.go | 4 ++-- internal/pool/pool.go | 2 +- internal/reader/decrypted_reader.go | 12 +++++----- internal/reader/reader.go | 10 ++++----- internal/reader/tg_multi_reader.go | 6 ++--- internal/reader/tg_multi_reader_test.go | 2 +- internal/tgc/helpers.go | 6 ++--- internal/tgc/run.go | 2 +- internal/tgc/tgc.go | 12 +++++----- internal/tgc/workers.go | 4 ++-- main.go | 2 +- pkg/controller/auth.go | 4 ++-- pkg/controller/controller.go | 2 +- pkg/controller/file.go | 6 ++--- pkg/controller/upload.go | 4 ++-- pkg/controller/user.go | 2 +- pkg/cron/cron.go | 10 ++++----- pkg/httputil/error.go | 2 +- pkg/mapper/mapper.go | 4 ++-- pkg/models/file.go | 2 +- pkg/services/auth.go | 14 ++++++------ pkg/services/common.go | 12 +++++----- pkg/services/file.go | 30 ++++++++++++------------- pkg/services/file_test.go | 6 ++--- pkg/services/upload.go | 24 ++++++++++---------- pkg/services/upload_test.go | 4 ++-- pkg/services/user.go | 16 ++++++------- 42 files changed, 155 insertions(+), 150 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da420fe..a5ca96b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,11 @@ on: tags: - "*" -permissions: write-all +permissions: + packages: write + contents: read + attestations: write + id-token: write jobs: goreleaser: @@ -34,7 +38,7 @@ jobs: - name: Build UI run: | - git clone https://github.com/divyam234/teldrive-ui + git clone https://github.com/tgdrive/teldrive-ui cd teldrive-ui pnpm install --frozen-lockfile export VITE_SERVER_VERSION=$GITHUB_REF_NAME @@ -42,6 +46,7 @@ jobs: cd .. mv teldrive-ui/dist ui/dist rm -rf teldrive-ui + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index fd8fd31..98a66a2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -36,15 +36,15 @@ archives: - LICENSE dockers: - image_templates: - - "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-amd64" + - "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-amd64" use: buildx dockerfile: goreleaser.dockerfile build_flag_templates: - "--platform=linux/amd64" - image_templates: - - "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-arm64" - - "ghcr.io/divyam234/{{ .ProjectName }}:latest" + - "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-arm64" + - "ghcr.io/tgdrive/{{ .ProjectName }}:latest" use: buildx dockerfile: goreleaser.dockerfile goarch: arm64 @@ -52,14 +52,14 @@ dockers: - --platform=linux/arm64/v8 docker_manifests: - - name_template: "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}" + - name_template: "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}" image_templates: - - "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-amd64" - - "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-arm64" - - name_template: "ghcr.io/divyam234/{{ .ProjectName }}:latest" + - "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-amd64" + - "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-arm64" + - name_template: "ghcr.io/tgdrive/{{ .ProjectName }}:latest" image_templates: - - "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-amd64" - - "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-arm64" + - "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-amd64" + - "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-arm64" changelog: sort: asc diff --git a/Makefile b/Makefile index 12c06cd..9e3cab5 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ endif APP_NAME := teldrive BUILD_DIR := bin FRONTEND_DIR := ui/dist -FRONTEND_ASSET := https://github.com/divyam234/teldrive-ui/releases/download/v1/teldrive-ui.zip +FRONTEND_ASSET := https://github.com/tgdrive/teldrive-ui/releases/download/v1/teldrive-ui.zip GIT_TAG := $(shell git describe --tags --abbrev=0) GIT_COMMIT := $(shell git rev-parse --short HEAD) GIT_LINK := $(shell git remote get-url origin) diff --git a/README.md b/README.md index 7844721..b2cfb6f 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Telegram Drive is a powerful utility that enables you to organise your telegram
-[UI Repo ](https://github.com/divyam234/teldrive-ui) +[UI Repo ](https://github.com/tgdrive/teldrive-ui) [UI Library ](https://github.com/divyam234/tw-material) @@ -47,19 +47,19 @@ Telegram Drive is a powerful utility that enables you to organise your telegram #### Linux ```bash -curl -sSL https://instl.vercel.app/divyam234/teldrive/linux | bash +curl -sSL https://instl.vercel.app/tgdrive/teldrive/linux | bash ``` #### Windows ```powershell -iwr https://instl.vercel.app/divyam234/teldrive/windows | iex +iwr https://instl.vercel.app/tgdrive/teldrive/windows | iex ``` #### macOS ```bash -curl -sSL https://instl.vercel.app/divyam234/teldrive/macos | bash +curl -sSL https://instl.vercel.app/tgdrive/teldrive/macos | bash ``` ### Deploy using docker-compose @@ -128,7 +128,7 @@ teldrive run --tg-app-id="" --tg-app-hash="" --jwt-secret="" --db-data-source="" - Default Channel can be selected through UI. Make sure to set it from account settings on first login. - Multi Bots Mode is recommended to avoid flood errors and enable maximum download speed, especially if you are using downloaders like IDM and aria2c, which use multiple connections for downloads. - To enable multi bots, generate new bot tokens from BotFather and add them through UI on first login. - - Uploads from UI will be slower due to limitations of the browser. Use modified [Rclone](https://github.com/divyam234/rclone) version for teldrive. + - Uploads from UI will be slower due to limitations of the browser. Use modified [Rclone](https://github.com/tgdrive/rclone) version for teldrive. - Files are deleted at regular interval of one hour through cron job from tg channel after its deleted from teldrive this is done so that person can recover files if he/she accidently deletes them. ### Advanced Configuration diff --git a/api/router.go b/api/router.go index 3179fe9..f808964 100644 --- a/api/router.go +++ b/api/router.go @@ -1,12 +1,12 @@ package api import ( - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/middleware" - "github.com/divyam234/teldrive/pkg/controller" - "github.com/divyam234/teldrive/ui" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/middleware" + "github.com/tgdrive/teldrive/pkg/controller" + "github.com/tgdrive/teldrive/ui" "gorm.io/gorm" ) diff --git a/cmd/run.go b/cmd/run.go index c54da37..16f5216 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -11,19 +11,6 @@ import ( "time" "unicode" - "github.com/divyam234/teldrive/api" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/database" - "github.com/divyam234/teldrive/internal/duration" - "github.com/divyam234/teldrive/internal/kv" - "github.com/divyam234/teldrive/internal/logging" - "github.com/divyam234/teldrive/internal/middleware" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/internal/utils" - "github.com/divyam234/teldrive/pkg/controller" - "github.com/divyam234/teldrive/pkg/cron" - "github.com/divyam234/teldrive/pkg/services" "github.com/gin-contrib/gzip" "github.com/gin-contrib/pprof" ginzap "github.com/gin-contrib/zap" @@ -33,6 +20,19 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" + "github.com/tgdrive/teldrive/api" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/database" + "github.com/tgdrive/teldrive/internal/duration" + "github.com/tgdrive/teldrive/internal/kv" + "github.com/tgdrive/teldrive/internal/logging" + "github.com/tgdrive/teldrive/internal/middleware" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/internal/utils" + "github.com/tgdrive/teldrive/pkg/controller" + "github.com/tgdrive/teldrive/pkg/cron" + "github.com/tgdrive/teldrive/pkg/services" "go.uber.org/fx" "go.uber.org/zap/zapcore" "gorm.io/gorm" diff --git a/cmd/version.go b/cmd/version.go index 6a20e4e..4333757 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -3,8 +3,8 @@ package cmd import ( "runtime" - "github.com/divyam234/teldrive/internal/config" "github.com/spf13/cobra" + "github.com/tgdrive/teldrive/internal/config" ) func NewVersion() *cobra.Command { diff --git a/docker/compose/teldrive.yml b/docker/compose/teldrive.yml index b37f54d..f2b7903 100644 --- a/docker/compose/teldrive.yml +++ b/docker/compose/teldrive.yml @@ -1,6 +1,6 @@ services: teldrive: - image: ghcr.io/divyam234/teldrive + image: ghcr.io/tgdrive/teldrive restart: always container_name: teldrive networks: diff --git a/go.mod b/go.mod index 8632e6a..056fc66 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/divyam234/teldrive +module github.com/tgdrive/teldrive go 1.22 diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 6d4f2c3..5e1c13e 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -5,11 +5,11 @@ import ( "strconv" "strings" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/types" "github.com/gin-gonic/gin" "github.com/golang-jwt/jwt/v5" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/types" "gorm.io/gorm" ) diff --git a/internal/cache/cache.go b/internal/cache/cache.go index 08643e9..2d85893 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -6,8 +6,8 @@ import ( "time" "github.com/coocood/freecache" - "github.com/divyam234/teldrive/internal/config" "github.com/redis/go-redis/v9" + "github.com/tgdrive/teldrive/internal/config" "github.com/vmihailenco/msgpack/v5" ) diff --git a/internal/cache/cache_test.go b/internal/cache/cache_test.go index 38dea2b..1dc8cce 100644 --- a/internal/cache/cache_test.go +++ b/internal/cache/cache_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/divyam234/teldrive/pkg/schemas" "github.com/stretchr/testify/assert" + "github.com/tgdrive/teldrive/pkg/schemas" ) func TestCache(t *testing.T) { diff --git a/internal/database/database.go b/internal/database/database.go index 13a2827..84b6644 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -3,8 +3,8 @@ package database import ( "time" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/logging" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/logging" extraClausePlugin "github.com/WinterYukky/gorm-extra-clause-plugin" "go.uber.org/zap/zapcore" diff --git a/internal/database/logger.go b/internal/database/logger.go index 015dded..456b8b1 100644 --- a/internal/database/logger.go +++ b/internal/database/logger.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/divyam234/teldrive/internal/logging" + "github.com/tgdrive/teldrive/internal/logging" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/internal/kv/bolt.go b/internal/kv/bolt.go index 0ee688d..e0ceab7 100644 --- a/internal/kv/bolt.go +++ b/internal/kv/bolt.go @@ -5,9 +5,9 @@ import ( "path/filepath" "time" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/utils" "github.com/mitchellh/go-homedir" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/utils" "go.etcd.io/bbolt" ) diff --git a/internal/middleware/middleware.go b/internal/middleware/middleware.go index 7552117..5aaea05 100644 --- a/internal/middleware/middleware.go +++ b/internal/middleware/middleware.go @@ -6,9 +6,9 @@ import ( "time" "github.com/divyam234/cors" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/internal/cache" "github.com/gin-contrib/secure" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/internal/cache" "gorm.io/gorm" "github.com/gin-gonic/gin" diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 5c3ed47..67e2aa8 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -5,9 +5,9 @@ import ( "context" "sync" - "github.com/divyam234/teldrive/internal/logging" "github.com/gotd/td/telegram" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/logging" "go.uber.org/zap" ) diff --git a/internal/reader/decrypted_reader.go b/internal/reader/decrypted_reader.go index bb70e46..702858b 100644 --- a/internal/reader/decrypted_reader.go +++ b/internal/reader/decrypted_reader.go @@ -5,13 +5,13 @@ import ( "fmt" "io" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/crypt" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/crypt" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/types" ) type DecrpytedReader struct { diff --git a/internal/reader/reader.go b/internal/reader/reader.go index c1a8fd7..d3bd9e0 100644 --- a/internal/reader/reader.go +++ b/internal/reader/reader.go @@ -5,12 +5,12 @@ import ( "fmt" "io" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/types" ) type Range struct { diff --git a/internal/reader/tg_multi_reader.go b/internal/reader/tg_multi_reader.go index 92140f4..364620f 100644 --- a/internal/reader/tg_multi_reader.go +++ b/internal/reader/tg_multi_reader.go @@ -7,10 +7,10 @@ import ( "io" "time" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/tgc" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/tgc" "golang.org/x/sync/errgroup" ) diff --git a/internal/reader/tg_multi_reader_test.go b/internal/reader/tg_multi_reader_test.go index e80c7e4..9d9b603 100644 --- a/internal/reader/tg_multi_reader_test.go +++ b/internal/reader/tg_multi_reader_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/divyam234/teldrive/internal/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" + "github.com/tgdrive/teldrive/internal/config" ) type testChunkSource struct { diff --git a/internal/tgc/helpers.go b/internal/tgc/helpers.go index 8bf7f9e..d8012f6 100644 --- a/internal/tgc/helpers.go +++ b/internal/tgc/helpers.go @@ -9,11 +9,11 @@ import ( "runtime" "sync" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/kv" - "github.com/divyam234/teldrive/pkg/types" "github.com/gotd/td/telegram" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/kv" + "github.com/tgdrive/teldrive/pkg/types" "golang.org/x/sync/errgroup" ) diff --git a/internal/tgc/run.go b/internal/tgc/run.go index 3b45d7a..9260929 100644 --- a/internal/tgc/run.go +++ b/internal/tgc/run.go @@ -3,9 +3,9 @@ package tgc import ( "context" - "github.com/divyam234/teldrive/internal/logging" "github.com/gotd/td/telegram" "github.com/pkg/errors" + "github.com/tgdrive/teldrive/internal/logging" "go.uber.org/zap" ) diff --git a/internal/tgc/tgc.go b/internal/tgc/tgc.go index 5676180..a097b44 100644 --- a/internal/tgc/tgc.go +++ b/internal/tgc/tgc.go @@ -5,18 +5,18 @@ import ( "time" "github.com/cenkalti/backoff/v4" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/kv" - "github.com/divyam234/teldrive/internal/logging" - "github.com/divyam234/teldrive/internal/recovery" - "github.com/divyam234/teldrive/internal/retry" - "github.com/divyam234/teldrive/internal/utils" "github.com/gotd/contrib/middleware/floodwait" "github.com/gotd/contrib/middleware/ratelimit" "github.com/gotd/td/session" "github.com/gotd/td/telegram" "github.com/gotd/td/telegram/dcs" "github.com/pkg/errors" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/kv" + "github.com/tgdrive/teldrive/internal/logging" + "github.com/tgdrive/teldrive/internal/recovery" + "github.com/tgdrive/teldrive/internal/retry" + "github.com/tgdrive/teldrive/internal/utils" "go.uber.org/zap" "golang.org/x/net/proxy" "golang.org/x/time/rate" diff --git a/internal/tgc/workers.go b/internal/tgc/workers.go index ea67aa9..0c3e54c 100644 --- a/internal/tgc/workers.go +++ b/internal/tgc/workers.go @@ -6,9 +6,9 @@ import ( "sync" "time" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/kv" "github.com/gotd/td/telegram" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/kv" "go.uber.org/zap" ) diff --git a/main.go b/main.go index 04d9823..e96f61f 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "os" "os/signal" - "github.com/divyam234/teldrive/cmd" + "github.com/tgdrive/teldrive/cmd" ) func main() { diff --git a/pkg/controller/auth.go b/pkg/controller/auth.go index 3c0e159..459ef02 100644 --- a/pkg/controller/auth.go +++ b/pkg/controller/auth.go @@ -3,9 +3,9 @@ package controller import ( "net/http" - "github.com/divyam234/teldrive/pkg/httputil" - "github.com/divyam234/teldrive/pkg/schemas" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/pkg/httputil" + "github.com/tgdrive/teldrive/pkg/schemas" ) func (ac *Controller) GetSession(c *gin.Context) { diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 3fe7f48..093fdf3 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/divyam234/teldrive/pkg/services" + "github.com/tgdrive/teldrive/pkg/services" ) type Controller struct { diff --git a/pkg/controller/file.go b/pkg/controller/file.go index aacdd71..9ec8328 100644 --- a/pkg/controller/file.go +++ b/pkg/controller/file.go @@ -3,10 +3,10 @@ package controller import ( "net/http" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/pkg/httputil" - "github.com/divyam234/teldrive/pkg/schemas" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/pkg/httputil" + "github.com/tgdrive/teldrive/pkg/schemas" ) func (fc *Controller) CreateFile(c *gin.Context) { diff --git a/pkg/controller/upload.go b/pkg/controller/upload.go index 403f65e..ef30d03 100644 --- a/pkg/controller/upload.go +++ b/pkg/controller/upload.go @@ -4,9 +4,9 @@ import ( "net/http" "strconv" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/pkg/httputil" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/pkg/httputil" ) func (uc *Controller) GetUploadFileById(c *gin.Context) { diff --git a/pkg/controller/user.go b/pkg/controller/user.go index 4fca6fa..bda088d 100644 --- a/pkg/controller/user.go +++ b/pkg/controller/user.go @@ -3,8 +3,8 @@ package controller import ( "net/http" - "github.com/divyam234/teldrive/pkg/httputil" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/pkg/httputil" ) func (uc *Controller) GetStats(c *gin.Context) { diff --git a/pkg/cron/cron.go b/pkg/cron/cron.go index 4352778..d5d52f9 100644 --- a/pkg/cron/cron.go +++ b/pkg/cron/cron.go @@ -4,13 +4,13 @@ import ( "context" "time" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/logging" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" "github.com/go-co-op/gocron" "github.com/jackc/pgx/v5/pgtype" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/logging" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" "go.uber.org/zap" "gorm.io/datatypes" "gorm.io/gorm" diff --git a/pkg/httputil/error.go b/pkg/httputil/error.go index 54c5a8b..a17c83e 100644 --- a/pkg/httputil/error.go +++ b/pkg/httputil/error.go @@ -1,8 +1,8 @@ package httputil import ( - "github.com/divyam234/teldrive/internal/logging" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/internal/logging" ) func NewError(ctx *gin.Context, status int, err error) { diff --git a/pkg/mapper/mapper.go b/pkg/mapper/mapper.go index 84227cb..6e34e05 100644 --- a/pkg/mapper/mapper.go +++ b/pkg/mapper/mapper.go @@ -1,8 +1,8 @@ package mapper import ( - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" ) func ToFileOut(file models.File) *schemas.FileOut { diff --git a/pkg/models/file.go b/pkg/models/file.go index f27366c..bb89933 100644 --- a/pkg/models/file.go +++ b/pkg/models/file.go @@ -4,7 +4,7 @@ import ( "database/sql" "time" - "github.com/divyam234/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/schemas" "gorm.io/datatypes" ) diff --git a/pkg/services/auth.go b/pkg/services/auth.go index c19db90..928353c 100644 --- a/pkg/services/auth.go +++ b/pkg/services/auth.go @@ -16,13 +16,6 @@ import ( "strconv" "time" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" "github.com/gin-gonic/gin" "github.com/golang-jwt/jwt/v5" "github.com/gorilla/websocket" @@ -31,6 +24,13 @@ import ( "github.com/gotd/td/telegram/auth/qrlogin" "github.com/gotd/td/tg" "github.com/gotd/td/tgerr" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/types" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/pkg/services/common.go b/pkg/services/common.go index c793e32..ce42452 100644 --- a/pkg/services/common.go +++ b/pkg/services/common.go @@ -5,15 +5,15 @@ import ( "fmt" "time" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/crypt" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" "github.com/gotd/td/telegram" "github.com/gotd/td/tg" "github.com/pkg/errors" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/crypt" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/types" "gorm.io/gorm" ) diff --git a/pkg/services/file.go b/pkg/services/file.go index 26f570a..7206698 100644 --- a/pkg/services/file.go +++ b/pkg/services/file.go @@ -16,24 +16,24 @@ import ( "time" "github.com/WinterYukky/gorm-extra-clause-plugin/exclause" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/category" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/database" - "github.com/divyam234/teldrive/internal/http_range" - "github.com/divyam234/teldrive/internal/kv" - "github.com/divyam234/teldrive/internal/md5" - "github.com/divyam234/teldrive/internal/reader" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/internal/utils" - "github.com/divyam234/teldrive/pkg/mapper" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" "github.com/gin-gonic/gin" "github.com/gotd/td/telegram" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/category" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/database" + "github.com/tgdrive/teldrive/internal/http_range" + "github.com/tgdrive/teldrive/internal/kv" + "github.com/tgdrive/teldrive/internal/md5" + "github.com/tgdrive/teldrive/internal/reader" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/internal/utils" + "github.com/tgdrive/teldrive/pkg/mapper" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/types" "go.uber.org/zap" "gorm.io/datatypes" diff --git a/pkg/services/file_test.go b/pkg/services/file_test.go index 5625615..b66bb49 100644 --- a/pkg/services/file_test.go +++ b/pkg/services/file_test.go @@ -3,12 +3,12 @@ package services import ( "testing" - "github.com/divyam234/teldrive/internal/database" "github.com/gin-gonic/gin" + "github.com/tgdrive/teldrive/internal/database" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" "github.com/stretchr/testify/suite" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" "gorm.io/gorm" ) diff --git a/pkg/services/upload.go b/pkg/services/upload.go index 02101ac..e4945fb 100644 --- a/pkg/services/upload.go +++ b/pkg/services/upload.go @@ -13,25 +13,25 @@ import ( "strings" "time" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/crypt" - "github.com/divyam234/teldrive/internal/kv" - "github.com/divyam234/teldrive/internal/logging" - "github.com/divyam234/teldrive/internal/pool" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/mapper" - "github.com/divyam234/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/crypt" + "github.com/tgdrive/teldrive/internal/kv" + "github.com/tgdrive/teldrive/internal/logging" + "github.com/tgdrive/teldrive/internal/pool" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/mapper" + "github.com/tgdrive/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" + "github.com/tgdrive/teldrive/pkg/types" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/pkg/models" "github.com/gin-gonic/gin" "github.com/gotd/td/telegram" "github.com/gotd/td/telegram/message" "github.com/gotd/td/telegram/uploader" "github.com/gotd/td/tg" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/pkg/models" "gorm.io/gorm" ) diff --git a/pkg/services/upload_test.go b/pkg/services/upload_test.go index 6aebaca..24d8915 100644 --- a/pkg/services/upload_test.go +++ b/pkg/services/upload_test.go @@ -3,10 +3,10 @@ package services import ( "testing" - "github.com/divyam234/teldrive/internal/database" + "github.com/tgdrive/teldrive/internal/database" - "github.com/divyam234/teldrive/pkg/models" "github.com/stretchr/testify/suite" + "github.com/tgdrive/teldrive/pkg/models" "gorm.io/gorm" ) diff --git a/pkg/services/user.go b/pkg/services/user.go index c271082..b1da8e0 100644 --- a/pkg/services/user.go +++ b/pkg/services/user.go @@ -11,19 +11,19 @@ import ( "sync" "time" - "github.com/divyam234/teldrive/internal/auth" - "github.com/divyam234/teldrive/internal/cache" - "github.com/divyam234/teldrive/internal/config" - "github.com/divyam234/teldrive/internal/kv" - "github.com/divyam234/teldrive/internal/tgc" - "github.com/divyam234/teldrive/pkg/models" - "github.com/divyam234/teldrive/pkg/schemas" - "github.com/divyam234/teldrive/pkg/types" "github.com/gotd/td/telegram" "github.com/gotd/td/telegram/message/peer" "github.com/gotd/td/telegram/query" "github.com/gotd/td/tg" "github.com/gotd/td/tgerr" + "github.com/tgdrive/teldrive/internal/auth" + "github.com/tgdrive/teldrive/internal/cache" + "github.com/tgdrive/teldrive/internal/config" + "github.com/tgdrive/teldrive/internal/kv" + "github.com/tgdrive/teldrive/internal/tgc" + "github.com/tgdrive/teldrive/pkg/models" + "github.com/tgdrive/teldrive/pkg/schemas" + "github.com/tgdrive/teldrive/pkg/types" "golang.org/x/sync/errgroup" "github.com/gin-gonic/gin"