cleanup 2
This commit is contained in:
parent
cac1b8cf92
commit
78556cea1d
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module git.sharkk.net/Sky/Moonshark
|
module Moonshark
|
||||||
|
|
||||||
go 1.24.1
|
go 1.24.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user