mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-10 07:25:37 -05:00
28 lines
609 B
Go
28 lines
609 B
Go
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))
|
|
}
|
|
}
|