remove einterface gets (#7455)
Этот коммит содержится в:
28
app/app.go
28
app/app.go
@@ -6,19 +6,45 @@ package app
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/mattermost/mattermost-server/einterfaces"
|
||||
"github.com/mattermost/mattermost-server/plugin/pluginenv"
|
||||
)
|
||||
|
||||
type App struct {
|
||||
Srv *Server
|
||||
Srv *Server
|
||||
|
||||
PluginEnv *pluginenv.Environment
|
||||
PluginConfigListenerId string
|
||||
|
||||
AccountMigration einterfaces.AccountMigrationInterface
|
||||
Brand einterfaces.BrandInterface
|
||||
Cluster einterfaces.ClusterInterface
|
||||
Compliance einterfaces.ComplianceInterface
|
||||
Elasticsearch einterfaces.ElasticsearchInterface
|
||||
Ldap einterfaces.LdapInterface
|
||||
Metrics einterfaces.MetricsInterface
|
||||
Mfa einterfaces.MfaInterface
|
||||
Saml einterfaces.SamlInterface
|
||||
}
|
||||
|
||||
var globalApp App
|
||||
|
||||
var initEnterprise sync.Once
|
||||
|
||||
func Global() *App {
|
||||
initEnterprise.Do(func() {
|
||||
globalApp.AccountMigration = einterfaces.GetAccountMigrationInterface()
|
||||
globalApp.Brand = einterfaces.GetBrandInterface()
|
||||
globalApp.Cluster = einterfaces.GetClusterInterface()
|
||||
globalApp.Compliance = einterfaces.GetComplianceInterface()
|
||||
globalApp.Elasticsearch = einterfaces.GetElasticsearchInterface()
|
||||
globalApp.Ldap = einterfaces.GetLdapInterface()
|
||||
globalApp.Metrics = einterfaces.GetMetricsInterface()
|
||||
globalApp.Mfa = einterfaces.GetMfaInterface()
|
||||
globalApp.Saml = einterfaces.GetSamlInterface()
|
||||
})
|
||||
return &globalApp
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user