GetPluginInfo 获取插件信息
(httpResponse http.ResponseWriter, httpRequest *http.Request)
| 213 | |
| 214 | //GetPluginInfo 获取插件信息 |
| 215 | func 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 获取插件配置 |
| 244 | func GetPluginConfig(httpResponse http.ResponseWriter, httpRequest *http.Request) { |
nothing calls this directly
no test coverage detected