refactor: move gateway package to app directory

This commit is contained in:
Prad Nukala 2024-12-09 18:34:38 -05:00
parent 67432d3fdf
commit f250082fff
32 changed files with 13 additions and 13 deletions

View File

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"github.com/ipfs/boxo/files" "github.com/ipfs/boxo/files"
"github.com/onsonr/sonr/pkg/gateway/config/internal" "github.com/onsonr/sonr/app/gateway/config/internal"
"github.com/onsonr/sonr/pkg/vault/types" "github.com/onsonr/sonr/pkg/vault/types"
) )

View File

@ -2,9 +2,9 @@ package handlers
import ( import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/app/gateway/internal/pages/index"
"github.com/onsonr/sonr/app/gateway/internal/session"
"github.com/onsonr/sonr/pkg/common/response" "github.com/onsonr/sonr/pkg/common/response"
"github.com/onsonr/sonr/pkg/gateway/internal/session"
"github.com/onsonr/sonr/pkg/gateway/pages/index"
) )
func HandleIndex(c echo.Context) error { func HandleIndex(c echo.Context) error {

View File

@ -8,11 +8,11 @@ import (
"github.com/go-webauthn/webauthn/protocol" "github.com/go-webauthn/webauthn/protocol"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/app/gateway/internal/database"
"github.com/onsonr/sonr/app/gateway/internal/pages/register"
"github.com/onsonr/sonr/crypto/mpc" "github.com/onsonr/sonr/crypto/mpc"
"github.com/onsonr/sonr/pkg/common/response" "github.com/onsonr/sonr/pkg/common/response"
"github.com/onsonr/sonr/pkg/common/styles/forms" "github.com/onsonr/sonr/pkg/common/styles/forms"
"github.com/onsonr/sonr/pkg/gateway/internal/database"
"github.com/onsonr/sonr/pkg/gateway/pages/register"
) )
func HandleRegisterView(c echo.Context) error { func HandleRegisterView(c echo.Context) error {

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/onsonr/sonr/pkg/gateway/config" "github.com/onsonr/sonr/app/gateway/config"
"gorm.io/driver/sqlite" "gorm.io/driver/sqlite"
"gorm.io/gorm" "gorm.io/gorm"
) )
@ -34,7 +34,7 @@ func formatDBPath(path string) string {
} }
configDir := filepath.Join(home, ".config", "hway") configDir := filepath.Join(home, ".config", "hway")
if err := os.MkdirAll(configDir, 0755); err != nil { if err := os.MkdirAll(configDir, 0o755); err != nil {
// If we can't create the directory, fall back to current directory // If we can't create the directory, fall back to current directory
return path return path
} }

View File

@ -5,8 +5,8 @@ import (
"strings" "strings"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/app/gateway/internal/database"
"github.com/onsonr/sonr/pkg/common" "github.com/onsonr/sonr/pkg/common"
"github.com/onsonr/sonr/pkg/gateway/internal/database"
"github.com/segmentio/ksuid" "github.com/segmentio/ksuid"
) )

View File

@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/gateway/config" "github.com/onsonr/sonr/app/gateway/config"
"github.com/onsonr/sonr/pkg/gateway/internal/database" "github.com/onsonr/sonr/app/gateway/internal/database"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -2,7 +2,7 @@ package session
import ( import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/gateway/internal/database" "github.com/onsonr/sonr/app/gateway/internal/database"
) )
// ╭───────────────────────────────────────────────────────╮ // ╭───────────────────────────────────────────────────────╮