chore: Prepare for frontend support by moving the Go module files.

This moves the Go module files to the root of the project and fixes
all of the imports.
This commit is contained in:
Tera << 8 2024-12-28 15:37:32 -05:00
parent 201007f7a0
commit 49db323e81
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
27 changed files with 75 additions and 75 deletions

View file

@ -8,8 +8,8 @@ import (
"os/exec" "os/exec"
"time" "time"
"git.terah.dev/imterah/hermes/backendlauncher" "git.terah.dev/imterah/hermes/backend/backendlauncher"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
) )

View file

@ -9,7 +9,7 @@ import (
"os" "os"
"strings" "strings"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"

View file

@ -6,11 +6,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -6,10 +6,10 @@ import (
"net/http" "net/http"
"strings" "strings"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,11 +4,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,11 +4,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -5,9 +5,9 @@ import (
"net/http" "net/http"
"strings" "strings"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,11 +4,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,11 +4,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,11 +4,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -9,9 +9,9 @@ import (
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
permissionHelper "git.terah.dev/imterah/hermes/api/permissions" permissionHelper "git.terah.dev/imterah/hermes/backend/api/permissions"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"

View file

@ -6,8 +6,8 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -5,9 +5,9 @@ import (
"net/http" "net/http"
"strings" "strings"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -5,8 +5,8 @@ import (
"net/http" "net/http"
"time" "time"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/api/permissions" "git.terah.dev/imterah/hermes/backend/api/permissions"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"

View file

@ -8,7 +8,7 @@ import (
"strconv" "strconv"
"time" "time"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"github.com/golang-jwt/jwt/v5" "github.com/golang-jwt/jwt/v5"
) )

View file

@ -9,13 +9,13 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"git.terah.dev/imterah/hermes/api/backendruntime" "git.terah.dev/imterah/hermes/backend/api/backendruntime"
"git.terah.dev/imterah/hermes/api/controllers/v1/backends" "git.terah.dev/imterah/hermes/backend/api/controllers/v1/backends"
"git.terah.dev/imterah/hermes/api/controllers/v1/proxies" "git.terah.dev/imterah/hermes/backend/api/controllers/v1/proxies"
"git.terah.dev/imterah/hermes/api/controllers/v1/users" "git.terah.dev/imterah/hermes/backend/api/controllers/v1/users"
"git.terah.dev/imterah/hermes/api/dbcore" "git.terah.dev/imterah/hermes/backend/api/dbcore"
"git.terah.dev/imterah/hermes/api/jwtcore" "git.terah.dev/imterah/hermes/backend/api/jwtcore"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"

View file

@ -1,6 +1,6 @@
package permissions package permissions
import "git.terah.dev/imterah/hermes/api/dbcore" import "git.terah.dev/imterah/hermes/backend/api/dbcore"
var DefaultPermissionNodes []string = []string{ var DefaultPermissionNodes []string = []string{
"routes.add", "routes.add",

View file

@ -5,7 +5,7 @@ import (
"net" "net"
"os" "os"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
) )

View file

@ -1,6 +1,6 @@
package backendutil package backendutil
import "git.terah.dev/imterah/hermes/commonbackend" import "git.terah.dev/imterah/hermes/backend/commonbackend"
type BackendInterface interface { type BackendInterface interface {
StartBackend(arguments []byte) (bool, error) StartBackend(arguments []byte) (bool, error)

View file

@ -3,8 +3,8 @@ package main
import ( import (
"os" "os"
"git.terah.dev/imterah/hermes/backendutil" "git.terah.dev/imterah/hermes/backend/backendutil"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
) )

View file

@ -8,8 +8,8 @@ import (
"strings" "strings"
"time" "time"
"git.terah.dev/imterah/hermes/backendlauncher" "git.terah.dev/imterah/hermes/backend/backendlauncher"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -9,8 +9,8 @@ import (
"strings" "strings"
"sync" "sync"
"git.terah.dev/imterah/hermes/backendutil" "git.terah.dev/imterah/hermes/backend/backendutil"
"git.terah.dev/imterah/hermes/commonbackend" "git.terah.dev/imterah/hermes/backend/commonbackend"
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"

View file

@ -40,7 +40,7 @@ echo "Restored backup. If this restore fails after the database has wiped, get a
echo "copy the backup contents into the container (base64 decoded) at '/tmp/db.json.gz'," echo "copy the backup contents into the container (base64 decoded) at '/tmp/db.json.gz',"
echo "and rerun /app/entrypoint.sh." echo "and rerun /app/entrypoint.sh."
echo "" echo ""
echo "If further issues continue, open an issue at 'https://git.terah.dev/imterah/hermes'." echo "If further issues continue, open an issue at 'https://git.terah.dev/imterah/hermes/backend'."
echo "If the migration succeeded, congratulations!" echo "If the migration succeeded, congratulations!"
sleep 10000 sleep 10000