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" "fmt"
"time" "time"
"git.sharkk.net/Sky/Moonshark/core/config" "Moonshark/core/config"
"git.sharkk.net/Sky/Moonshark/core/http" "Moonshark/core/http"
"git.sharkk.net/Sky/Moonshark/core/logger" "Moonshark/core/logger"
"git.sharkk.net/Sky/Moonshark/core/routers" "Moonshark/core/routers"
"git.sharkk.net/Sky/Moonshark/core/runner" "Moonshark/core/runner"
"git.sharkk.net/Sky/Moonshark/core/sessions" "Moonshark/core/sessions"
"git.sharkk.net/Sky/Moonshark/core/utils" "Moonshark/core/utils"
"git.sharkk.net/Sky/Moonshark/core/watchers" "Moonshark/core/watchers"
) )
// Moonshark represents the server and all its dependencies // Moonshark represents the server and all its dependencies

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,9 @@
package runner package runner
import ( import (
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go" 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 // 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/panjf2000/ants/v2"
"github.com/valyala/bytebufferpool" "github.com/valyala/bytebufferpool"
"Moonshark/core/logger"
luajit "git.sharkk.net/Sky/LuaJIT-to-Go" luajit "git.sharkk.net/Sky/LuaJIT-to-Go"
"git.sharkk.net/Sky/Moonshark/core/logger"
) )
// Common errors // Common errors

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

2
go.mod
View File

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

View File

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