cleanup 2

This commit is contained in:
Sky Johnson 2025-04-04 11:22:13 -05:00
parent cac1b8cf92
commit 78556cea1d
21 changed files with 51 additions and 39 deletions

View File

@ -6,14 +6,14 @@ import (
"fmt"
"time"
"git.sharkk.net/Sky/Moonshark/core/config"
"git.sharkk.net/Sky/Moonshark/core/http"
"git.sharkk.net/Sky/Moonshark/core/logger"
"git.sharkk.net/Sky/Moonshark/core/routers"
"git.sharkk.net/Sky/Moonshark/core/runner"
"git.sharkk.net/Sky/Moonshark/core/sessions"
"git.sharkk.net/Sky/Moonshark/core/utils"
"git.sharkk.net/Sky/Moonshark/core/watchers"
"Moonshark/core/config"
"Moonshark/core/http"
"Moonshark/core/logger"
"Moonshark/core/routers"
"Moonshark/core/runner"
"Moonshark/core/sessions"
"Moonshark/core/utils"
"Moonshark/core/watchers"
)
// Moonshark represents the server and all its dependencies

View File

@ -1,8 +1,9 @@
package http
import (
"git.sharkk.net/Sky/Moonshark/core/logger"
"git.sharkk.net/Sky/Moonshark/core/utils"
"Moonshark/core/logger"
"Moonshark/core/utils"
"github.com/valyala/fasthttp"
)

View File

@ -3,7 +3,7 @@ package http
import (
"time"
"git.sharkk.net/Sky/Moonshark/core/logger"
"Moonshark/core/logger"
)
// StatusColors for different status code ranges

View File

@ -6,12 +6,12 @@ import (
"fmt"
"time"
"git.sharkk.net/Sky/Moonshark/core/config"
"git.sharkk.net/Sky/Moonshark/core/logger"
"git.sharkk.net/Sky/Moonshark/core/metadata"
"git.sharkk.net/Sky/Moonshark/core/routers"
"git.sharkk.net/Sky/Moonshark/core/runner"
"git.sharkk.net/Sky/Moonshark/core/utils"
"Moonshark/core/config"
"Moonshark/core/logger"
"Moonshark/core/metadata"
"Moonshark/core/routers"
"Moonshark/core/runner"
"Moonshark/core/utils"
"github.com/valyala/fasthttp"
)

View File

@ -8,7 +8,8 @@ import (
"strings"
"time"
"git.sharkk.net/Sky/Moonshark/core/logger"
"Moonshark/core/logger"
"github.com/valyala/fasthttp"
)

View File

@ -5,8 +5,9 @@ import (
"strings"
"sync"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// StateInitFunc is a function that initializes a module in a Lua state

View File

@ -3,8 +3,9 @@ package runner
import (
"crypto/subtle"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// LuaCSRFModule provides CSRF protection functionality to Lua scripts

View File

@ -4,8 +4,9 @@ import (
"crypto/rand"
"encoding/base64"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// GenerateToken creates a cryptographically secure random token

View File

@ -14,8 +14,9 @@ import (
"github.com/valyala/bytebufferpool"
"github.com/valyala/fasthttp"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// HTTPResponse represents an HTTP response from Lua

View File

@ -6,8 +6,9 @@ import (
"strings"
"sync"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// ModuleConfig holds configuration for Lua's module loading system

View File

@ -1,8 +1,9 @@
package runner
import (
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// ModuleFunc is a function that returns a map of module functions

View File

@ -12,8 +12,9 @@ import (
"github.com/panjf2000/ants/v2"
"github.com/valyala/bytebufferpool"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// Common errors

View File

@ -7,8 +7,9 @@ import (
"github.com/goccy/go-json"
"github.com/valyala/bytebufferpool"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// Sandbox provides a secure execution environment for Lua scripts

View File

@ -1,8 +1,9 @@
package runner
import (
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
)
// LuaSessionModule provides session functionality to Lua scripts

View File

@ -3,9 +3,10 @@ package runner
import (
"net/http"
"Moonshark/core/logger"
"Moonshark/core/sessions"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
"git.sharkk.net/Sky/Moonshark/core/sessions"
)
// SessionHandler handles session management for Lua scripts

View File

@ -7,8 +7,8 @@ import (
"strings"
"time"
"git.sharkk.net/Sky/Moonshark/core/config"
"git.sharkk.net/Sky/Moonshark/core/metadata"
"Moonshark/core/config"
"Moonshark/core/metadata"
)
// ComponentStats holds stats from various system components

View File

@ -4,9 +4,9 @@ import (
"fmt"
"sync"
"git.sharkk.net/Sky/Moonshark/core/logger"
"git.sharkk.net/Sky/Moonshark/core/routers"
"git.sharkk.net/Sky/Moonshark/core/runner"
"Moonshark/core/logger"
"Moonshark/core/routers"
"Moonshark/core/runner"
)
// Global watcher manager instance

View File

@ -7,7 +7,7 @@ import (
"sync"
"time"
"git.sharkk.net/Sky/Moonshark/core/logger"
"Moonshark/core/logger"
)
// Default debounce time between detected change and callback

View File

@ -4,7 +4,7 @@ import (
"sync"
"time"
"git.sharkk.net/Sky/Moonshark/core/logger"
"Moonshark/core/logger"
)
// Default polling intervals

2
go.mod
View File

@ -1,4 +1,4 @@
module git.sharkk.net/Sky/Moonshark
module Moonshark
go 1.24.1

View File

@ -6,8 +6,8 @@ import (
"os/signal"
"syscall"
"git.sharkk.net/Sky/Moonshark/core"
"git.sharkk.net/Sky/Moonshark/core/logger"
"Moonshark/core"
"Moonshark/core/logger"
)
func main() {