This is an automated email from the ASF dual-hosted git repository.

bzp2010 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 29e3084  feat: add GetPlugin interface (#2158)
29e3084 is described below

commit 29e3084127e701d7a5b28da8cf64711f7a052f4e
Author: bzp2010 <[email protected]>
AuthorDate: Fri Oct 8 21:01:36 2021 -0500

    feat: add GetPlugin interface (#2158)
---
 api/internal/core/entity/interface.go | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/api/internal/core/entity/interface.go 
b/api/internal/core/entity/interface.go
index d38978b..ea34fc6 100644
--- a/api/internal/core/entity/interface.go
+++ b/api/internal/core/entity/interface.go
@@ -19,3 +19,27 @@ package entity
 type GetBaseInfo interface {
        GetBaseInfo() *BaseInfo
 }
+
+type GetPlugins interface {
+       GetPlugins() map[string]interface{}
+}
+
+func (r *Route) GetPlugins() map[string]interface{} {
+       return r.Plugins
+}
+
+func (s *Service) GetPlugins() map[string]interface{} {
+       return s.Plugins
+}
+
+func (c *Consumer) GetPlugins() map[string]interface{} {
+       return c.Plugins
+}
+
+func (g *GlobalPlugins) GetPlugins() map[string]interface{} {
+       return g.Plugins
+}
+
+func (p *PluginConfig) GetPlugins() map[string]interface{} {
+       return p.Plugins
+}

Reply via email to