mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-13 00:42:49 -05:00
rename backend to core
This commit is contained in:
27
core/internal/server/plugins/handlers.go
Normal file
27
core/internal/server/plugins/handlers.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package plugins
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/server/models"
|
||||
)
|
||||
|
||||
func HandleRequest(conn net.Conn, req models.Request) {
|
||||
switch req.Method {
|
||||
case "plugins.list":
|
||||
HandleList(conn, req)
|
||||
case "plugins.listInstalled":
|
||||
HandleListInstalled(conn, req)
|
||||
case "plugins.install":
|
||||
HandleInstall(conn, req)
|
||||
case "plugins.uninstall":
|
||||
HandleUninstall(conn, req)
|
||||
case "plugins.update":
|
||||
HandleUpdate(conn, req)
|
||||
case "plugins.search":
|
||||
HandleSearch(conn, req)
|
||||
default:
|
||||
models.RespondError(conn, req.ID, fmt.Sprintf("unknown method: %s", req.Method))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user