Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat(plugin): add link address for plugin

LinkinStars666471ec24d9
diff --git a/internal/controller_admin/plugin_controller.go b/internal/controller_admin/plugin_controller.go
index 38a38d92..e565f2bd 100644
--- a/internal/controller_admin/plugin_controller.go
+++ b/internal/controller_admin/plugin_controller.go
@@ -55,6 +55,7 @@ func (pc *PluginController) GetPluginList(ctx *gin.Context) {
Version: info.Version,
Enabled: plugin.StatusManager.IsEnabled(info.SlugName),
HaveConfig: pluginConfigMapping[info.SlugName],
+ Link: info.Link,
})
return nil
})
diff --git a/internal/schema/plugin_admin_schema.go b/internal/schema/plugin_admin_schema.go
index 56a57c51..0aae68e1 100644
--- a/internal/schema/plugin_admin_schema.go
+++ b/internal/schema/plugin_admin_schema.go
@@ -24,6 +24,7 @@ type GetPluginListResp struct {
Version string `json:"version"`
Enabled bool `json:"enabled"`
HaveConfig bool `json:"have_config"`
+ Link string `json:"link"`
}
type UpdatePluginStatusReq struct {
diff --git a/plugin/base.go b/plugin/base.go
index 4f1d3c0d..459863b4 100644
--- a/plugin/base.go
+++ b/plugin/base.go
@@ -7,6 +7,7 @@ type Info struct {
Description Translator
Author string
Version string
+ Link string
}
// Base is the base plugin