summaryrefslogtreecommitdiffstats
path: root/einterfaces/elasticsearch.go
blob: 61e1d532f683341b6dabd37b684261a8b04e17d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// 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)
}

var theElasticSearchInterface ElasticSearchInterface

func RegisterElasticSearchInterface(newInterface ElasticSearchInterface) {
	theElasticSearchInterface = newInterface
}

func GetElasticSearchInterface() ElasticSearchInterface {
	return theElasticSearchInterface
}