Versions in this module Expand all Collapse all v5 v5.31.1 Dec 23, 2020 Changes in this version + const DEFAULT_SERVER_BUSY_SECONDS + const EMOJI_MAX_AUTOCOMPLETE_ITEMS + const FILE_TEAM_ID + const MAXIMUM_BULK_IMPORT_SIZE + const MAXIMUM_PLUGIN_FILE_SIZE + const MAX_ADD_MEMBERS_BATCH + const MAX_SERVER_BUSY_SECONDS + const OPEN_GRAPH_METADATA_CACHE_SIZE + const PREVIEW_IMAGE_TYPE + const REDIRECT_LOCATION_CACHE_SIZE + const THUMBNAIL_IMAGE_TYPE + var MEDIA_CONTENT_TYPES = [...]string + var ReturnStatusOK = web.ReturnStatusOK + var UNSAFE_CONTENT_TYPES = [...]string + func CheckBadRequestStatus(t *testing.T, resp *model.Response) + func CheckCreatedStatus(t *testing.T, resp *model.Response) + func CheckErrorMessage(t *testing.T, resp *model.Response, errorId string) + func CheckEtag(t *testing.T, data interface{}, resp *model.Response) + func CheckForbiddenStatus(t *testing.T, resp *model.Response) + func CheckInternalErrorStatus(t *testing.T, resp *model.Response) + func CheckNoError(t *testing.T, resp *model.Response) + func CheckNotFoundStatus(t *testing.T, resp *model.Response) + func CheckNotImplementedStatus(t *testing.T, resp *model.Response) + func CheckOKStatus(t *testing.T, resp *model.Response) + func CheckRequestEntityTooLargeStatus(t *testing.T, resp *model.Response) + func CheckServiceUnavailableStatus(t *testing.T, resp *model.Response) + func CheckStartsWith(t *testing.T, value, prefix, message string) + func CheckUnauthorizedStatus(t *testing.T, resp *model.Response) + func CheckUserSanitization(t *testing.T, user *model.User) + func GenerateTestAppName() string + func GenerateTestChannelName() string + func GenerateTestId() string + func GenerateTestTeamName() string + func GenerateTestUsername() string + func Logout(c *Context, w http.ResponseWriter, r *http.Request) + func SetMainHelper(mh *testlib.MainHelper) + type API struct + BaseRoutes *Routes + ConfigService configservice.ConfigService + GetGlobalAppOptions app.AppOptionCreator + func Init(configservice configservice.ConfigService, ...) *API + func InitLocal(configservice configservice.ConfigService, ...) *API + func (api *API) ApiHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) ApiHandlerTrustRequester(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) ApiLocal(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) ApiSessionRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) ApiSessionRequiredDisableWhenBusy(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) ApiSessionRequiredMfa(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) ApiSessionRequiredTrustRequester(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) CloudApiKeyRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (api *API) Handle404(w http.ResponseWriter, r *http.Request) + func (api *API) InitAction() + func (api *API) InitBleve() + func (api *API) InitBot() + func (api *API) InitBotLocal() + func (api *API) InitBrand() + func (api *API) InitChannel() + func (api *API) InitChannelLocal() + func (api *API) InitCloud() + func (api *API) InitCluster() + func (api *API) InitCommand() + func (api *API) InitCommandLocal() + func (api *API) InitCompliance() + func (api *API) InitConfig() + func (api *API) InitConfigLocal() + func (api *API) InitDataRetention() + func (api *API) InitElasticsearch() + func (api *API) InitEmoji() + func (api *API) InitFile() + func (api *API) InitGroup() + func (api *API) InitGroupLocal() + func (api *API) InitImage() + func (api *API) InitImport() + func (api *API) InitImportLocal() + func (api *API) InitJob() + func (api *API) InitJobLocal() + func (api *API) InitLdap() + func (api *API) InitLdapLocal() + func (api *API) InitLicense() + func (api *API) InitLicenseLocal() + func (api *API) InitOAuth() + func (api *API) InitOpenGraph() + func (api *API) InitPlugin() + func (api *API) InitPluginLocal() + func (api *API) InitPost() + func (api *API) InitPostLocal() + func (api *API) InitPreference() + func (api *API) InitReaction() + func (api *API) InitRole() + func (api *API) InitRoleLocal() + func (api *API) InitSaml() + func (api *API) InitScheme() + func (api *API) InitStatus() + func (api *API) InitSystem() + func (api *API) InitSystemLocal() + func (api *API) InitTeam() + func (api *API) InitTeamLocal() + func (api *API) InitTermsOfService() + func (api *API) InitUpload() + func (api *API) InitUploadLocal() + func (api *API) InitUser() + func (api *API) InitUserLocal() + func (api *API) InitWebSocket() + func (api *API) InitWebhook() + func (api *API) InitWebhookLocal() + type Context = web.Context + type Routes struct + ApiRoot *mux.Router + Bleve *mux.Router + Bot *mux.Router + Bots *mux.Router + Brand *mux.Router + Channel *mux.Router + ChannelByName *mux.Router + ChannelByNameForTeamName *mux.Router + ChannelCategories *mux.Router + ChannelForUser *mux.Router + ChannelMember *mux.Router + ChannelMembers *mux.Router + ChannelMembersForUser *mux.Router + ChannelModerations *mux.Router + Channels *mux.Router + ChannelsForTeam *mux.Router + Cloud *mux.Router + Cluster *mux.Router + Command *mux.Router + Commands *mux.Router + Compliance *mux.Router + DataRetention *mux.Router + Elasticsearch *mux.Router + Emoji *mux.Router + EmojiByName *mux.Router + Emojis *mux.Router + File *mux.Router + Files *mux.Router + Groups *mux.Router + Hooks *mux.Router + Image *mux.Router + Imports *mux.Router + IncomingHook *mux.Router + IncomingHooks *mux.Router + Jobs *mux.Router + LDAP *mux.Router + License *mux.Router + OAuth *mux.Router + OAuthApp *mux.Router + OAuthApps *mux.Router + OpenGraph *mux.Router + OutgoingHook *mux.Router + OutgoingHooks *mux.Router + Plugin *mux.Router + Plugins *mux.Router + Post *mux.Router + PostForUser *mux.Router + Posts *mux.Router + PostsForChannel *mux.Router + PostsForUser *mux.Router + Preferences *mux.Router + Public *mux.Router + PublicFile *mux.Router + ReactionByNameForPostForUser *mux.Router + Reactions *mux.Router + Roles *mux.Router + Root *mux.Router + SAML *mux.Router + Schemes *mux.Router + System *mux.Router + Team *mux.Router + TeamByName *mux.Router + TeamForUser *mux.Router + TeamMember *mux.Router + TeamMembers *mux.Router + TeamMembersForUser *mux.Router + Teams *mux.Router + TeamsForUser *mux.Router + TermsOfService *mux.Router + Upload *mux.Router + Uploads *mux.Router + User *mux.Router + UserByEmail *mux.Router + UserByUsername *mux.Router + UserThread *mux.Router + UserThreads *mux.Router + Users *mux.Router + type TestHelper struct + App *app.App + BasicChannel *model.Channel + BasicChannel2 *model.Channel + BasicDeletedChannel *model.Channel + BasicPost *model.Post + BasicPrivateChannel *model.Channel + BasicPrivateChannel2 *model.Channel + BasicTeam *model.Team + BasicUser *model.User + BasicUser2 *model.User + Client *model.Client4 + ConfigStore *config.Store + Group *model.Group + IncludeCacheLayer bool + LocalClient *model.Client4 + Server *app.Server + SystemAdminClient *model.Client4 + SystemAdminUser *model.User + TeamAdminUser *model.User + func Setup(tb testing.TB) *TestHelper + func SetupConfig(tb testing.TB, updateConfig func(cfg *model.Config)) *TestHelper + func SetupConfigWithStoreMock(tb testing.TB, updateConfig func(cfg *model.Config)) *TestHelper + func SetupEnterprise(tb testing.TB) *TestHelper + func SetupEnterpriseWithStoreMock(tb testing.TB) *TestHelper + func SetupWithStoreMock(tb testing.TB) *TestHelper + func (th *TestHelper) AddPermissionToRole(permission string, roleName string) + func (th *TestHelper) AddUserToChannel(user *model.User, channel *model.Channel) *model.ChannelMember + func (th *TestHelper) CreateBotWithClient(client *model.Client4) *model.Bot + func (th *TestHelper) CreateBotWithSystemAdminClient() *model.Bot + func (th *TestHelper) CreateChannelWithClient(client *model.Client4, channelType string) *model.Channel + func (th *TestHelper) CreateChannelWithClientAndTeam(client *model.Client4, channelType string, teamId string) *model.Channel + func (th *TestHelper) CreateClient() *model.Client4 + func (th *TestHelper) CreateDmChannel(user *model.User) *model.Channel + func (th *TestHelper) CreateGroup() *model.Group + func (th *TestHelper) CreateLocalClient(socketPath string) *model.Client4 + func (th *TestHelper) CreateMessagePost(message string) *model.Post + func (th *TestHelper) CreateMessagePostNoClient(channel *model.Channel, message string, createAtTime int64) *model.Post + func (th *TestHelper) CreateMessagePostWithClient(client *model.Client4, channel *model.Channel, message string) *model.Post + func (th *TestHelper) CreatePinnedPost() *model.Post + func (th *TestHelper) CreatePinnedPostWithClient(client *model.Client4, channel *model.Channel) *model.Post + func (th *TestHelper) CreatePost() *model.Post + func (th *TestHelper) CreatePostWithClient(client *model.Client4, channel *model.Channel) *model.Post + func (th *TestHelper) CreatePrivateChannel() *model.Channel + func (th *TestHelper) CreatePublicChannel() *model.Channel + func (th *TestHelper) CreateTeam() *model.Team + func (th *TestHelper) CreateTeamWithClient(client *model.Client4) *model.Team + func (th *TestHelper) CreateUser() *model.User + func (th *TestHelper) CreateUserWithClient(client *model.Client4) *model.User + func (th *TestHelper) CreateWebSocketClient() (*model.WebSocketClient, *model.AppError) + func (th *TestHelper) CreateWebSocketClientWithClient(client *model.Client4) (*model.WebSocketClient, *model.AppError) + func (th *TestHelper) CreateWebSocketSystemAdminClient() (*model.WebSocketClient, *model.AppError) + func (th *TestHelper) GenerateTestEmail() string + func (th *TestHelper) InitBasic() *TestHelper + func (th *TestHelper) InitLogin() *TestHelper + func (th *TestHelper) LinkUserToTeam(user *model.User, team *model.Team) + func (th *TestHelper) LoginBasic() + func (th *TestHelper) LoginBasic2() + func (th *TestHelper) LoginBasic2WithClient(client *model.Client4) + func (th *TestHelper) LoginBasicWithClient(client *model.Client4) + func (th *TestHelper) LoginSystemAdmin() + func (th *TestHelper) LoginSystemAdminWithClient(client *model.Client4) + func (th *TestHelper) LoginTeamAdmin() + func (th *TestHelper) LoginTeamAdminWithClient(client *model.Client4) + func (th *TestHelper) MakeUserChannelAdmin(user *model.User, channel *model.Channel) + func (th *TestHelper) RemovePermissionFromRole(permission string, roleName string) + func (th *TestHelper) RestoreDefaultRolePermissions(data map[string][]string) + func (th *TestHelper) SaveDefaultRolePermissions() map[string][]string + func (th *TestHelper) SetupChannelScheme() *model.Scheme + func (th *TestHelper) SetupScheme(scope string) *model.Scheme + func (th *TestHelper) SetupTeamScheme() *model.Scheme + func (th *TestHelper) ShutdownApp() + func (th *TestHelper) TearDown() + func (th *TestHelper) TestForAllClients(t *testing.T, f func(*testing.T, *model.Client4), name ...string) + func (th *TestHelper) TestForSystemAdminAndLocal(t *testing.T, f func(*testing.T, *model.Client4), name ...string) + func (th *TestHelper) UpdateActiveUser(user *model.User, active bool) + func (th *TestHelper) UpdateUserToNonTeamAdmin(user *model.User, team *model.Team) + func (th *TestHelper) UpdateUserToTeamAdmin(user *model.User, team *model.Team) Other modules containing this package github.com/adacta-ru/mattermost-server github.com/adacta-ru/mattermost-server/v6