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

Function DeletePlugin

console/controller/plugin/plugin.go:186–212  ·  view source on GitHub ↗

DeletePlugin 删除插件信息

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

Source from the content-addressed store, hash-verified

184
185//DeletePlugin 删除插件信息
186func 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 获取插件信息
215func GetPluginInfo(httpResponse http.ResponseWriter, httpRequest *http.Request) {

Callers

nothing calls this directly

Calls 4

CheckNameIsExistFunction · 0.92
WriteErrorFunction · 0.92
DeletePluginFunction · 0.92
WriteResultInfoFunction · 0.92

Tested by

no test coverage detected