forked from baron/baron-sso
golangci lint 적용
This commit is contained in:
@@ -12,8 +12,8 @@ func main() {
|
||||
// KETO_READ_URL과 KETO_WRITE_URL은 컨테이너 외부 포트 또는 내부 주소에 맞게 설정 필요
|
||||
os.Setenv("KETO_READ_URL", "http://keto:4466")
|
||||
os.Setenv("KETO_WRITE_URL", "http://keto:4467")
|
||||
|
||||
keto := service.NewKetoService()
|
||||
|
||||
keto := service.NewKetoService()
|
||||
ctx := context.Background()
|
||||
|
||||
userID := "test-user-id"
|
||||
|
||||
@@ -35,15 +35,25 @@ func main() {
|
||||
godotenv.Load("backend/.env")
|
||||
|
||||
pgHost := os.Getenv("DB_HOST")
|
||||
if pgHost == "" { pgHost = "localhost" }
|
||||
if pgHost == "" {
|
||||
pgHost = "localhost"
|
||||
}
|
||||
pgPort := os.Getenv("DB_PORT")
|
||||
if pgPort == "" { pgPort = "5432" }
|
||||
if pgPort == "" {
|
||||
pgPort = "5432"
|
||||
}
|
||||
pgUser := os.Getenv("DB_USER")
|
||||
if pgUser == "" { pgUser = "baron" }
|
||||
if pgUser == "" {
|
||||
pgUser = "baron"
|
||||
}
|
||||
pgPass := os.Getenv("DB_PASSWORD")
|
||||
if pgPass == "" { pgPass = "password" }
|
||||
if pgPass == "" {
|
||||
pgPass = "password"
|
||||
}
|
||||
pgName := os.Getenv("DB_NAME")
|
||||
if pgName == "" { pgName = "baron_sso" }
|
||||
if pgName == "" {
|
||||
pgName = "baron_sso"
|
||||
}
|
||||
|
||||
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=disable",
|
||||
pgHost, pgUser, pgPass, pgName, pgPort)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"baron-sso-backend/internal/bootstrap"
|
||||
"baron-sso-backend/internal/domain"
|
||||
"baron-sso-backend/internal/handler"
|
||||
"baron-sso-backend/internal/idp"
|
||||
@@ -28,8 +29,6 @@ import (
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
gormLogger "gorm.io/gorm/logger"
|
||||
|
||||
"baron-sso-backend/internal/bootstrap"
|
||||
)
|
||||
|
||||
func getEnv(key, fallback string) string {
|
||||
@@ -492,10 +491,10 @@ func main() {
|
||||
auth.Post("/login/code/verify", authHandler.VerifyLoginCode)
|
||||
auth.Post("/login/code/verify-short", authHandler.VerifyLoginShortCode)
|
||||
auth.Post("/password/login", authHandler.PasswordLogin)
|
||||
auth.Get("/consent", authHandler.GetConsentRequest)
|
||||
auth.Post("/consent/accept", authHandler.AcceptConsentRequest)
|
||||
auth.Post("/consent/reject", authHandler.RejectConsentRequest)
|
||||
|
||||
auth.Get("/consent", authHandler.GetConsentRequest)
|
||||
auth.Post("/consent/accept", authHandler.AcceptConsentRequest)
|
||||
auth.Post("/consent/reject", authHandler.RejectConsentRequest)
|
||||
|
||||
auth.Post("/oidc/login/accept", authHandler.AcceptOidcLoginRequest)
|
||||
|
||||
auth.Post("/enchanted-link/init", authHandler.InitEnchantedLink)
|
||||
|
||||
Reference in New Issue
Block a user