summaryrefslogtreecommitdiffstats
path: root/app/app.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-11-16 15:04:27 -0600
committerJonathan <jonfritz@gmail.com>2017-11-16 16:04:27 -0500
commiteb1a00ef5f93b19c2d49b26de057ee2c51c09e45 (patch)
treee63afa695283e15c5cd9ee2a437d74024dcc5c20 /app/app.go
parentef69d93abfb192bc7a2416f3cf2622d99fd27dd5 (diff)
downloadchat-eb1a00ef5f93b19c2d49b26de057ee2c51c09e45.tar.gz
chat-eb1a00ef5f93b19c2d49b26de057ee2c51c09e45.tar.bz2
chat-eb1a00ef5f93b19c2d49b26de057ee2c51c09e45.zip
Reorganize file util functionality (#7848)
* reorganize file util functionality * fix api test compilation * fix rebase issue
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) {