StopPlugin 关闭插件
(httpResponse http.ResponseWriter, httpRequest *http.Request)
| 330 | |
| 331 | //StopPlugin 关闭插件 |
| 332 | func 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 获取不同类型的插件列表 |
| 350 | func GetPluginListByPluginType(httpResponse http.ResponseWriter, httpRequest *http.Request) { |
nothing calls this directly
no test coverage detected