diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 68f9d7b..c1e14a6 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,32 +4,32 @@
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
@@ -64,33 +64,33 @@
- {
+ "keyToString": {
+ "DefaultGoTemplateProperty": "Go File",
+ "Go Build.Backend.executor": "Run",
+ "Go 构建.Backend.executor": "Run",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.go.formatter.settings.were.checked": "true",
+ "RunOnceActivity.go.migrated.go.modules.settings": "true",
+ "RunOnceActivity.go.modules.automatic.dependencies.download": "true",
+ "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true",
+ "git-widget-placeholder": "refactor/nexus",
+ "go.import.settings.migrated": "true",
+ "go.sdk.automatically.set": "true",
+ "last_opened_file_path": "/Users/littlesheep/Documents/Projects/Hydrogen/Paperclip/pkg/internal/gap",
+ "node.js.detected.package.eslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "run.code.analysis.last.selected.profile": "pProject Default",
+ "settings.editor.selected.configurable": "preferences.pluginManager",
+ "vue.rearranger.settings.migration": "true"
},
- "keyToStringList": {
- "DatabaseDriversLRU": [
- "postgresql"
+ "keyToStringList": {
+ "DatabaseDriversLRU": [
+ "postgresql"
]
}
-}]]>
+}
@@ -141,7 +141,6 @@
-
@@ -166,7 +165,8 @@
-
+
+
true
diff --git a/README.md b/README.md
index e0fca7d..42db62f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# Hydrogen.Paperclip
+# Hypernet.Paperclip
-Paperclip is the unified attachment service for all hydrogen services.
+Paperclip is the unified attachment service for all hypernet services.
It contains file metadata compute, instant upload, calculating hashing, multi destination, media info and more features!
## Features
diff --git a/go.mod b/go.mod
index 7e0c327..4eda458 100644
--- a/go.mod
+++ b/go.mod
@@ -1,11 +1,11 @@
-module git.solsynth.dev/hydrogen/paperclip
+module git.solsynth.dev/hypernet/paperclip
go 1.22.0
toolchain go1.23.2
require (
- git.solsynth.dev/hypernet/nexus v0.0.0-20241027051235-ae3583ead196
+ git.solsynth.dev/hypernet/nexus v0.0.0-20241031133156-6bb8eab3fcd8
github.com/barasher/go-exiftool v1.10.0
github.com/dgraph-io/ristretto v0.1.1
github.com/eko/gocache/lib/v4 v4.1.6
diff --git a/go.sum b/go.sum
index 366c837..22a9626 100644
--- a/go.sum
+++ b/go.sum
@@ -33,12 +33,10 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
-git.solsynth.dev/hypernet/nexus v0.0.0-20241026162044-3d487fa48baf h1:Fil1ASTvxmqFySD3OoptC7uRXEYpWLwLfjlkWZNNwVQ=
-git.solsynth.dev/hypernet/nexus v0.0.0-20241026162044-3d487fa48baf/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
-git.solsynth.dev/hypernet/nexus v0.0.0-20241027050830-7fd0b7695eb1 h1:W4QYIXCCetJAEE3We8FxJidC8bzzlQpquQ1lfhGKHBo=
-git.solsynth.dev/hypernet/nexus v0.0.0-20241027050830-7fd0b7695eb1/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
git.solsynth.dev/hypernet/nexus v0.0.0-20241027051235-ae3583ead196 h1:vTT1Vhz9OJHUh+D07AUFO3jjm3p8/dRo194REny0Wk4=
git.solsynth.dev/hypernet/nexus v0.0.0-20241027051235-ae3583ead196/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241031133156-6bb8eab3fcd8 h1:fo9WuAXcmxdGfYXZKTiAbqGLHAkeL7vf0zpwbjoUNc0=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241031133156-6bb8eab3fcd8/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
diff --git a/pkg/internal/database/migrator.go b/pkg/internal/database/migrator.go
index ed113fa..f2a850f 100644
--- a/pkg/internal/database/migrator.go
+++ b/pkg/internal/database/migrator.go
@@ -1,7 +1,7 @@
package database
import (
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"gorm.io/gorm"
)
diff --git a/pkg/internal/database/source.go b/pkg/internal/database/source.go
index 39a42bc..ee2f9bd 100644
--- a/pkg/internal/database/source.go
+++ b/pkg/internal/database/source.go
@@ -1,8 +1,8 @@
package database
import (
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/gap"
"git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/gap"
"github.com/rs/zerolog/log"
"github.com/samber/lo"
"github.com/spf13/viper"
diff --git a/pkg/internal/grpc/services.go b/pkg/internal/grpc/services.go
index a2c884b..8802142 100644
--- a/pkg/internal/grpc/services.go
+++ b/pkg/internal/grpc/services.go
@@ -5,9 +5,9 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex"
"strconv"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
"git.solsynth.dev/hypernet/nexus/pkg/proto"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
)
func (v *Server) BroadcastEvent(ctx context.Context, in *proto.EventInfo) (*proto.EventResponse, error) {
diff --git a/pkg/internal/server/api/attachments_api.go b/pkg/internal/server/api/attachments_api.go
index 7a64c10..6bd08e2 100644
--- a/pkg/internal/server/api/attachments_api.go
+++ b/pkg/internal/server/api/attachments_api.go
@@ -2,14 +2,14 @@ package api
import (
"fmt"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/exts"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server/exts"
"net/url"
"path/filepath"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
jsoniter "github.com/json-iterator/go"
"github.com/samber/lo"
diff --git a/pkg/internal/server/api/index_api.go b/pkg/internal/server/api/index_api.go
index 6b6c593..5cdd6cb 100644
--- a/pkg/internal/server/api/index_api.go
+++ b/pkg/internal/server/api/index_api.go
@@ -6,9 +6,9 @@ import (
"gorm.io/datatypes"
"strings"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
)
diff --git a/pkg/internal/server/api/pools_api.go b/pkg/internal/server/api/pools_api.go
index a82b2ba..70ce8df 100644
--- a/pkg/internal/server/api/pools_api.go
+++ b/pkg/internal/server/api/pools_api.go
@@ -1,10 +1,10 @@
package api
import (
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/exts"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server/exts"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
"gorm.io/datatypes"
)
diff --git a/pkg/internal/server/api/sticker_packs_api.go b/pkg/internal/server/api/sticker_packs_api.go
index 22be762..b7d374d 100644
--- a/pkg/internal/server/api/sticker_packs_api.go
+++ b/pkg/internal/server/api/sticker_packs_api.go
@@ -1,11 +1,11 @@
package api
import (
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/exts"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server/exts"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
)
diff --git a/pkg/internal/server/api/stickers_api.go b/pkg/internal/server/api/stickers_api.go
index e22d807..778cb37 100644
--- a/pkg/internal/server/api/stickers_api.go
+++ b/pkg/internal/server/api/stickers_api.go
@@ -5,10 +5,10 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
"strings"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/exts"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server/exts"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
)
diff --git a/pkg/internal/server/api/up_direct_api.go b/pkg/internal/server/api/up_direct_api.go
index 30a4f4c..3f4fb54 100644
--- a/pkg/internal/server/api/up_direct_api.go
+++ b/pkg/internal/server/api/up_direct_api.go
@@ -2,10 +2,10 @@ package api
import (
"fmt"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
jsoniter "github.com/json-iterator/go"
"github.com/spf13/viper"
diff --git a/pkg/internal/server/api/up_multipart_api.go b/pkg/internal/server/api/up_multipart_api.go
index 6d8ad22..222dd57 100644
--- a/pkg/internal/server/api/up_multipart_api.go
+++ b/pkg/internal/server/api/up_multipart_api.go
@@ -3,11 +3,11 @@ package api
import (
"encoding/json"
"fmt"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/exts"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server/exts"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
"github.com/spf13/viper"
)
diff --git a/pkg/internal/server/server.go b/pkg/internal/server/server.go
index 153a960..eb18b4c 100644
--- a/pkg/internal/server/server.go
+++ b/pkg/internal/server/server.go
@@ -4,7 +4,7 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
"strings"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server/api"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server/api"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
@@ -25,8 +25,8 @@ func NewServer() *App {
app := fiber.New(fiber.Config{
DisableStartupMessage: true,
EnableIPValidation: true,
- ServerHeader: "Hydrogen.Paperclip",
- AppName: "Hydrogen.Paperclip",
+ ServerHeader: "Hypernet.Paperclip",
+ AppName: "Hypernet.Paperclip",
ProxyHeader: fiber.HeaderXForwardedFor,
JSONEncoder: jsoniter.ConfigCompatibleWithStandardLibrary.Marshal,
JSONDecoder: jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal,
diff --git a/pkg/internal/services/analyzer.go b/pkg/internal/services/analyzer.go
index 8603ad0..04fead9 100644
--- a/pkg/internal/services/analyzer.go
+++ b/pkg/internal/services/analyzer.go
@@ -15,8 +15,8 @@ import (
"strings"
"time"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
jsoniter "github.com/json-iterator/go"
"github.com/k0kubun/go-ansi"
"github.com/rs/zerolog/log"
diff --git a/pkg/internal/services/attachments.go b/pkg/internal/services/attachments.go
index 17a070a..cc6a1fa 100644
--- a/pkg/internal/services/attachments.go
+++ b/pkg/internal/services/attachments.go
@@ -17,10 +17,10 @@ import (
"github.com/spf13/viper"
"gorm.io/datatypes"
- localCache "git.solsynth.dev/hydrogen/paperclip/pkg/internal/cache"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
+ localCache "git.solsynth.dev/hypernet/paperclip/pkg/internal/cache"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"github.com/google/uuid"
"gorm.io/gorm"
)
diff --git a/pkg/internal/services/cleaner.go b/pkg/internal/services/cleaner.go
index 811171e..839b2cf 100644
--- a/pkg/internal/services/cleaner.go
+++ b/pkg/internal/services/cleaner.go
@@ -1,7 +1,7 @@
package services
import (
- database2 "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
+ database2 "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
"time"
"github.com/rs/zerolog/log"
diff --git a/pkg/internal/services/merger.go b/pkg/internal/services/merger.go
index 34e50b9..acd2445 100644
--- a/pkg/internal/services/merger.go
+++ b/pkg/internal/services/merger.go
@@ -6,8 +6,8 @@ import (
"os"
"path/filepath"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"github.com/spf13/viper"
)
diff --git a/pkg/internal/services/pools.go b/pkg/internal/services/pools.go
index ef9a49d..b3c191a 100644
--- a/pkg/internal/services/pools.go
+++ b/pkg/internal/services/pools.go
@@ -1,8 +1,8 @@
package services
import (
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
)
func ListAttachmentPool() ([]models.AttachmentPool, error) {
diff --git a/pkg/internal/services/recycler.go b/pkg/internal/services/recycler.go
index e96701e..c3bc7f1 100644
--- a/pkg/internal/services/recycler.go
+++ b/pkg/internal/services/recycler.go
@@ -3,13 +3,13 @@ package services
import (
"context"
"fmt"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
"github.com/samber/lo"
"os"
"path/filepath"
"time"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
jsoniter "github.com/json-iterator/go"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
diff --git a/pkg/internal/services/sticker_packs.go b/pkg/internal/services/sticker_packs.go
index 76149f6..3c36ec1 100644
--- a/pkg/internal/services/sticker_packs.go
+++ b/pkg/internal/services/sticker_packs.go
@@ -1,9 +1,9 @@
package services
import (
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"gorm.io/gorm"
)
diff --git a/pkg/internal/services/stickers.go b/pkg/internal/services/stickers.go
index 9e0d253..9a6e786 100644
--- a/pkg/internal/services/stickers.go
+++ b/pkg/internal/services/stickers.go
@@ -3,8 +3,8 @@ package services
import (
"fmt"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"github.com/spf13/viper"
)
diff --git a/pkg/internal/services/uploader.go b/pkg/internal/services/uploader.go
index d1dbb99..5ab7e56 100644
--- a/pkg/internal/services/uploader.go
+++ b/pkg/internal/services/uploader.go
@@ -9,8 +9,8 @@ import (
"os"
"path/filepath"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/models"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"github.com/gofiber/fiber/v2"
jsoniter "github.com/json-iterator/go"
"github.com/minio/minio-go/v7"
diff --git a/pkg/main.go b/pkg/main.go
index def4fc2..ad67a72 100644
--- a/pkg/main.go
+++ b/pkg/main.go
@@ -2,20 +2,20 @@ package main
import (
"fmt"
- pkg "git.solsynth.dev/hydrogen/paperclip/pkg/internal"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/gap"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
+ pkg "git.solsynth.dev/hypernet/paperclip/pkg/internal"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/gap"
"github.com/fatih/color"
"os"
"os/signal"
"syscall"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/cache"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/database"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/grpc"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/cache"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/grpc"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/server"
- "git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/server"
+ "git.solsynth.dev/hypernet/paperclip/pkg/internal/services"
"github.com/robfig/cron/v3"
"github.com/rs/zerolog"