summaryrefslogtreecommitdiffstats
path: root/einterfaces/elasticsearch.go
blob: af89b38a56511c0e69f2da92589dbf3f878c48a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package einterfaces

import "github.com/mattermost/platform/model"

type ElasticSearchInterface interface {
	Start() *model.AppError
	IndexPost(post *model.Post, teamId string)
	SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams) ([]string, *model.AppError)
	DeletePost(postId string)
	TestConfig() *model.AppError
}

var theElasticSearchInterface ElasticSearchInterface

func RegisterElasticSearchInterface(newInterface ElasticSearchInterface) {
	theElasticSearchInterface = newInterface
}

func GetElasticSearchInterface() ElasticSearchInterface {
	return theElasticSearchInterface
}