Skip to content

Commit

Permalink
feat: add GetPlugin interface (#2158)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 authored Oct 9, 2021
1 parent 49224ef commit 29e3084
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions api/internal/core/entity/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 29e3084

Please sign in to comment.