🚚 Update domain

This commit is contained in:
LittleSheep 2024-03-20 20:56:43 +08:00
parent 1bd0807d65
commit 96ee0dc3a7
26 changed files with 80 additions and 68 deletions

4
go.mod
View File

@ -1,4 +1,4 @@
module code.smartsheep.studio/hydrogen/identity
module git.solsynth.dev/hydrogen/identity
go 1.21.5
@ -91,4 +91,4 @@ require (
gorm.io/driver/mysql v1.5.2 // indirect
)
replace code.smartsheep.studio/hydrogen/bus => ../Bus
replace git.solsynth.dev/hydrogen/bus => ../Bus

View File

@ -1,17 +1,18 @@
package main
import (
"code.smartsheep.studio/hydrogen/identity/pkg/external"
"code.smartsheep.studio/hydrogen/identity/pkg/grpc"
"code.smartsheep.studio/hydrogen/identity/pkg/server"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"github.com/robfig/cron/v3"
"os"
"os/signal"
"syscall"
identity "code.smartsheep.studio/hydrogen/identity/pkg"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/external"
"git.solsynth.dev/hydrogen/identity/pkg/grpc"
"git.solsynth.dev/hydrogen/identity/pkg/server"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/robfig/cron/v3"
identity "git.solsynth.dev/hydrogen/identity/pkg"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"

View File

@ -1,7 +1,7 @@
package database
import (
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"gorm.io/gorm"
)

View File

@ -5,9 +5,9 @@ import (
"fmt"
"net"
"code.smartsheep.studio/hydrogen/identity/pkg/grpc/proto"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"git.solsynth.dev/hydrogen/identity/pkg/grpc/proto"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/samber/lo"
"github.com/spf13/viper"
"google.golang.org/grpc"

View File

@ -2,12 +2,13 @@ package security
import (
"fmt"
"github.com/google/uuid"
"strings"
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"github.com/google/uuid"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/samber/lo"
"gorm.io/datatypes"
)

View File

@ -1,8 +1,9 @@
package security
import (
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"fmt"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/samber/lo"
)

View File

@ -2,12 +2,13 @@ package security
import (
"fmt"
"github.com/spf13/viper"
"strconv"
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"github.com/spf13/viper"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/google/uuid"
"github.com/samber/lo"
)

View File

@ -5,9 +5,9 @@ import (
"strconv"
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
jsoniter "github.com/json-iterator/go"
"github.com/spf13/viper"

View File

@ -1,10 +1,11 @@
package server
import (
"code.smartsheep.studio/hydrogen/identity/pkg/security"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
"strings"
"git.solsynth.dev/hydrogen/identity/pkg/security"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
)
func authMiddleware(c *fiber.Ctx) error {

View File

@ -4,8 +4,8 @@ import (
"os"
"path/filepath"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/gofiber/fiber/v2"
"github.com/google/uuid"
"github.com/spf13/viper"

View File

@ -1,11 +1,12 @@
package server
import (
"github.com/gofiber/fiber/v2"
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/security"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
"git.solsynth.dev/hydrogen/identity/pkg/security"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/samber/lo"
)

View File

@ -1,7 +1,7 @@
package server
import (
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
)

View File

@ -3,9 +3,9 @@ package server
import (
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
"github.com/samber/lo"
)

View File

@ -1,8 +1,8 @@
package server
import (
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
)

View File

@ -1,14 +1,15 @@
package server
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/security"
"code.smartsheep.studio/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
"github.com/samber/lo"
"strings"
"time"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/security"
"git.solsynth.dev/hydrogen/identity/pkg/services"
"github.com/gofiber/fiber/v2"
"github.com/samber/lo"
)
func preConnect(c *fiber.Ctx) error {

View File

@ -1,8 +1,8 @@
package server
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/gofiber/fiber/v2"
)

View File

@ -5,7 +5,7 @@ import (
"strings"
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/views"
"git.solsynth.dev/hydrogen/identity/pkg/views"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cache"
"github.com/gofiber/fiber/v2/middleware/cors"

View File

@ -1,14 +1,15 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/security"
"fmt"
"time"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/security"
"github.com/google/uuid"
"github.com/samber/lo"
"gorm.io/gorm"
"time"
)
func GetAccount(id uint) (models.Account, error) {

View File

@ -1,9 +1,10 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"code.smartsheep.studio/hydrogen/identity/pkg/security"
"fmt"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/security"
"github.com/gofiber/fiber/v2"
)

View File

@ -1,8 +1,8 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
)
func LookupChallenge(id uint) (models.AuthChallenge, error) {

View File

@ -1,9 +1,10 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"fmt"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
)
func GetThirdClient(id string) (models.ThirdClient, error) {

View File

@ -1,8 +1,8 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
)
func AddEvent(user models.Account, event, target, ip, ua string) models.ActionEvent {

View File

@ -3,8 +3,8 @@ package services
import (
"fmt"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/google/uuid"
"github.com/spf13/viper"
)

View File

@ -1,11 +1,12 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/external"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"context"
"firebase.google.com/go/messaging"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/external"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/rs/zerolog/log"
)

View File

@ -1,11 +1,12 @@
package services
import (
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"time"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/spf13/viper"
"gorm.io/gorm"
"time"
)
func LookupSessionWithToken(tokenId string) (models.AuthSession, error) {

View File

@ -5,8 +5,8 @@ import (
"strings"
"time"
"code.smartsheep.studio/hydrogen/identity/pkg/database"
"code.smartsheep.studio/hydrogen/identity/pkg/models"
"git.solsynth.dev/hydrogen/identity/pkg/database"
"git.solsynth.dev/hydrogen/identity/pkg/models"
"github.com/google/uuid"
"github.com/spf13/viper"
)