MCPcopy
hub / github.com/eolinker/goku_lite / StopPlugin

Function StopPlugin

console/controller/plugin/plugin.go:332–347  ·  view source on GitHub ↗

StopPlugin 关闭插件

(httpResponse http.ResponseWriter, httpRequest *http.Request)

Source from the content-addressed store, hash-verified

330
331//StopPlugin 关闭插件
332func StopPlugin(httpResponse http.ResponseWriter, httpRequest *http.Request) {
333
334 pluginName := httpRequest.PostFormValue("pluginName")
335
336 flag, err := plugin.CheckNameIsExist(pluginName)
337 if !flag {
338 controller.WriteError(httpResponse,
339 "210010",
340 "plugin",
341 "[ERROR]Plugin name does not exist!",
342 err)
343 return
344 }
345 _, _ = plugin.EditPluginStatus(pluginName, 0)
346 controller.WriteResultInfo(httpResponse, "plugin", "", nil)
347}
348
349//GetPluginListByPluginType 获取不同类型的插件列表
350func GetPluginListByPluginType(httpResponse http.ResponseWriter, httpRequest *http.Request) {

Callers

nothing calls this directly

Calls 4

CheckNameIsExistFunction · 0.92
WriteErrorFunction · 0.92
EditPluginStatusFunction · 0.92
WriteResultInfoFunction · 0.92

Tested by

no test coverage detected