mirror of
https://github.com/grafana/grafana.git
synced 2025-01-24 15:27:01 -06:00
55c7b8add2
* RBAC: Rename interface to Store * RBAC: Move ranme scopeInjector * RBAC: Rename files to service * RBAC: Rename to service * RBAC: Split up accesscontrol into two components * RBAC: Add DeclareFixedRoles to AccessControl interface * Wire: Fix wire bindings * RBAC: Move resolvers to root * RBAC: Remove invalid test * RBAC: Inject access control service * RBAC: Implement the RoleRegistry interface in fake
30 lines
757 B
Go
30 lines
757 B
Go
package usagestatssvcs
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/registry"
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
"github.com/grafana/grafana/pkg/services/thumbs"
|
|
)
|
|
|
|
func ProvideUsageStatsProvidersRegistry(
|
|
thumbsService thumbs.Service,
|
|
accesscontrol accesscontrol.Service,
|
|
) *UsageStatsProvidersRegistry {
|
|
return NewUsageStatsProvidersRegistry(
|
|
thumbsService,
|
|
accesscontrol,
|
|
)
|
|
}
|
|
|
|
type UsageStatsProvidersRegistry struct {
|
|
Services []registry.ProvidesUsageStats
|
|
}
|
|
|
|
func NewUsageStatsProvidersRegistry(services ...registry.ProvidesUsageStats) *UsageStatsProvidersRegistry {
|
|
return &UsageStatsProvidersRegistry{services}
|
|
}
|
|
|
|
func (r *UsageStatsProvidersRegistry) GetServices() []registry.ProvidesUsageStats {
|
|
return r.Services
|
|
}
|