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

Function GetPluginInfo

console/controller/plugin/plugin.go:215–241  ·  view source on GitHub ↗

GetPluginInfo 获取插件信息

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

Source from the content-addressed store, hash-verified

213
214//GetPluginInfo 获取插件信息
215func GetPluginInfo(httpResponse http.ResponseWriter, httpRequest *http.Request) {
216
217 pluginName := httpRequest.PostFormValue("pluginName")
218
219 flag, err := plugin.CheckNameIsExist(pluginName)
220 if !flag {
221 controller.WriteError(httpResponse,
222 "210004",
223 "plugin",
224 "[ERROR]Plugin name does not exist!",
225 err)
226 return
227
228 }
229 flag, result, err := plugin.GetPluginInfo(pluginName)
230 if !flag {
231
232 controller.WriteError(httpResponse,
233 "210000",
234 "plugin",
235 "[ERROR]The plugin does not exist!",
236 err)
237 return
238
239 }
240 controller.WriteResultInfo(httpResponse, "plugin", "pluginInfo", result)
241}
242
243//GetPluginConfig 获取插件配置
244func GetPluginConfig(httpResponse http.ResponseWriter, httpRequest *http.Request) {

Callers

nothing calls this directly

Calls 4

CheckNameIsExistFunction · 0.92
WriteErrorFunction · 0.92
GetPluginInfoFunction · 0.92
WriteResultInfoFunction · 0.92

Tested by

no test coverage detected