DeletePlugin 删除插件信息
(httpResponse http.ResponseWriter, httpRequest *http.Request)
| 184 | |
| 185 | //DeletePlugin 删除插件信息 |
| 186 | func DeletePlugin(httpResponse http.ResponseWriter, httpRequest *http.Request) { |
| 187 | |
| 188 | pluginName := httpRequest.PostFormValue("pluginName") |
| 189 | flag, err := plugin.CheckNameIsExist(pluginName) |
| 190 | if !flag { |
| 191 | controller.WriteError(httpResponse, |
| 192 | "210004", |
| 193 | "plugin", |
| 194 | "[ERROR]Plugin name does not exist!", |
| 195 | err) |
| 196 | return |
| 197 | |
| 198 | } |
| 199 | flag, result, err := plugin.DeletePlugin(pluginName) |
| 200 | if !flag { |
| 201 | |
| 202 | controller.WriteError(httpResponse, |
| 203 | "210000", |
| 204 | "plugin", |
| 205 | result, |
| 206 | err) |
| 207 | return |
| 208 | |
| 209 | } |
| 210 | controller.WriteResultInfo(httpResponse, "plugin", "", nil) |
| 211 | return |
| 212 | } |
| 213 | |
| 214 | //GetPluginInfo 获取插件信息 |
| 215 | func GetPluginInfo(httpResponse http.ResponseWriter, httpRequest *http.Request) { |
nothing calls this directly
no test coverage detected