github.com/kongr45gpen/mattermost-server@v5.11.1+incompatible/einterfaces/elasticsearch.go (about) 1 // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package einterfaces 5 6 import ( 7 "time" 8 9 "github.com/mattermost/mattermost-server/model" 10 ) 11 12 type ElasticsearchInterface interface { 13 Start() *model.AppError 14 Stop() *model.AppError 15 IndexPost(post *model.Post, teamId string) *model.AppError 16 SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, model.PostSearchMatches, *model.AppError) 17 DeletePost(post *model.Post) *model.AppError 18 IndexChannel(channel *model.Channel) *model.AppError 19 SearchChannels(teamId, term string) ([]string, *model.AppError) 20 DeleteChannel(channel *model.Channel) *model.AppError 21 IndexUser(user *model.User, teamsIds, channelsIds []string) *model.AppError 22 SearchUsersInChannel(teamId, channelId, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) 23 SearchUsersInTeam(teamId, term string, options *model.UserSearchOptions) ([]string, *model.AppError) 24 DeleteUser(user *model.User) *model.AppError 25 TestConfig(cfg *model.Config) *model.AppError 26 PurgeIndexes() *model.AppError 27 DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError 28 }