github.com/haalcala/mattermost-server-change-repo@v0.0.0-20210713015153-16753fbeee5f/services/searchengine/interface.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package searchengine 5 6 import ( 7 "time" 8 9 "github.com/mattermost/mattermost-server/v5/model" 10 ) 11 12 type SearchEngineInterface interface { 13 Start() *model.AppError 14 Stop() *model.AppError 15 GetFullVersion() string 16 GetVersion() int 17 GetPlugins() []string 18 UpdateConfig(cfg *model.Config) 19 GetName() string 20 IsActive() bool 21 IsIndexingEnabled() bool 22 IsSearchEnabled() bool 23 IsAutocompletionEnabled() bool 24 IsIndexingSync() bool 25 IndexPost(post *model.Post, teamId string) *model.AppError 26 SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, model.PostSearchMatches, *model.AppError) 27 DeletePost(post *model.Post) *model.AppError 28 DeleteChannelPosts(channelID string) *model.AppError 29 DeleteUserPosts(userID string) *model.AppError 30 IndexChannel(channel *model.Channel) *model.AppError 31 SearchChannels(teamId, term string) ([]string, *model.AppError) 32 DeleteChannel(channel *model.Channel) *model.AppError 33 IndexUser(user *model.User, teamsIds, channelsIds []string) *model.AppError 34 SearchUsersInChannel(teamId, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) 35 SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError) 36 DeleteUser(user *model.User) *model.AppError 37 IndexFile(file *model.FileInfo, channelId string) *model.AppError 38 SearchFiles(channels *model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, *model.AppError) 39 DeleteFile(fileID string) *model.AppError 40 DeletePostFiles(postID string) *model.AppError 41 DeleteUserFiles(userID string) *model.AppError 42 DeleteFilesBatch(endTime, limit int64) *model.AppError 43 TestConfig(cfg *model.Config) *model.AppError 44 PurgeIndexes() *model.AppError 45 RefreshIndexes() *model.AppError 46 DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError 47 }