mirror of
https://github.com/grafana/grafana.git
synced 2026-08-13 06:34:55 -05:00
Plugins: Add simple plugin sources service (#63814)
add simple plugin sources svc
This commit is contained in:
@@ -350,3 +350,14 @@ func NewFakeRoleRegistry() *FakeRoleRegistry {
|
||||
func (f *FakeRoleRegistry) DeclarePluginRoles(_ context.Context, _ string, _ string, _ []plugins.RoleRegistration) error {
|
||||
return f.ExpectedErr
|
||||
}
|
||||
|
||||
type FakeSources struct {
|
||||
ListFunc func(_ context.Context) []plugins.PluginSource
|
||||
}
|
||||
|
||||
func (s *FakeSources) List(ctx context.Context) []plugins.PluginSource {
|
||||
if s.ListFunc != nil {
|
||||
return s.ListFunc(ctx)
|
||||
}
|
||||
return []plugins.PluginSource{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user