summaryrefslogtreecommitdiffstats
path: root/app/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/app.go')
-rw-r--r--app/app.go30
1 files changed, 28 insertions, 2 deletions
diff --git a/app/app.go b/app/app.go
index 4be897f59..49ac620e8 100644
--- a/app/app.go
+++ b/app/app.go
@@ -43,6 +43,7 @@ type App struct {
Compliance einterfaces.ComplianceInterface
DataRetention einterfaces.DataRetentionInterface
Elasticsearch einterfaces.ElasticsearchInterface
+ Emoji einterfaces.EmojiInterface
Ldap einterfaces.LdapInterface
Metrics einterfaces.MetricsInterface
Mfa einterfaces.MfaInterface
@@ -133,6 +134,12 @@ func RegisterAccountMigrationInterface(f func(*App) einterfaces.AccountMigration
accountMigrationInterface = f
}
+var brandInterface func(*App) einterfaces.BrandInterface
+
+func RegisterBrandInterface(f func(*App) einterfaces.BrandInterface) {
+ brandInterface = f
+}
+
var clusterInterface func(*App) einterfaces.ClusterInterface
func RegisterClusterInterface(f func(*App) einterfaces.ClusterInterface) {
@@ -151,6 +158,18 @@ func RegisterDataRetentionInterface(f func(*App) einterfaces.DataRetentionInterf
dataRetentionInterface = f
}
+var elasticsearchInterface func(*App) einterfaces.ElasticsearchInterface
+
+func RegisterElasticsearchInterface(f func(*App) einterfaces.ElasticsearchInterface) {
+ elasticsearchInterface = f
+}
+
+var emojiInterface func(*App) einterfaces.EmojiInterface
+
+func RegisterEmojiInterface(f func(*App) einterfaces.EmojiInterface) {
+ emojiInterface = f
+}
+
var jobsDataRetentionJobInterface func(*App) ejobs.DataRetentionJobInterface
func RegisterJobsDataRetentionJobInterface(f func(*App) ejobs.DataRetentionJobInterface) {
@@ -203,14 +222,21 @@ func (a *App) initEnterprise() {
if accountMigrationInterface != nil {
a.AccountMigration = accountMigrationInterface(a)
}
- a.Brand = einterfaces.GetBrandInterface()
+ if brandInterface != nil {
+ a.Brand = brandInterface(a)
+ }
if clusterInterface != nil {
a.Cluster = clusterInterface(a)
}
if complianceInterface != nil {
a.Compliance = complianceInterface(a)
}
- a.Elasticsearch = einterfaces.GetElasticsearchInterface()
+ if elasticsearchInterface != nil {
+ a.Elasticsearch = elasticsearchInterface(a)
+ }
+ if emojiInterface != nil {
+ a.Emoji = emojiInterface(a)
+ }
if ldapInterface != nil {
a.Ldap = ldapInterface(a)
utils.AddConfigListener(func(_, cfg *model.Config) {