🚚 Move from hydrogen to hypernet

This commit is contained in:
LittleSheep 2024-11-02 13:24:37 +08:00
parent cef4764d8c
commit 06031620b7
26 changed files with 66 additions and 66 deletions

2
go.mod
View File

@ -1,4 +1,4 @@
module git.solsynth.dev/hydrogen/messaging module git.solsynth.dev/hypernet/messaging
go 1.23.2 go 1.23.2

View File

@ -1,7 +1,7 @@
package database package database
import ( import (
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -2,7 +2,7 @@ package database
import ( import (
"fmt" "fmt"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/nexus/pkg/nex/cruda" "git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/samber/lo" "github.com/samber/lo"

View File

@ -6,7 +6,7 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/proto" "git.solsynth.dev/hypernet/nexus/pkg/proto"
"strconv" "strconv"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
) )
func (v *Server) BroadcastEvent(ctx context.Context, in *proto.EventInfo) (*proto.EventResponse, error) { func (v *Server) BroadcastEvent(ctx context.Context, in *proto.EventInfo) (*proto.EventResponse, error) {

View File

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"git.solsynth.dev/hypernet/nexus/pkg/nex" "git.solsynth.dev/hypernet/nexus/pkg/nex"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"git.solsynth.dev/hypernet/nexus/pkg/proto" "git.solsynth.dev/hypernet/nexus/pkg/proto"
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
) )

View File

@ -5,10 +5,10 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"sync" "sync"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/spf13/viper" "github.com/spf13/viper"

View File

@ -6,11 +6,11 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
) )

View File

@ -6,11 +6,11 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/samber/lo" "github.com/samber/lo"
) )

View File

@ -5,11 +5,11 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec" "git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
) )

View File

@ -5,9 +5,9 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec" "git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
) )

View File

@ -5,9 +5,9 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"strings" "strings"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/exts" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/exts"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
) )

View File

@ -3,7 +3,7 @@ package api
import ( import (
"fmt" "fmt"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
) )

View File

@ -5,8 +5,8 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec" "git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
) )

View File

@ -5,7 +5,7 @@ import (
"git.solsynth.dev/hypernet/passport/pkg/authkit" "git.solsynth.dev/hypernet/passport/pkg/authkit"
"strings" "strings"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http/api" "git.solsynth.dev/hypernet/messaging/pkg/internal/http/api"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors" "github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/idempotency" "github.com/gofiber/fiber/v2/middleware/idempotency"

View File

@ -6,7 +6,7 @@ import (
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"time" "time"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"github.com/samber/lo" "github.com/samber/lo"
"git.solsynth.dev/hydrogen/dealer/pkg/proto" "git.solsynth.dev/hydrogen/dealer/pkg/proto"

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/nexus/pkg/nex" "git.solsynth.dev/hypernet/nexus/pkg/nex"
"git.solsynth.dev/hypernet/passport/pkg/authkit" "git.solsynth.dev/hypernet/passport/pkg/authkit"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
@ -12,8 +12,8 @@ import (
"time" "time"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
"github.com/livekit/protocol/auth" "github.com/livekit/protocol/auth"
"github.com/livekit/protocol/livekit" "github.com/livekit/protocol/livekit"

View File

@ -3,16 +3,16 @@ package services
import ( import (
"context" "context"
"fmt" "fmt"
localCache "git.solsynth.dev/hydrogen/messaging/pkg/internal/cache" localCache "git.solsynth.dev/hypernet/messaging/pkg/internal/cache"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/passport/pkg/authkit" "git.solsynth.dev/hypernet/passport/pkg/authkit"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"github.com/eko/gocache/lib/v4/cache" "github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/marshaler" "github.com/eko/gocache/lib/v4/marshaler"
"github.com/eko/gocache/lib/v4/store" "github.com/eko/gocache/lib/v4/store"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
) )
func ListChannelMember(channelId uint) ([]models.ChannelMember, error) { func ListChannelMember(channelId uint) ([]models.ChannelMember, error) {

View File

@ -3,7 +3,7 @@ package services
import ( import (
"context" "context"
"fmt" "fmt"
localCache "git.solsynth.dev/hydrogen/messaging/pkg/internal/cache" localCache "git.solsynth.dev/hypernet/messaging/pkg/internal/cache"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"github.com/eko/gocache/lib/v4/cache" "github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/marshaler" "github.com/eko/gocache/lib/v4/marshaler"
@ -11,8 +11,8 @@ import (
"regexp" "regexp"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"github.com/samber/lo" "github.com/samber/lo"
"github.com/spf13/viper" "github.com/spf13/viper"
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -3,7 +3,7 @@ package services
import ( import (
"time" "time"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )

View File

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models" authm "git.solsynth.dev/hypernet/passport/pkg/authkit/models"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
) )
func GetDirectChannelByUser(user authm.Account, other authm.Account) (models.Channel, error) { func GetDirectChannelByUser(user authm.Account, other authm.Account) (models.Channel, error) {

View File

@ -2,15 +2,15 @@ package services
import ( import (
"fmt" "fmt"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/nexus/pkg/nex" "git.solsynth.dev/hypernet/nexus/pkg/nex"
"git.solsynth.dev/hypernet/passport/pkg/authkit" "git.solsynth.dev/hypernet/passport/pkg/authkit"
"git.solsynth.dev/hypernet/pusher/pkg/pushkit" "git.solsynth.dev/hypernet/pusher/pkg/pushkit"
"strings" "strings"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/samber/lo" "github.com/samber/lo"

View File

@ -1,7 +1,7 @@
package services package services
import ( import (
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"github.com/google/uuid" "github.com/google/uuid"
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
) )

View File

@ -6,9 +6,9 @@ import (
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/dealer/pkg/proto" "git.solsynth.dev/hydrogen/dealer/pkg/proto"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"github.com/samber/lo" "github.com/samber/lo"
"github.com/spf13/viper" "github.com/spf13/viper"
) )

View File

@ -5,10 +5,10 @@ import (
"fmt" "fmt"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper" "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/dealer/pkg/proto" "git.solsynth.dev/hydrogen/dealer/pkg/proto"
localCache "git.solsynth.dev/hydrogen/messaging/pkg/internal/cache" localCache "git.solsynth.dev/hypernet/messaging/pkg/internal/cache"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/models" "git.solsynth.dev/hypernet/messaging/pkg/internal/models"
"github.com/eko/gocache/lib/v4/cache" "github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/marshaler" "github.com/eko/gocache/lib/v4/marshaler"
"github.com/eko/gocache/lib/v4/store" "github.com/eko/gocache/lib/v4/store"

View File

@ -8,7 +8,7 @@ import (
"github.com/samber/lo" "github.com/samber/lo"
"git.solsynth.dev/hydrogen/dealer/pkg/proto" "git.solsynth.dev/hydrogen/dealer/pkg/proto"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
) )
func PushCommand(userId uint, task nex.WebSocketPackage) { func PushCommand(userId uint, task nex.WebSocketPackage) {

View File

@ -8,17 +8,17 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/gap" "git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/grpc" "git.solsynth.dev/hypernet/messaging/pkg/internal/grpc"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/services" "git.solsynth.dev/hypernet/messaging/pkg/internal/services"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/http" "git.solsynth.dev/hypernet/messaging/pkg/internal/http"
pkg "git.solsynth.dev/hydrogen/messaging/pkg/internal" pkg "git.solsynth.dev/hypernet/messaging/pkg/internal"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/cache" "git.solsynth.dev/hypernet/messaging/pkg/internal/cache"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database" "git.solsynth.dev/hypernet/messaging/pkg/internal/database"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/spf13/viper" "github.com/spf13/viper"