summaryrefslogtreecommitdiffstats
path: root/app/elasticsearch.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-09-19 18:31:35 -0500
committerGitHub <noreply@github.com>2017-09-19 18:31:35 -0500
commitac74066f0e4f3d62f2d4645c3fa34b88c13958d1 (patch)
tree9e1cb80eae1b4a2e9dcc2272744c4a9db1b4b804 /app/elasticsearch.go
parent7e4ff6adcccc4cc5a8fb8cfa853417ec52bf78f4 (diff)
downloadchat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.tar.gz
chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.tar.bz2
chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.zip
remove einterface gets (#7455)
Diffstat (limited to 'app/elasticsearch.go')
-rw-r--r--app/elasticsearch.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/elasticsearch.go b/app/elasticsearch.go
index 96e271272..71fe6cedb 100644
--- a/app/elasticsearch.go
+++ b/app/elasticsearch.go
@@ -6,12 +6,11 @@ package app
import (
"net/http"
- "github.com/mattermost/mattermost-server/einterfaces"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
-func TestElasticsearch(cfg *model.Config) *model.AppError {
+func (a *App) TestElasticsearch(cfg *model.Config) *model.AppError {
if *cfg.ElasticsearchSettings.Password == model.FAKE_SETTING {
if *cfg.ElasticsearchSettings.ConnectionUrl == *utils.Cfg.ElasticsearchSettings.ConnectionUrl && *cfg.ElasticsearchSettings.Username == *utils.Cfg.ElasticsearchSettings.Username {
*cfg.ElasticsearchSettings.Password = *utils.Cfg.ElasticsearchSettings.Password
@@ -20,7 +19,7 @@ func TestElasticsearch(cfg *model.Config) *model.AppError {
}
}
- if esI := einterfaces.GetElasticsearchInterface(); esI != nil {
+ if esI := a.Elasticsearch; esI != nil {
if err := esI.TestConfig(cfg); err != nil {
return err
}
@@ -32,8 +31,8 @@ func TestElasticsearch(cfg *model.Config) *model.AppError {
return nil
}
-func PurgeElasticsearchIndexes() *model.AppError {
- if esI := einterfaces.GetElasticsearchInterface(); esI != nil {
+func (a *App) PurgeElasticsearchIndexes() *model.AppError {
+ if esI := a.Elasticsearch; esI != nil {
if err := esI.PurgeIndexes(); err != nil {
return err
}