diff options
Diffstat (limited to 'einterfaces')
-rw-r--r-- | einterfaces/elasticsearch.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/einterfaces/elasticsearch.go b/einterfaces/elasticsearch.go new file mode 100644 index 000000000..61e1d532f --- /dev/null +++ b/einterfaces/elasticsearch.go @@ -0,0 +1,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 +} |