🚚 Update domain
This commit is contained in:
parent
1bd0807d65
commit
96ee0dc3a7
4
go.mod
4
go.mod
@ -1,4 +1,4 @@
|
|||||||
module code.smartsheep.studio/hydrogen/identity
|
module git.solsynth.dev/hydrogen/identity
|
||||||
|
|
||||||
go 1.21.5
|
go 1.21.5
|
||||||
|
|
||||||
@ -91,4 +91,4 @@ require (
|
|||||||
gorm.io/driver/mysql v1.5.2 // indirect
|
gorm.io/driver/mysql v1.5.2 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace code.smartsheep.studio/hydrogen/bus => ../Bus
|
replace git.solsynth.dev/hydrogen/bus => ../Bus
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
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"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
identity "code.smartsheep.studio/hydrogen/identity/pkg"
|
"git.solsynth.dev/hydrogen/identity/pkg/external"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"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"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/grpc/proto"
|
"git.solsynth.dev/hydrogen/identity/pkg/grpc/proto"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
"git.solsynth.dev/hydrogen/identity/pkg/services"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
@ -2,12 +2,13 @@ package security
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/google/uuid"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"github.com/google/uuid"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"gorm.io/datatypes"
|
"gorm.io/datatypes"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package security
|
package security
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,12 +2,13 @@ package security
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/spf13/viper"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"github.com/spf13/viper"
|
||||||
"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/google/uuid"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
"git.solsynth.dev/hydrogen/identity/pkg/services"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/security"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
"strings"
|
"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 {
|
func authMiddleware(c *fiber.Ctx) error {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"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"
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/security"
|
"github.com/gofiber/fiber/v2"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/security"
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/services"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
"git.solsynth.dev/hydrogen/identity/pkg/services"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ package server
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
"git.solsynth.dev/hydrogen/identity/pkg/services"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/services"
|
"git.solsynth.dev/hydrogen/identity/pkg/services"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
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"
|
"strings"
|
||||||
"time"
|
"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 {
|
func preConnect(c *fiber.Ctx) error {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"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"
|
||||||
"github.com/gofiber/fiber/v2/middleware/cache"
|
"github.com/gofiber/fiber/v2/middleware/cache"
|
||||||
"github.com/gofiber/fiber/v2/middleware/cors"
|
"github.com/gofiber/fiber/v2/middleware/cors"
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/security"
|
|
||||||
"fmt"
|
"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/google/uuid"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetAccount(id uint) (models.Account, error) {
|
func GetAccount(id uint) (models.Account, error) {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/security"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/security"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LookupChallenge(id uint) (models.AuthChallenge, error) {
|
func LookupChallenge(id uint) (models.AuthChallenge, error) {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetThirdClient(id string) (models.ThirdClient, error) {
|
func GetThirdClient(id string) (models.ThirdClient, error) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func AddEvent(user models.Account, event, target, ip, ua string) models.ActionEvent {
|
func AddEvent(user models.Account, event, target, ip, ua string) models.ActionEvent {
|
||||||
|
@ -3,8 +3,8 @@ package services
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/external"
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"firebase.google.com/go/messaging"
|
"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"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package services
|
package services
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"time"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func LookupSessionWithToken(tokenId string) (models.AuthSession, error) {
|
func LookupSessionWithToken(tokenId string) (models.AuthSession, error) {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/database"
|
"git.solsynth.dev/hydrogen/identity/pkg/database"
|
||||||
"code.smartsheep.studio/hydrogen/identity/pkg/models"
|
"git.solsynth.dev/hydrogen/identity/pkg/models"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user