Documentation ¶
Index ¶
- Constants
- Variables
- func ActivateMfa(userId, token string) *model.AppError
- func ActivatePlugins()
- func AddChannelMember(userId string, channel *model.Channel, userRequestorId string) (*model.ChannelMember, *model.AppError)
- func AddDirectChannels(teamId string, user *model.User) *model.AppError
- func AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError
- func AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError
- func AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
- func AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError
- func AddSessionToCache(session *model.Session)
- func AddStatusCache(status *model.Status)
- func AddStatusCacheSkipClusterSend(status *model.Status)
- func AddTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
- func AddTeamMemberByHash(userId, hash, data string) (*model.TeamMember, *model.AppError)
- func AddTeamMemberByInviteId(inviteId, userId string) (*model.TeamMember, *model.AppError)
- func AddTeamMembers(teamId string, userIds []string, userRequestorId string) ([]*model.TeamMember, *model.AppError)
- func AddUserToChannel(user *model.User, channel *model.Channel) (*model.ChannelMember, *model.AppError)
- func AddUserToTeam(teamId string, userId string, userRequestorId string) (*model.Team, *model.AppError)
- func AddUserToTeamByHash(userId string, hash string, data string) (*model.Team, *model.AppError)
- func AddUserToTeamByInviteId(inviteId string, userId string) (*model.Team, *model.AppError)
- func AddUserToTeamByTeamId(teamId string, user *model.User) *model.AppError
- func AllowOAuthAppAccessToUser(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
- func AttachDeviceId(sessionId string, deviceId string, expiresAt int64) *model.AppError
- func AuthenticateUserForLogin(id, loginId, password, mfaToken, deviceId string, ldapOnly bool) (*model.User, *model.AppError)
- func AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, ...) (io.ReadCloser, string, map[string]string, *model.AppError)
- func AutocompleteUsersInChannel(teamId string, channelId string, term string, searchOptions map[string]bool, ...) (*model.UserAutocompleteInChannel, *model.AppError)
- func AutocompleteUsersInTeam(teamId string, term string, searchOptions map[string]bool, asAdmin bool) (*model.UserAutocompleteInTeam, *model.AppError)
- func BroadcastStatus(status *model.Status)
- func BulkImport(fileReader io.Reader, dryRun bool, workers int) (*model.AppError, int)
- func CancelJob(jobId string) *model.AppError
- func CheckIfRolesGrantPermission(roles []string, permissionId string) bool
- func CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError
- func CheckUserAdditionalAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError
- func CheckUserDomain(user *model.User, domains string) bool
- func CheckUserMfa(user *model.User, token string) *model.AppError
- func ClearPushNotification(userId string, channelId string) *model.AppError
- func ClearSessionCacheForUser(userId string)
- func ClearSessionCacheForUserSkipClusterSend(userId string)
- func ClearStatusCache()
- func CloseBody(r *http.Response)
- func ClusterClearSessionCacheForUserHandler(msg *model.ClusterMessage)
- func ClusterInvalidateAllCachesHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForChannelByNameHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForChannelHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForChannelMembersHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForChannelMembersNotifyPropHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForChannelPostsHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForUserHandler(msg *model.ClusterMessage)
- func ClusterInvalidateCacheForWebhookHandler(msg *model.ClusterMessage)
- func ClusterPublishHandler(msg *model.ClusterMessage)
- func ClusterUpdateStatusHandler(msg *model.ClusterMessage)
- func CompleteOAuth(service string, body io.ReadCloser, teamId string, props map[string]string) (*model.User, *model.AppError)
- func CompleteSwitchWithOAuth(service string, userData io.ReadCloser, email string) (*model.User, *model.AppError)
- func CreateBasicUser(client *model.Client) *model.AppError
- func CreateChannel(channel *model.Channel, addMember bool) (*model.Channel, *model.AppError)
- func CreateChannelWithUser(channel *model.Channel, userId string) (*model.Channel, *model.AppError)
- func CreateCommand(cmd *model.Command) (*model.Command, *model.AppError)
- func CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse) (*model.Post, *model.AppError)
- func CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
- func CreateDefaultChannels(teamId string) ([]*model.Channel, *model.AppError)
- func CreateDirectChannel(userId string, otherUserId string) (*model.Channel, *model.AppError)
- func CreateEmoji(sessionUserId string, emoji *model.Emoji, multiPartImageData *multipart.Form) (*model.Emoji, *model.AppError)
- func CreateGroupChannel(userIds []string, creatorId string) (*model.Channel, *model.AppError)
- func CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
- func CreateJob(job *model.Job) (*model.Job, *model.AppError)
- func CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- func CreateOAuthStateToken(extra string) (*model.Token, *model.AppError)
- func CreateOAuthUser(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)
- func CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func CreatePasswordRecoveryToken(userId string) (*model.Token, *model.AppError)
- func CreatePost(post *model.Post, channel *model.Channel, triggerWebhooks bool) (*model.Post, *model.AppError)
- func CreatePostAsUser(post *model.Post) (*model.Post, *model.AppError)
- func CreatePostMissingChannel(post *model.Post, triggerWebhooks bool) (*model.Post, *model.AppError)
- func CreateProfileImage(username string, userId string) ([]byte, *model.AppError)
- func CreateSession(session *model.Session) (*model.Session, *model.AppError)
- func CreateTeam(team *model.Team) (*model.Team, *model.AppError)
- func CreateTeamWithUser(team *model.Team, userId string) (*model.Team, *model.AppError)
- func CreateUser(user *model.User) (*model.User, *model.AppError)
- func CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
- func CreateUserAsAdmin(user *model.User) (*model.User, *model.AppError)
- func CreateUserFromSignup(user *model.User) (*model.User, *model.AppError)
- func CreateUserWithHash(user *model.User, hash string, data string) (*model.User, *model.AppError)
- func CreateUserWithInviteId(user *model.User, inviteId string) (*model.User, *model.AppError)
- func CreateVerifyEmailToken(userId string) (*model.Token, *model.AppError)
- func CreateWebhookPost(userId string, channel *model.Channel, ...) (*model.Post, *model.AppError)
- func DeactivateMfa(userId string) *model.AppError
- func DeauthorizeOAuthAppForUser(userId, appId string) *model.AppError
- func DeleteChannel(channel *model.Channel, userId string) *model.AppError
- func DeleteCommand(commandId string) *model.AppError
- func DeleteEmoji(emoji *model.Emoji) *model.AppError
- func DeleteFlaggedPosts(postId string)
- func DeleteIncomingWebhook(hookId string) *model.AppError
- func DeleteOAuthApp(appId string) *model.AppError
- func DeleteOutgoingWebhook(hookId string) *model.AppError
- func DeletePost(postId string) (*model.Post, *model.AppError)
- func DeletePostFiles(post *model.Post)
- func DeletePreferences(userId string, preferences model.Preferences) *model.AppError
- func DeleteReactionForPost(reaction *model.Reaction) *model.AppError
- func DeleteToken(token *model.Token) *model.AppError
- func DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId string) (*model.Session, *model.AppError)
- func DoPostAction(postId string, actionId string, userId string) *model.AppError
- func DoSecurityUpdateCheck()
- func DoUploadFile(now time.Time, teamId string, channelId string, userId string, ...) (*model.FileInfo, *model.AppError)
- func DoesNotifyPropsAllowPushNotification(user *model.User, channelNotifyProps model.StringMap, post *model.Post, ...) bool
- func DoesStatusAllowPushNotification(userNotifyProps model.StringMap, status *model.Status, channelId string) bool
- func ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
- func FindTeamByName(name string) bool
- func FindTeamIdForFilename(post *model.Post, filename string) string
- func GenerateMfaSecret(userId string) (*model.MfaSecret, *model.AppError)
- func GeneratePublicLink(siteURL string, info *model.FileInfo) string
- func GeneratePublicLinkHash(fileId, salt string) string
- func GeneratePublicLinkV3(siteURL string, info *model.FileInfo) string
- func GenerateTurnPassword(username string, secret string) string
- func GetActivePluginManifests() ([]*model.Manifest, *model.AppError)
- func GetAllOpenTeams() ([]*model.Team, *model.AppError)
- func GetAllOpenTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError)
- func GetAllStatuses() map[string]*model.Status
- func GetAllTeams() ([]*model.Team, *model.AppError)
- func GetAllTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError)
- func GetAnalytics(name string, teamId string) (model.AnalyticsRows, *model.AppError)
- func GetAudits(userId string, limit int) (model.Audits, *model.AppError)
- func GetAuditsPage(userId string, page int, perPage int) (model.Audits, *model.AppError)
- func GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, ...) (string, *model.AppError)
- func GetAuthorizedAppsForUser(userId string, page, perPage int) ([]*model.OAuthApp, *model.AppError)
- func GetBrandImage() ([]byte, *model.AppError)
- func GetChannel(channelId string) (*model.Channel, *model.AppError)
- func GetChannelByName(channelName, teamId string) (*model.Channel, *model.AppError)
- func GetChannelByNameForTeamName(channelName, teamName string) (*model.Channel, *model.AppError)
- func GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError)
- func GetChannelMember(channelId string, userId string) (*model.ChannelMember, *model.AppError)
- func GetChannelMemberCount(channelId string) (int64, *model.AppError)
- func GetChannelMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError)
- func GetChannelMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError)
- func GetChannelMembersPage(channelId string, page, perPage int) (*model.ChannelMembers, *model.AppError)
- func GetChannelUnread(channelId, userId string) (*model.ChannelUnread, *model.AppError)
- func GetChannelsForUser(teamId string, userId string) (*model.ChannelList, *model.AppError)
- func GetChannelsUserNotIn(teamId string, userId string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func GetClusterStatus() []*model.ClusterInfo
- func GetCommand(commandId string) (*model.Command, *model.AppError)
- func GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError)
- func GetComplianceReport(reportId string) (*model.Compliance, *model.AppError)
- func GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError)
- func GetConfig() *model.Config
- func GetDeletedChannels(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)
- func GetEmoji(emojiId string) (*model.Emoji, *model.AppError)
- func GetEmojiImage(emojiId string) (imageByte []byte, imageType string, err *model.AppError)
- func GetEmojiList(page, perPage int) ([]*model.Emoji, *model.AppError)
- func GetExplicitMentions(message string, keywords map[string][]string) (map[string]bool, []string, bool, bool, bool)
- func GetFileInfo(fileId string) (*model.FileInfo, *model.AppError)
- func GetFileInfosForPost(postId string, readFromMaster bool) ([]*model.FileInfo, *model.AppError)
- func GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, *model.AppError)
- func GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, *model.AppError)
- func GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, *model.AppError)
- func GetIncomingWebhook(hookId string) (*model.IncomingWebhook, *model.AppError)
- func GetIncomingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func GetInfoForFilename(post *model.Post, teamId string, filename string) *model.FileInfo
- func GetJob(id string) (*model.Job, *model.AppError)
- func GetJobs(offset int, limit int) ([]*model.Job, *model.AppError)
- func GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError)
- func GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError)
- func GetJobsPage(page int, perPage int) ([]*model.Job, *model.AppError)
- func GetLogs(page, perPage int) ([]string, *model.AppError)
- func GetLogsSkipSend(page, perPage int) ([]string, *model.AppError)
- func GetMentionKeywordsInChannel(profiles map[string]*model.User) map[string][]string
- func GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string
- func GetNewUsersForTeamPage(teamId string, page, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetNumberOfChannelsOnTeam(teamId string) (int, *model.AppError)
- func GetOAuthAccessToken(clientId, grantType, redirectUri, code, secret, refreshToken string) (*model.AccessResponse, *model.AppError)
- func GetOAuthApp(appId string) (*model.OAuthApp, *model.AppError)
- func GetOAuthApps(page, perPage int) ([]*model.OAuthApp, *model.AppError)
- func GetOAuthAppsByCreator(userId string, page, perPage int) ([]*model.OAuthApp, *model.AppError)
- func GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, ...) (string, *model.AppError)
- func GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamId string) (string, *model.AppError)
- func GetOAuthStateToken(token string) (*model.Token, *model.AppError)
- func GetOpenGraphMetadata(url string) *opengraph.OpenGraph
- func GetOutgoingWebhook(hookId string) (*model.OutgoingWebhook, *model.AppError)
- func GetOutgoingWebhooksForChannelPage(channelId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func GetOutgoingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError)
- func GetPermalinkPost(postId string, userId string) (*model.PostList, *model.AppError)
- func GetPinnedPosts(channelId string) (*model.PostList, *model.AppError)
- func GetPluginsForClientConfig() string
- func GetPostThread(postId string) (*model.PostList, *model.AppError)
- func GetPosts(channelId string, offset int, limit int) (*model.PostList, *model.AppError)
- func GetPostsAfterPost(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)
- func GetPostsAroundPost(postId, channelId string, offset, limit int, before bool) (*model.PostList, *model.AppError)
- func GetPostsBeforePost(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)
- func GetPostsEtag(channelId string) string
- func GetPostsPage(channelId string, page int, perPage int) (*model.PostList, *model.AppError)
- func GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError)
- func GetPreferenceByCategoryAndNameForUser(userId string, category string, preferenceName string) (*model.Preference, *model.AppError)
- func GetPreferenceByCategoryForUser(userId string, category string) (model.Preferences, *model.AppError)
- func GetPreferencesForUser(userId string) (model.Preferences, *model.AppError)
- func GetProfileImage(user *model.User) ([]byte, bool, *model.AppError)
- func GetProtocol(r *http.Request) string
- func GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError)
- func GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func GetReactionsForPost(postId string) ([]*model.Reaction, *model.AppError)
- func GetRecentlyActiveUsersForTeam(teamId string) (map[string]*model.User, *model.AppError)
- func GetRecentlyActiveUsersForTeamPage(teamId string, page, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetSamlCertificateStatus() *model.SamlCertificateStatus
- func GetSamlMetadata() (string, *model.AppError)
- func GetSession(token string) (*model.Session, *model.AppError)
- func GetSessions(userId string) ([]*model.Session, *model.AppError)
- func GetSinglePost(postId string) (*model.Post, *model.AppError)
- func GetStatus(userId string) (*model.Status, *model.AppError)
- func GetStatusFromCache(userId string) *model.Status
- func GetStatusesByIds(userIds []string) (map[string]interface{}, *model.AppError)
- func GetTeam(teamId string) (*model.Team, *model.AppError)
- func GetTeamByInviteId(inviteId string) (*model.Team, *model.AppError)
- func GetTeamByName(name string) (*model.Team, *model.AppError)
- func GetTeamIdFromQuery(query url.Values) (string, *model.AppError)
- func GetTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
- func GetTeamMembers(teamId string, offset int, limit int) ([]*model.TeamMember, *model.AppError)
- func GetTeamMembersByIds(teamId string, userIds []string) ([]*model.TeamMember, *model.AppError)
- func GetTeamMembersForUser(userId string) ([]*model.TeamMember, *model.AppError)
- func GetTeamStats(teamId string) (*model.TeamStats, *model.AppError)
- func GetTeamUnread(teamId, userId string) (*model.TeamUnread, *model.AppError)
- func GetTeamsForUser(userId string) ([]*model.Team, *model.AppError)
- func GetTeamsUnreadForUser(excludeTeamId string, userId string) ([]*model.TeamUnread, *model.AppError)
- func GetUser(userId string) (*model.User, *model.AppError)
- func GetUserAccessToken(tokenId string, sanitize bool) (*model.UserAccessToken, *model.AppError)
- func GetUserAccessTokensForUser(userId string, page, perPage int) ([]*model.UserAccessToken, *model.AppError)
- func GetUserByAuth(authData *string, authService string) (*model.User, *model.AppError)
- func GetUserByEmail(email string) (*model.User, *model.AppError)
- func GetUserByUsername(username string) (*model.User, *model.AppError)
- func GetUserForLogin(loginId string, onlyLdap bool) (*model.User, *model.AppError)
- func GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError)
- func GetUsers(offset int, limit int) ([]*model.User, *model.AppError)
- func GetUsersByIds(userIds []string, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersByUsernames(usernames []string, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersEtag() string
- func GetUsersInChannel(channelId string, offset int, limit int) ([]*model.User, *model.AppError)
- func GetUsersInChannelMap(channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
- func GetUsersInChannelPage(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersInTeam(teamId string, offset int, limit int) ([]*model.User, *model.AppError)
- func GetUsersInTeamEtag(teamId string) string
- func GetUsersInTeamMap(teamId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
- func GetUsersInTeamPage(teamId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersMap(offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
- func GetUsersNotInChannel(teamId string, channelId string, offset int, limit int) ([]*model.User, *model.AppError)
- func GetUsersNotInChannelMap(teamId string, channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
- func GetUsersNotInChannelPage(teamId string, channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersNotInTeam(teamId string, offset int, limit int) ([]*model.User, *model.AppError)
- func GetUsersNotInTeamEtag(teamId string) string
- func GetUsersNotInTeamPage(teamId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersPage(page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetUsersWithoutTeam(offset int, limit int) ([]*model.User, *model.AppError)
- func GetUsersWithoutTeamPage(page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func GetVerifyEmailToken(token string) (*model.Token, *model.AppError)
- func GetWebrtcInfoForSession(sessionId string) (*model.WebrtcInfoResponse, *model.AppError)
- func GetWebrtcToken(sessionId string) (string, *model.AppError)
- func HandleCommandResponse(command *model.Command, args *model.CommandArgs, ...) (*model.CommandResponse, *model.AppError)
- func HandleCommandWebhook(hookId string, response *model.CommandResponse) *model.AppError
- func HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte)
- func HandleIncomingWebhook(hookId string, req *model.IncomingWebhookRequest) *model.AppError
- func HasPermissionTo(askingUserId string, permission *model.Permission) bool
- func HasPermissionToChannel(askingUserId string, channelId string, permission *model.Permission) bool
- func HasPermissionToChannelByPost(askingUserId string, postId string, permission *model.Permission) bool
- func HasPermissionToTeam(askingUserId string, teamId string, permission *model.Permission) bool
- func HasPermissionToUser(askingUserId string, userId string) bool
- func HubRegister(webConn *WebConn)
- func HubStart()
- func HubStop()
- func HubUnregister(webConn *WebConn)
- func ImportChannel(data *ChannelImportData, dryRun bool) *model.AppError
- func ImportDirectChannel(data *DirectChannelImportData, dryRun bool) *model.AppError
- func ImportDirectPost(data *DirectPostImportData, dryRun bool) *model.AppError
- func ImportLine(line LineImportData, dryRun bool) *model.AppError
- func ImportPost(data *PostImportData, dryRun bool) *model.AppError
- func ImportTeam(data *TeamImportData, dryRun bool) *model.AppError
- func ImportUser(data *UserImportData, dryRun bool) *model.AppError
- func ImportUserChannels(user *model.User, team *model.Team, teamMember *model.TeamMember, ...) *model.AppError
- func ImportUserTeams(username string, data *[]UserTeamImportData) *model.AppError
- func InitEmailBatching()
- func InitPlugins()
- func InitStores()
- func InvalidateAllCaches() *model.AppError
- func InvalidateAllCachesSkipSend()
- func InvalidateCacheForChannel(channel *model.Channel)
- func InvalidateCacheForChannelByNameSkipClusterSend(teamId, name string)
- func InvalidateCacheForChannelMembers(channelId string)
- func InvalidateCacheForChannelMembersNotifyProps(channelId string)
- func InvalidateCacheForChannelMembersNotifyPropsSkipClusterSend(channelId string)
- func InvalidateCacheForChannelMembersSkipClusterSend(channelId string)
- func InvalidateCacheForChannelPosts(channelId string)
- func InvalidateCacheForChannelPostsSkipClusterSend(channelId string)
- func InvalidateCacheForChannelSkipClusterSend(channelId string)
- func InvalidateCacheForUser(userId string)
- func InvalidateCacheForUserSkipClusterSend(userId string)
- func InvalidateCacheForWebhook(webhookId string)
- func InvalidateCacheForWebhookSkipClusterSend(webhookId string)
- func InvalidateWebConnSessionCacheForUser(userId string)
- func InviteNewUsersToTeam(emailList []string, teamId, senderId string) *model.AppError
- func IsFirstUserAccount() bool
- func IsUserAway(lastActivityAt int64) bool
- func IsUserSignUpAllowed() *model.AppError
- func IsUsernameTaken(name string) bool
- func JoinChannel(channel *model.Channel, userId string) *model.AppError
- func JoinDefaultChannels(teamId string, user *model.User, channelRole string, userRequestorId string) *model.AppError
- func JoinUserToTeam(team *model.Team, user *model.User, userRequestorId string) *model.AppError
- func LeaveChannel(channelId string, userId string) *model.AppError
- func LeaveTeam(team *model.Team, user *model.User) *model.AppError
- func LinkUserToTeam(user *model.User, team *model.Team)
- func ListAllCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
- func ListAutocompleteCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
- func ListTeamCommands(teamId string) ([]*model.Command, *model.AppError)
- func LoadLicense()
- func LoginByOAuth(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)
- func MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo
- func MoveChannel(team *model.Team, channel *model.Channel) *model.AppError
- func NewServer()
- func OldImportChannel(channel *model.Channel) *model.Channel
- func OldImportFile(timestamp time.Time, file io.Reader, teamId string, channelId string, ...) (*model.FileInfo, error)
- func OldImportIncomingWebhookPost(post *model.Post, props model.StringInterface)
- func OldImportPost(post *model.Post)
- func OldImportUser(team *model.Team, user *model.User) *model.User
- func PatchChannel(channel *model.Channel, patch *model.ChannelPatch, userId string) (*model.Channel, *model.AppError)
- func PatchPost(postId string, patch *model.PostPatch) (*model.Post, *model.AppError)
- func PatchTeam(teamId string, patch *model.TeamPatch) (*model.Team, *model.AppError)
- func PatchUser(userId string, patch *model.UserPatch, asAdmin bool) (*model.User, *model.AppError)
- func PermanentDeleteAllUsers() *model.AppError
- func PermanentDeleteChannel(channel *model.Channel) *model.AppError
- func PermanentDeleteTeam(team *model.Team) *model.AppError
- func PermanentDeleteTeamId(teamId string) *model.AppError
- func PermanentDeleteUser(user *model.User) *model.AppError
- func PostAddToChannelMessage(user *model.User, addedUser *model.User, channel *model.Channel) *model.AppError
- func PostRemoveFromChannelMessage(removerUserId string, removedUser *model.User, channel *model.Channel) *model.AppError
- func PostUpdateChannelDisplayNameMessage(userId string, channel *model.Channel, ...) *model.AppError
- func PostUpdateChannelHeaderMessage(userId string, channel *model.Channel, ...) *model.AppError
- func PostUpdateChannelPurposeMessage(userId string, channel *model.Channel, oldChannelPurpose string, ...) *model.AppError
- func Publish(message *model.WebSocketEvent)
- func PublishSkipClusterSend(message *model.WebSocketEvent)
- func PurgeElasticsearchIndexes() *model.AppError
- func RecycleDatabaseConnection()
- func RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError)
- func RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func RegenerateOAuthAppSecret(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- func RegisterAllClusterMessageHandlers()
- func RegisterCommandProvider(newProvider CommandProvider)
- func ReloadConfig()
- func RemoveLicense() *model.AppError
- func RemovePlugin(id string) *model.AppError
- func RemoveSamlFile(filename string) *model.AppError
- func RemoveSamlIdpCertificate() *model.AppError
- func RemoveSamlPrivateCertificate() *model.AppError
- func RemoveSamlPublicCertificate() *model.AppError
- func RemoveUserFromChannel(userIdToRemove string, removerUserId string, channel *model.Channel) *model.AppError
- func RemoveUserFromTeam(teamId string, userId string) *model.AppError
- func ResetPasswordFromToken(userSuppliedTokenString, newPassword string) *model.AppError
- func RestoreChannel(channel *model.Channel) (*model.Channel, *model.AppError)
- func ReturnWebSocketError(conn *WebConn, r *model.WebSocketRequest, err *model.AppError)
- func RevokeAccessToken(token string) *model.AppError
- func RevokeAllSessions(userId string) *model.AppError
- func RevokeSession(session *model.Session) *model.AppError
- func RevokeSessionById(sessionId string) *model.AppError
- func RevokeSessionsForDeviceId(userId string, deviceId string, currentSessionId string) *model.AppError
- func RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
- func RevokeWebrtcToken(sessionId string)
- func SanitizeProfile(user *model.User, asAdmin bool)
- func SaveBrandImage(imageData *multipart.FileHeader) *model.AppError
- func SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)
- func SaveConfig(cfg *model.Config, sendConfigChangeClusterMessage bool) *model.AppError
- func SaveLicense(licenseBytes []byte) (*model.License, *model.AppError)
- func SaveReactionForPost(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func SearchAllTeams(term string) ([]*model.Team, *model.AppError)
- func SearchChannels(teamId string, term string) (*model.ChannelList, *model.AppError)
- func SearchChannelsUserNotIn(teamId string, userId string, term string) (*model.ChannelList, *model.AppError)
- func SearchOpenTeams(term string) ([]*model.Team, *model.AppError)
- func SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bool) (*model.PostList, *model.AppError)
- func SearchUsers(props *model.UserSearch, searchOptions map[string]bool, asAdmin bool) ([]*model.User, *model.AppError)
- func SearchUsersInChannel(channelId string, term string, searchOptions map[string]bool, asAdmin bool) ([]*model.User, *model.AppError)
- func SearchUsersInTeam(teamId string, term string, searchOptions map[string]bool, asAdmin bool) ([]*model.User, *model.AppError)
- func SearchUsersNotInChannel(teamId string, channelId string, term string, searchOptions map[string]bool, ...) ([]*model.User, *model.AppError)
- func SearchUsersNotInTeam(notInTeamId string, term string, searchOptions map[string]bool, asAdmin bool) ([]*model.User, *model.AppError)
- func SearchUsersWithoutTeam(term string, searchOptions map[string]bool, asAdmin bool) ([]*model.User, *model.AppError)
- func SendChangeUsernameEmail(oldUsername, newUsername, email, locale, siteURL string) *model.AppError
- func SendDailyDiagnostics()
- func SendDiagnostic(event string, properties map[string]interface{})
- func SendEmailChangeEmail(oldEmail, newEmail, locale, siteURL string) *model.AppError
- func SendEmailChangeVerifyEmail(newUserEmail, locale, siteURL, token string) *model.AppError
- func SendEmailVerification(user *model.User) *model.AppError
- func SendEphemeralPost(userId string, post *model.Post) *model.Post
- func SendInviteEmails(team *model.Team, senderName string, invites []string, siteURL string)
- func SendMfaChangeEmail(email string, activated bool, locale, siteURL string) *model.AppError
- func SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, ...) ([]string, *model.AppError)
- func SendPasswordChangeEmail(email, method, locale, siteURL string) *model.AppError
- func SendPasswordReset(email string, siteURL string) (bool, *model.AppError)
- func SendPasswordResetEmail(email string, token *model.Token, locale, siteURL string) (bool, *model.AppError)
- func SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError
- func SendUserAccessTokenAddedEmail(email, locale string) *model.AppError
- func SendVerifyEmail(userEmail, locale, siteURL, token string) *model.AppError
- func SendWelcomeEmail(userId string, email string, verified bool, locale, siteURL string) *model.AppError
- func SessionCacheLength() int
- func SessionHasPermissionTo(session model.Session, permission *model.Permission) bool
- func SessionHasPermissionToChannel(session model.Session, channelId string, permission *model.Permission) bool
- func SessionHasPermissionToChannelByPost(session model.Session, postId string, permission *model.Permission) bool
- func SessionHasPermissionToPost(session model.Session, postId string, permission *model.Permission) bool
- func SessionHasPermissionToTeam(session model.Session, teamId string, permission *model.Permission) bool
- func SessionHasPermissionToUser(session model.Session, userId string) bool
- func SetActiveChannel(userId string, channelId string) *model.AppError
- func SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppError
- func SetStatusAwayIfNeeded(userId string, manual bool)
- func SetStatusOffline(userId string, manual bool)
- func SetStatusOnline(userId string, sessionId string, manual bool)
- func ShouldSendPushNotification(user *model.User, channelNotifyProps model.StringMap, wasMentioned bool, ...) bool
- func SlackAddBotUser(teamId string, log *bytes.Buffer) *model.User
- func SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, ...) map[string]*model.Channel
- func SlackAddPosts(teamId string, channel *model.Channel, posts []SlackPost, ...)
- func SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Buffer) map[string]*model.User
- func SlackConvertChannelMentions(channels []SlackChannel, posts map[string][]SlackPost) map[string][]SlackPost
- func SlackConvertChannelName(channelName string, channelId string) string
- func SlackConvertPostsMarkup(posts map[string][]SlackPost) map[string][]SlackPost
- func SlackConvertTimeStamp(ts string) int64
- func SlackConvertUserMentions(users []SlackUser, posts map[string][]SlackPost) map[string][]SlackPost
- func SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)
- func SlackSanitiseChannelProperties(channel model.Channel) model.Channel
- func SlackUploadFile(sPost SlackPost, uploads map[string]*zip.File, teamId string, channelId string, ...) (*model.FileInfo, bool)
- func SoftDeleteTeam(teamId string) *model.AppError
- func StartServer()
- func StartupPlugins(pluginPath, webappPath string)
- func StopServer()
- func SwitchEmailToLdap(email, password, code, ldapId, ldapPassword string) (string, *model.AppError)
- func SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, password, code, service string) (string, *model.AppError)
- func SwitchLdapToEmail(ldapPassword, code, email, newPassword string) (string, *model.AppError)
- func SwitchOAuthToEmail(email, password, requesterId string) (string, *model.AppError)
- func SyncLdap()
- func TearDown()
- func TestElasticsearch(cfg *model.Config) *model.AppError
- func TestEmail(userId string, cfg *model.Config) *model.AppError
- func TestLdap() *model.AppError
- func TotalWebsocketConnections() int
- func TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, ...)
- func UnpackAndActivatePlugin(pluginFile io.Reader) (*model.Manifest, *model.AppError)
- func UpdateActive(user *model.User, active bool) (*model.User, *model.AppError)
- func UpdateActiveNoLdap(userId string, active bool) (*model.User, *model.AppError)
- func UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError)
- func UpdateChannelLastViewedAt(channelIds []string, userId string) *model.AppError
- func UpdateChannelMemberNotifyProps(data map[string]string, channelId string, userId string) (*model.ChannelMember, *model.AppError)
- func UpdateChannelMemberRoles(channelId string, userId string, newRoles string) (*model.ChannelMember, *model.AppError)
- func UpdateCommand(oldCmd, updatedCmd *model.Command) (*model.Command, *model.AppError)
- func UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
- func UpdateLastActivityAtIfNeeded(session model.Session)
- func UpdateMfa(activate bool, userId, token string) *model.AppError
- func UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, ...) *model.AppError
- func UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func UpdatePassword(user *model.User, newPassword string) *model.AppError
- func UpdatePasswordAsUser(userId, currentPassword, newPassword string) *model.AppError
- func UpdatePasswordByUserIdSendEmail(userId, newPassword, method string) *model.AppError
- func UpdatePasswordSendEmail(user *model.User, newPassword, method string) *model.AppError
- func UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model.AppError)
- func UpdatePreferences(userId string, preferences model.Preferences) *model.AppError
- func UpdateTeam(team *model.Team) (*model.Team, *model.AppError)
- func UpdateTeamMemberRoles(teamId string, userId string, newRoles string) (*model.TeamMember, *model.AppError)
- func UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError)
- func UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *model.AppError)
- func UpdateUserNotifyProps(userId string, props map[string]string) (*model.User, *model.AppError)
- func UpdateUserRoles(userId string, newRoles string) (*model.User, *model.AppError)
- func UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError
- func UploadFiles(teamId string, channelId string, userId string, ...) (*model.FileUploadResponse, *model.AppError)
- func VerifyEmailFromToken(userSuppliedTokenString string) *model.AppError
- func VerifyUserEmail(userId string) *model.AppError
- func ViewChannel(view *model.ChannelView, userId string, clearPushNotifications bool) *model.AppError
- func WaitForChannelMembership(channelId string, userId string)
- func WriteSamlFile(fileData *multipart.FileHeader) *model.AppError
- type AutoChannelCreator
- type AutoPostCreator
- type AutoTeamCreator
- type AutoUserCreator
- type AwayProvider
- type ChannelImportData
- type ClientConfigPlugin
- type ClusterDiscoveryService
- type CodeProvider
- type CollapseProvider
- type CommandProvider
- type CorsWrapper
- type DirectChannelImportData
- type DirectPostImportData
- type EchoProvider
- type EmailBatchingJob
- type ExpandProvider
- type HeaderProvider
- type HelpProvider
- type Hub
- type InvitePeopleProvider
- type JoinProvider
- type LeaveProvider
- type LineImportData
- type LineImportWorkerData
- type LineImportWorkerError
- type LoadTestProvider
- func (me *LoadTestProvider) ChannelsCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
- func (me *LoadTestProvider) GetTrigger() string
- func (me *LoadTestProvider) HelpCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) JsonCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) PostsCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) SetupCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) UrlCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) UsersCommand(args *model.CommandArgs, message string) *model.CommandResponse
- type LogoutProvider
- type MeProvider
- type OfflineProvider
- type OnlineProvider
- type OpenProvider
- type PluginAPI
- func (api *PluginAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError)
- func (api *PluginAPI) GetChannelByName(teamId, name string) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetLdapUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError)
- func (api *PluginAPI) GetSessionFromRequest(r *http.Request) (*model.Session, *model.AppError)
- func (api *PluginAPI) GetTeamByName(name string) (*model.Team, *model.AppError)
- func (api *PluginAPI) GetUserByName(name string) (*model.User, *model.AppError)
- func (api *PluginAPI) I18n(id string, r *http.Request) string
- func (api *PluginAPI) LoadPluginConfiguration(dest interface{}) error
- func (api *PluginAPI) PluginRouter() *mux.Router
- type PostImportData
- type PurposeProvider
- type RecoveryLogger
- type RenameProvider
- type SearchProvider
- type Server
- type SettingsProvider
- type ShortcutsProvider
- type ShrugProvider
- type SlackChannel
- type SlackComment
- type SlackFile
- type SlackPost
- type SlackUser
- type TeamEnvironment
- type TeamImportData
- type TestEnvironment
- type TestHelper
- func (me *TestHelper) CreateChannel(team *model.Team) *model.Channel
- func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post
- func (me *TestHelper) CreatePrivateChannel(team *model.Team) *model.Channel
- func (me *TestHelper) CreateTeam() *model.Team
- func (me *TestHelper) CreateUser() *model.User
- func (me *TestHelper) InitBasic() *TestHelper
- func (me *TestHelper) MakeEmail() string
- func (me *TestHelper) MakeUsername() string
- type UserChannelImportData
- type UserChannelNotifyPropsImportData
- type UserImportData
- type UserNotifyPropsImportData
- type UserTeamImportData
- type VaryBy
- type WebConn
- func (c *WebConn) GetSession() *model.Session
- func (c *WebConn) GetSessionExpiresAt() int64
- func (c *WebConn) GetSessionToken() string
- func (webCon *WebConn) InvalidateCache()
- func (webCon *WebConn) IsAuthenticated() bool
- func (webCon *WebConn) IsMemberOfTeam(teamId string) bool
- func (c *WebConn) ReadPump()
- func (webCon *WebConn) SendHello()
- func (c *WebConn) SetSession(v *model.Session)
- func (c *WebConn) SetSessionExpiresAt(v int64)
- func (c *WebConn) SetSessionToken(v string)
- func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool
- func (c *WebConn) WritePump()
- type WebSocketRouter
Constants ¶
const ( DAY_MILLISECONDS = 24 * 60 * 60 * 1000 MONTH_MILLISECONDS = 31 * DAY_MILLISECONDS )
const ( USER_PASSWORD = "passwd" CHANNEL_TYPE = model.CHANNEL_OPEN FUZZ_USER_EMAIL_PREFIX_LEN = 10 BTEST_TEAM_DISPLAY_NAME = "TestTeam" BTEST_TEAM_NAME = "z-z-testdomaina" BTEST_TEAM_EMAIL = "test@nowhere.com" BTEST_TEAM_TYPE = model.TEAM_OPEN BTEST_USER_NAME = "Mr. Testing Tester" BTEST_USER_EMAIL = "success+ttester@simulator.amazonses.com" BTEST_USER_PASSWORD = "passwd" )
const ( CMD_EXPAND = "expand" CMD_COLLAPSE = "collapse" )
const ( SEGMENT_KEY = "fwb7VPbFeQ7SKp3wHm1RzFUuXZudqVok" TRACK_CONFIG_SERVICE = "config_service" TRACK_CONFIG_TEAM = "config_team" TRACK_CONFIG_CLIENT_REQ = "config_client_requirements" TRACK_CONFIG_SQL = "config_sql" TRACK_CONFIG_LOG = "config_log" TRACK_CONFIG_FILE = "config_file" TRACK_CONFIG_RATE = "config_rate" TRACK_CONFIG_EMAIL = "config_email" TRACK_CONFIG_PRIVACY = "config_privacy" TRACK_CONFIG_THEME = "config_theme" TRACK_CONFIG_OAUTH = "config_oauth" TRACK_CONFIG_LDAP = "config_ldap" TRACK_CONFIG_COMPLIANCE = "config_compliance" TRACK_CONFIG_LOCALIZATION = "config_localization" TRACK_CONFIG_SAML = "config_saml" TRACK_CONFIG_PASSWORD = "config_password" TRACK_CONFIG_CLUSTER = "config_cluster" TRACK_CONFIG_METRICS = "config_metrics" TRACK_CONFIG_WEBRTC = "config_webrtc" TRACK_CONFIG_SUPPORT = "config_support" TRACK_CONFIG_NATIVEAPP = "config_nativeapp" TRACK_CONFIG_ANALYTICS = "config_analytics" TRACK_CONFIG_ANNOUNCEMENT = "config_announcement" TRACK_CONFIG_ELASTICSEARCH = "config_elasticsearch" TRACK_CONFIG_PLUGIN = "config_plugin" TRACK_ACTIVITY = "activity" TRACK_LICENSE = "license" TRACK_SERVER = "server" )
const ( MaxEmojiFileSize = 1000 * 1024 // 1 MB MaxEmojiWidth = 128 MaxEmojiHeight = 128 )
const ( /* EXIF Image Orientations 1 2 3 4 5 6 7 8 888888 888888 88 88 8888888888 88 88 8888888888 88 88 88 88 88 88 88 88 88 88 88 88 8888 8888 8888 8888 88 8888888888 8888888888 88 88 88 88 88 88 88 888888 888888 */ Upright = 1 UprightMirrored = 2 UpsideDown = 3 UpsideDownMirrored = 4 RotatedCWMirrored = 5 RotatedCCW = 6 RotatedCCWMirrored = 7 RotatedCW = 8 MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image IMAGE_THUMBNAIL_PIXEL_WIDTH = 120 IMAGE_THUMBNAIL_PIXEL_HEIGHT = 100 IMAGE_PREVIEW_PIXEL_WIDTH = 1024 )
const ( OAUTH_COOKIE_MAX_AGE_SECONDS = 30 * 60 // 30 minutes COOKIE_OAUTH = "MMOAUTH" )
const ( SECURITY_URL = "https://d7zmvsa9e04kk.cloudfront.net" SECURITY_UPDATE_PERIOD = 86400000 // 24 hours in milliseconds. PROP_SECURITY_ID = "id" PROP_SECURITY_BUILD = "b" PROP_SECURITY_ENTERPRISE_READY = "be" PROP_SECURITY_DATABASE = "db" PROP_SECURITY_OS = "os" PROP_SECURITY_USER_COUNT = "uc" PROP_SECURITY_TEAM_COUNT = "tc" PROP_SECURITY_ACTIVE_USER_COUNT = "auc" PROP_SECURITY_UNIT_TESTS = "ut" )
const ( TOKEN_TYPE_PASSWORD_RECOVERY = "password_recovery" TOKEN_TYPE_VERIFY_EMAIL = "verify_email" PASSWORD_RECOVER_EXPIRY_TIME = 1000 * 60 * 60 // 1 hour VERIFY_EMAIL_EXPIRY_TIME = 1000 * 60 * 60 // 1 hour IMAGE_PROFILE_PIXEL_DIMENSION = 128 )
const ( SEND_QUEUE_SIZE = 256 SEND_SLOW_WARN = (SEND_QUEUE_SIZE * 50) / 100 SEND_DEADLOCK_WARN = (SEND_QUEUE_SIZE * 95) / 100 WRITE_WAIT = 30 * time.Second PONG_WAIT = 100 * time.Second PING_PERIOD = (PONG_WAIT * 6) / 10 AUTH_TIMEOUT = 5 * time.Second WEBCONN_MEMBER_CACHE_TIME = 1000 * 60 * 30 // 30 minutes )
const ( BROADCAST_QUEUE_SIZE = 4096 DEADLOCK_TICKER = 15 * time.Second // check every 15 seconds DEADLOCK_WARN = (BROADCAST_QUEUE_SIZE * 99) / 100 // number of buffered messages before printing stack trace )
const ( TRIGGERWORDS_EXACT_MATCH = 0 TRIGGERWORDS_STARTS_WITH = 1 )
const (
CMD_AWAY = "away"
)
const (
CMD_CODE = "code"
)
const (
CMD_ECHO = "echo"
)
const (
CMD_HEADER = "header"
)
const (
CMD_HELP = "help"
)
const (
CMD_INVITE_PEOPLE = "invite_people"
)
const (
CMD_JOIN = "join"
)
const (
CMD_LEAVE = "leave"
)
const (
CMD_LOGOUT = "logout"
)
const (
CMD_ME = "me"
)
const (
CMD_MSG = "msg"
)
const (
CMD_OFFLINE = "offline"
)
const (
CMD_ONLINE = "online"
)
const (
CMD_OPEN = "open"
)
const (
CMD_PURPOSE = "purpose"
)
const (
CMD_RENAME = "rename"
)
const (
CMD_SEARCH = "search"
)
const (
CMD_SETTINGS = "settings"
)
const (
CMD_SHORTCUTS = "shortcuts"
)
const (
CMD_SHRUG = "shrug"
)
const (
CMD_TEST = "test"
)
const (
DISCOVERY_SERVICE_WRITE_PING = 60 * time.Second
)
const (
EMAIL_BATCHING_TASK_NAME = "Email Batching"
)
const TIME_TO_WAIT_FOR_CONNECTIONS_TO_CLOSE_ON_SERVER_SHUTDOWN = time.Second
Variables ¶
var ( TEAM_NAME_LEN = utils.Range{Begin: 10, End: 20} TEAM_DOMAIN_NAME_LEN = utils.Range{Begin: 10, End: 20} TEAM_EMAIL_LEN = utils.Range{Begin: 15, End: 30} USER_NAME_LEN = utils.Range{Begin: 5, End: 20} USER_EMAIL_LEN = utils.Range{Begin: 15, End: 30} CHANNEL_DISPLAY_NAME_LEN = utils.Range{Begin: 10, End: 20} CHANNEL_NAME_LEN = utils.Range{Begin: 5, End: 20} POST_MESSAGE_LEN = utils.Range{Begin: 100, End: 400} POST_HASHTAGS_NUM = utils.Range{Begin: 5, End: 10} POST_MENTIONS_NUM = utils.Range{Begin: 0, End: 3} TEST_IMAGE_FILENAMES = []string{"test.png", "testjpg.jpg", "testgif.gif"} )
Functions ¶
func ActivateMfa ¶
func ActivatePlugins ¶
func ActivatePlugins()
func AddChannelMember ¶
func AddSamlIdpCertificate ¶
func AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError
func AddSamlPrivateCertificate ¶
func AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
func AddSamlPublicCertificate ¶
func AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError
func AddSessionToCache ¶
func AddStatusCache ¶
func AddTeamMember ¶
func AddTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
func AddTeamMemberByHash ¶
func AddTeamMemberByHash(userId, hash, data string) (*model.TeamMember, *model.AppError)
func AddTeamMemberByInviteId ¶
func AddTeamMemberByInviteId(inviteId, userId string) (*model.TeamMember, *model.AppError)
func AddTeamMembers ¶
func AddUserToChannel ¶
func AddUserToTeam ¶
func AddUserToTeamByHash ¶
func AddUserToTeamByInviteId ¶
func AddUserToTeamByTeamId ¶
func AttachDeviceId ¶
func AuthorizeOAuthUser ¶
func AutocompleteUsersInTeam ¶
func BroadcastStatus ¶
func BulkImport ¶
func CheckUserDomain ¶
Check that a user's email domain matches a list of space-delimited domains as a string.
func ClearPushNotification ¶
func ClearSessionCacheForUser ¶
func ClearSessionCacheForUser(userId string)
func ClearSessionCacheForUserSkipClusterSend ¶
func ClearSessionCacheForUserSkipClusterSend(userId string)
func ClearStatusCache ¶
func ClearStatusCache()
func ClusterClearSessionCacheForUserHandler ¶
func ClusterClearSessionCacheForUserHandler(msg *model.ClusterMessage)
func ClusterInvalidateAllCachesHandler ¶
func ClusterInvalidateAllCachesHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForChannelByNameHandler ¶
func ClusterInvalidateCacheForChannelByNameHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForChannelHandler ¶
func ClusterInvalidateCacheForChannelHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForChannelMembersHandler ¶
func ClusterInvalidateCacheForChannelMembersHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForChannelMembersNotifyPropHandler ¶
func ClusterInvalidateCacheForChannelMembersNotifyPropHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForChannelPostsHandler ¶
func ClusterInvalidateCacheForChannelPostsHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForUserHandler ¶
func ClusterInvalidateCacheForUserHandler(msg *model.ClusterMessage)
func ClusterInvalidateCacheForWebhookHandler ¶
func ClusterInvalidateCacheForWebhookHandler(msg *model.ClusterMessage)
func ClusterPublishHandler ¶
func ClusterPublishHandler(msg *model.ClusterMessage)
func ClusterUpdateStatusHandler ¶
func ClusterUpdateStatusHandler(msg *model.ClusterMessage)
func CompleteOAuth ¶
func CompleteSwitchWithOAuth ¶
func CreateBasicUser ¶
Basic test team and user so you always know one
func CreateChannel ¶
func CreateChannelWithUser ¶
func CreateCommandPost ¶
func CreateCommandWebhook ¶
func CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
func CreateDefaultChannels ¶
func CreateDirectChannel ¶
func CreateEmoji ¶
func CreateGroupChannel ¶
func CreateIncomingWebhookForChannel ¶
func CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func CreateOAuthStateToken ¶
func CreateOAuthUser ¶
func CreateOutgoingWebhook ¶
func CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func CreatePost ¶
func CreateProfileImage ¶
func CreateTeamWithUser ¶
func CreateUserAccessToken ¶
func CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
func CreateUserFromSignup ¶
func CreateUserWithHash ¶
func CreateUserWithInviteId ¶
func CreateVerifyEmailToken ¶
func CreateWebhookPost ¶
func DeactivateMfa ¶
func DeleteCommand ¶
func DeleteFlaggedPosts ¶
func DeleteFlaggedPosts(postId string)
func DeleteIncomingWebhook ¶
func DeleteOAuthApp ¶
func DeleteOutgoingWebhook ¶
func DeletePostFiles ¶
func DeletePreferences ¶
func DeletePreferences(userId string, preferences model.Preferences) *model.AppError
func DoPostAction ¶
func DoSecurityUpdateCheck ¶
func DoSecurityUpdateCheck()
func DoUploadFile ¶
func ExecuteCommand ¶
func ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
func FindTeamByName ¶
func GeneratePublicLinkHash ¶
func GenerateTurnPassword ¶
func GetAllOpenTeamsPage ¶
func GetAllStatuses ¶
func GetAnalytics ¶
func GetAuditsPage ¶
func GetAuthorizationCode ¶
func GetBrandImage ¶
func GetChannelByName ¶
func GetChannelCounts ¶
func GetChannelMember ¶
func GetChannelMembersByIds ¶
func GetChannelMembersPage ¶
func GetChannelUnread ¶
func GetChannelUnread(channelId, userId string) (*model.ChannelUnread, *model.AppError)
func GetChannelsForUser ¶
func GetChannelsUserNotIn ¶
func GetClusterStatus ¶
func GetClusterStatus() []*model.ClusterInfo
func GetComplianceFile ¶
func GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError)
func GetComplianceReport ¶
func GetComplianceReport(reportId string) (*model.Compliance, *model.AppError)
func GetComplianceReports ¶
func GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError)
func GetDeletedChannels ¶
func GetDirectChannel ¶
func GetEmojiImage ¶
func GetExplicitMentions ¶
func GetExplicitMentions(message string, keywords map[string][]string) (map[string]bool, []string, bool, bool, bool)
Given a message and a map mapping mention keywords to the users who use them, returns a map of mentioned users and a slice of potential mention users not in the channel and whether or not @here was mentioned.
func GetFileInfosForPost ¶
func GetFlaggedPosts ¶
func GetFlaggedPostsForTeam ¶
func GetIncomingWebhook ¶
func GetIncomingWebhook(hookId string) (*model.IncomingWebhook, *model.AppError)
func GetIncomingWebhooksPage ¶
func GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
func GetInfoForFilename ¶
func GetJobsByType ¶
func GetJobsByTypePage ¶
func GetMentionKeywordsInChannel ¶
Given a map of user IDs to profiles, returns a list of mention keywords for all users in the channel.
func GetMessageForNotification ¶
func GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string
func GetNewUsersForTeamPage ¶
func GetOAuthAccessToken ¶
func GetOAuthAccessToken(clientId, grantType, redirectUri, code, secret, refreshToken string) (*model.AccessResponse, *model.AppError)
func GetOAuthAppsByCreator ¶
func GetOAuthLoginEndpoint ¶
func GetOAuthSignupEndpoint ¶
func GetOpenGraphMetadata ¶
func GetOutgoingWebhook ¶
func GetOutgoingWebhook(hookId string) (*model.OutgoingWebhook, *model.AppError)
func GetOutgoingWebhooksPage ¶
func GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
func GetPermalinkPost ¶
func GetPluginsForClientConfig ¶
func GetPluginsForClientConfig() string
func GetPostsAfterPost ¶
func GetPostsAroundPost ¶
func GetPostsBeforePost ¶
func GetPostsEtag ¶
func GetPostsPage ¶
func GetPostsSince ¶
func GetPreferencesForUser ¶
func GetPreferencesForUser(userId string) (model.Preferences, *model.AppError)
func GetProtocol ¶
func GetReactionsForPost ¶
func GetSamlCertificateStatus ¶
func GetSamlCertificateStatus() *model.SamlCertificateStatus
func GetSamlMetadata ¶
func GetStatusFromCache ¶
func GetStatusesByIds ¶
func GetTeamMember ¶
func GetTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
func GetTeamMembers ¶
func GetTeamMembersByIds ¶
func GetTeamMembersForUser ¶
func GetTeamMembersForUser(userId string) ([]*model.TeamMember, *model.AppError)
func GetTeamUnread ¶
func GetTeamUnread(teamId, userId string) (*model.TeamUnread, *model.AppError)
func GetTeamsUnreadForUser ¶
func GetUserAccessToken ¶
func GetUserByAuth ¶
func GetUserForLogin ¶
func GetUserStatusesByIds ¶
GetUserStatusesByIds used by apiV4
func GetUsersByIds ¶
func GetUsersByUsernames ¶
func GetUsersEtag ¶
func GetUsersEtag() string
func GetUsersInChannel ¶
func GetUsersInChannelMap ¶
func GetUsersInChannelPage ¶
func GetUsersInTeam ¶
func GetUsersInTeamEtag ¶
func GetUsersInTeamMap ¶
func GetUsersInTeamPage ¶
func GetUsersMap ¶
func GetUsersNotInChannel ¶
func GetUsersNotInChannelMap ¶
func GetUsersNotInTeam ¶
func GetUsersNotInTeamEtag ¶
func GetUsersNotInTeamPage ¶
func GetUsersPage ¶
func GetUsersWithoutTeam ¶
func GetUsersWithoutTeamPage ¶
func GetWebrtcInfoForSession ¶
func GetWebrtcInfoForSession(sessionId string) (*model.WebrtcInfoResponse, *model.AppError)
func HandleCommandResponse ¶
func HandleCommandResponse(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.CommandResponse, *model.AppError)
func HandleCommandWebhook ¶
func HandleCommandWebhook(hookId string, response *model.CommandResponse) *model.AppError
func HandleImages ¶
func HandleIncomingWebhook ¶
func HandleIncomingWebhook(hookId string, req *model.IncomingWebhookRequest) *model.AppError
func HasPermissionTo ¶
func HasPermissionTo(askingUserId string, permission *model.Permission) bool
func HasPermissionToChannel ¶
func HasPermissionToChannel(askingUserId string, channelId string, permission *model.Permission) bool
func HasPermissionToChannelByPost ¶
func HasPermissionToChannelByPost(askingUserId string, postId string, permission *model.Permission) bool
func HasPermissionToTeam ¶
func HasPermissionToTeam(askingUserId string, teamId string, permission *model.Permission) bool
func HasPermissionToUser ¶
func HubRegister ¶
func HubRegister(webConn *WebConn)
func HubUnregister ¶
func HubUnregister(webConn *WebConn)
func ImportChannel ¶
func ImportChannel(data *ChannelImportData, dryRun bool) *model.AppError
func ImportDirectChannel ¶
func ImportDirectChannel(data *DirectChannelImportData, dryRun bool) *model.AppError
func ImportDirectPost ¶
func ImportDirectPost(data *DirectPostImportData, dryRun bool) *model.AppError
func ImportLine ¶
func ImportLine(line LineImportData, dryRun bool) *model.AppError
func ImportPost ¶
func ImportPost(data *PostImportData, dryRun bool) *model.AppError
func ImportTeam ¶
func ImportTeam(data *TeamImportData, dryRun bool) *model.AppError
func ImportUser ¶
func ImportUser(data *UserImportData, dryRun bool) *model.AppError
func ImportUserChannels ¶
func ImportUserChannels(user *model.User, team *model.Team, teamMember *model.TeamMember, data *[]UserChannelImportData) *model.AppError
func ImportUserTeams ¶
func ImportUserTeams(username string, data *[]UserTeamImportData) *model.AppError
func InitEmailBatching ¶
func InitEmailBatching()
func InitPlugins ¶
func InitPlugins()
func InitStores ¶
func InitStores()
func InvalidateAllCaches ¶
func InvalidateAllCachesSkipSend ¶
func InvalidateAllCachesSkipSend()
func InvalidateCacheForChannelByNameSkipClusterSend ¶
func InvalidateCacheForChannelByNameSkipClusterSend(teamId, name string)
func InvalidateCacheForChannelMembers ¶
func InvalidateCacheForChannelMembers(channelId string)
func InvalidateCacheForChannelMembersNotifyProps ¶
func InvalidateCacheForChannelMembersNotifyProps(channelId string)
func InvalidateCacheForChannelMembersNotifyPropsSkipClusterSend ¶
func InvalidateCacheForChannelMembersNotifyPropsSkipClusterSend(channelId string)
func InvalidateCacheForChannelMembersSkipClusterSend ¶
func InvalidateCacheForChannelMembersSkipClusterSend(channelId string)
func InvalidateCacheForChannelPosts ¶
func InvalidateCacheForChannelPosts(channelId string)
func InvalidateCacheForChannelPostsSkipClusterSend ¶
func InvalidateCacheForChannelPostsSkipClusterSend(channelId string)
func InvalidateCacheForChannelSkipClusterSend ¶
func InvalidateCacheForChannelSkipClusterSend(channelId string)
func InvalidateCacheForUser ¶
func InvalidateCacheForUser(userId string)
func InvalidateCacheForUserSkipClusterSend ¶
func InvalidateCacheForUserSkipClusterSend(userId string)
func InvalidateCacheForWebhook ¶
func InvalidateCacheForWebhook(webhookId string)
func InvalidateCacheForWebhookSkipClusterSend ¶
func InvalidateCacheForWebhookSkipClusterSend(webhookId string)
func InvalidateWebConnSessionCacheForUser ¶
func InvalidateWebConnSessionCacheForUser(userId string)
func InviteNewUsersToTeam ¶
func IsFirstUserAccount ¶
func IsFirstUserAccount() bool
func IsUserAway ¶
func IsUserSignUpAllowed ¶
func IsUsernameTaken ¶
Check if the username is already used by another user. Return false if the username is invalid.
func JoinDefaultChannels ¶
func JoinUserToTeam ¶
func ListAllCommands ¶
func ListAutocompleteCommands ¶
func ListAutocompleteCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
previous ListCommands now ListAutocompleteCommands
func LoadLicense ¶
func LoadLicense()
func LoginByOAuth ¶
func MigrateFilenamesToFileInfos ¶
Creates and stores FileInfos for a post created before the FileInfos table existed.
func MoveChannel ¶
This function is intended for use from the CLI. It is not robust against people joining the channel while the move is in progress, and therefore should not be used from the API without first fixing this potential race condition.
func OldImportFile ¶
func OldImportIncomingWebhookPost ¶
func OldImportIncomingWebhookPost(post *model.Post, props model.StringInterface)
func OldImportPost ¶
func PatchChannel ¶
func PermanentDeleteAllUsers ¶
func PermanentDeleteTeamId ¶
func PostAddToChannelMessage ¶
func Publish ¶
func Publish(message *model.WebSocketEvent)
func PublishSkipClusterSend ¶
func PublishSkipClusterSend(message *model.WebSocketEvent)
func RecycleDatabaseConnection ¶
func RecycleDatabaseConnection()
func RegenCommandToken ¶
func RegenOutgoingWebhookToken ¶
func RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func RegisterAllClusterMessageHandlers ¶
func RegisterAllClusterMessageHandlers()
func RegisterCommandProvider ¶
func RegisterCommandProvider(newProvider CommandProvider)
func ReloadConfig ¶
func ReloadConfig()
func RemoveLicense ¶
func RemovePlugin ¶
func RemoveSamlFile ¶
func RemoveUserFromChannel ¶
func ResetPasswordFromToken ¶
func ReturnWebSocketError ¶
func ReturnWebSocketError(conn *WebConn, r *model.WebSocketRequest, err *model.AppError)
func RevokeAccessToken ¶
func RevokeAllSessions ¶
func RevokeSessionById ¶
func RevokeUserAccessToken ¶
func RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
func RevokeWebrtcToken ¶
func RevokeWebrtcToken(sessionId string)
func SanitizeProfile ¶
func SaveBrandImage ¶
func SaveBrandImage(imageData *multipart.FileHeader) *model.AppError
func SaveComplianceReport ¶
func SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)
func SaveConfig ¶
func SaveReactionForPost ¶
func SearchChannels ¶
func SearchChannelsUserNotIn ¶
func SearchPostsInTeam ¶
func SearchUsers ¶
func SearchUsersInChannel ¶
func SearchUsersInTeam ¶
func SearchUsersNotInChannel ¶
func SearchUsersNotInTeam ¶
func SearchUsersWithoutTeam ¶
func SendChangeUsernameEmail ¶
func SendDailyDiagnostics ¶
func SendDailyDiagnostics()
func SendDiagnostic ¶
func SendEmailChangeEmail ¶
func SendInviteEmails ¶
func SendMfaChangeEmail ¶
func SendNotifications ¶
func SendPasswordChangeEmail ¶
func SendPasswordReset ¶
func SendPasswordResetEmail ¶
func SendSignInChangeEmail ¶
func SendVerifyEmail ¶
func SendWelcomeEmail ¶
func SessionCacheLength ¶
func SessionCacheLength() int
func SessionHasPermissionTo ¶
func SessionHasPermissionTo(session model.Session, permission *model.Permission) bool
func SetProfileImage ¶
func SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppError
func SetStatusAwayIfNeeded ¶
func SetStatusOffline ¶
func SetStatusOnline ¶
func SlackAddChannels ¶
func SlackAddPosts ¶
func SlackAddUsers ¶
func SlackConvertChannelMentions ¶
func SlackConvertChannelMentions(channels []SlackChannel, posts map[string][]SlackPost) map[string][]SlackPost
func SlackConvertChannelName ¶
func SlackConvertPostsMarkup ¶
func SlackConvertTimeStamp ¶
func SlackImport ¶
func SlackUploadFile ¶
func SoftDeleteTeam ¶
func StartServer ¶
func StartServer()
func StartupPlugins ¶
func StartupPlugins(pluginPath, webappPath string)
func StopServer ¶
func StopServer()
func SwitchEmailToLdap ¶
func SwitchEmailToOAuth ¶
func SwitchLdapToEmail ¶
func SwitchOAuthToEmail ¶
func TotalWebsocketConnections ¶
func TotalWebsocketConnections() int
func TriggerWebhook ¶
func TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, post *model.Post, channel *model.Channel)
func UnpackAndActivatePlugin ¶
func UpdateActiveNoLdap ¶
func UpdateCommand ¶
func UpdateIncomingWebhook ¶
func UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func UpdateOAuthUserAttrs ¶
func UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, service string) *model.AppError
func UpdateOutgoingWebhook ¶
func UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func UpdatePasswordAsUser ¶
func UpdatePasswordSendEmail ¶
func UpdatePreferences ¶
func UpdatePreferences(userId string, preferences model.Preferences) *model.AppError
func UpdateTeamMemberRoles ¶
func UpdateUser ¶
func UpdateUserAsUser ¶
func UpdateUserNotifyProps ¶
func UpdateUserRoles ¶
func UploadEmojiImage ¶
func UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError
func UploadFiles ¶
func UploadFiles(teamId string, channelId string, userId string, fileHeaders []*multipart.FileHeader, clientIds []string) (*model.FileUploadResponse, *model.AppError)
func VerifyEmailFromToken ¶
func VerifyUserEmail ¶
func ViewChannel ¶
func WriteSamlFile ¶
func WriteSamlFile(fileData *multipart.FileHeader) *model.AppError
Types ¶
type AutoChannelCreator ¶
type AutoChannelCreator struct { Fuzzy bool DisplayNameLen utils.Range DisplayNameCharset string NameLen utils.Range NameCharset string ChannelType string // contains filtered or unexported fields }
func NewAutoChannelCreator ¶
func NewAutoChannelCreator(client *model.Client, team *model.Team) *AutoChannelCreator
func (*AutoChannelCreator) CreateTestChannels ¶
type AutoPostCreator ¶
type AutoPostCreator struct { Fuzzy bool TextLength utils.Range HasImage bool ImageFilenames []string Users []string Mentions utils.Range Tags utils.Range // contains filtered or unexported fields }
func NewAutoPostCreator ¶
func NewAutoPostCreator(client *model.Client, channelid string) *AutoPostCreator
Automatic poster used for testing
func (*AutoPostCreator) CreateRandomPost ¶
func (cfg *AutoPostCreator) CreateRandomPost() (*model.Post, bool)
func (*AutoPostCreator) CreateTestPosts ¶
func (*AutoPostCreator) UploadTestFile ¶
func (cfg *AutoPostCreator) UploadTestFile() ([]string, bool)
type AutoTeamCreator ¶
type AutoTeamCreator struct { Fuzzy bool NameLength utils.Range NameCharset string DomainLength utils.Range DomainCharset string EmailLength utils.Range EmailCharset string // contains filtered or unexported fields }
func NewAutoTeamCreator ¶
func NewAutoTeamCreator(client *model.Client) *AutoTeamCreator
func (*AutoTeamCreator) CreateTestTeams ¶
type AutoUserCreator ¶
type AutoUserCreator struct { EmailLength utils.Range EmailCharset string NameLength utils.Range NameCharset string Fuzzy bool // contains filtered or unexported fields }
func NewAutoUserCreator ¶
func NewAutoUserCreator(client *model.Client, team *model.Team) *AutoUserCreator
func (*AutoUserCreator) CreateTestUsers ¶
type AwayProvider ¶
type AwayProvider struct { }
func (*AwayProvider) DoCommand ¶
func (me *AwayProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*AwayProvider) GetCommand ¶
func (me *AwayProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*AwayProvider) GetTrigger ¶
func (me *AwayProvider) GetTrigger() string
type ChannelImportData ¶
type ClientConfigPlugin ¶
Temporary WIP function/type for experimental webapp plugins
type ClusterDiscoveryService ¶
type ClusterDiscoveryService struct { model.ClusterDiscovery // contains filtered or unexported fields }
func NewClusterDiscoveryService ¶
func NewClusterDiscoveryService() *ClusterDiscoveryService
func (*ClusterDiscoveryService) Start ¶
func (me *ClusterDiscoveryService) Start()
func (*ClusterDiscoveryService) Stop ¶
func (me *ClusterDiscoveryService) Stop()
type CodeProvider ¶
type CodeProvider struct { }
func (*CodeProvider) DoCommand ¶
func (me *CodeProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*CodeProvider) GetCommand ¶
func (me *CodeProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*CodeProvider) GetTrigger ¶
func (me *CodeProvider) GetTrigger() string
type CollapseProvider ¶
type CollapseProvider struct { }
func (*CollapseProvider) DoCommand ¶
func (me *CollapseProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*CollapseProvider) GetCommand ¶
func (me *CollapseProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*CollapseProvider) GetTrigger ¶
func (me *CollapseProvider) GetTrigger() string
type CommandProvider ¶
type CommandProvider interface { GetTrigger() string GetCommand(T goi18n.TranslateFunc) *model.Command DoCommand(args *model.CommandArgs, message string) *model.CommandResponse }
func GetCommandProvider ¶
func GetCommandProvider(name string) CommandProvider
type CorsWrapper ¶
type CorsWrapper struct {
// contains filtered or unexported fields
}
func (*CorsWrapper) ServeHTTP ¶
func (cw *CorsWrapper) ServeHTTP(w http.ResponseWriter, r *http.Request)
type DirectChannelImportData ¶
type DirectPostImportData ¶
type EchoProvider ¶
type EchoProvider struct { }
func (*EchoProvider) DoCommand ¶
func (me *EchoProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*EchoProvider) GetCommand ¶
func (me *EchoProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*EchoProvider) GetTrigger ¶
func (me *EchoProvider) GetTrigger() string
type EmailBatchingJob ¶
type EmailBatchingJob struct {
// contains filtered or unexported fields
}
func MakeEmailBatchingJob ¶
func MakeEmailBatchingJob(bufferSize int) *EmailBatchingJob
func (*EmailBatchingJob) CheckPendingEmails ¶
func (job *EmailBatchingJob) CheckPendingEmails()
func (*EmailBatchingJob) Start ¶
func (job *EmailBatchingJob) Start()
type ExpandProvider ¶
type ExpandProvider struct { }
func (*ExpandProvider) DoCommand ¶
func (me *ExpandProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*ExpandProvider) GetCommand ¶
func (me *ExpandProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*ExpandProvider) GetTrigger ¶
func (me *ExpandProvider) GetTrigger() string
type HeaderProvider ¶
type HeaderProvider struct { }
func (*HeaderProvider) DoCommand ¶
func (me *HeaderProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*HeaderProvider) GetCommand ¶
func (me *HeaderProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*HeaderProvider) GetTrigger ¶
func (me *HeaderProvider) GetTrigger() string
type HelpProvider ¶
type HelpProvider struct { }
func (*HelpProvider) DoCommand ¶
func (h *HelpProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*HelpProvider) GetCommand ¶
func (h *HelpProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*HelpProvider) GetTrigger ¶
func (h *HelpProvider) GetTrigger() string
type Hub ¶
type Hub struct { ExplicitStop bool // contains filtered or unexported fields }
func GetHubForUserId ¶
func (*Hub) Broadcast ¶
func (h *Hub) Broadcast(message *model.WebSocketEvent)
func (*Hub) InvalidateUser ¶
func (*Hub) Unregister ¶
type InvitePeopleProvider ¶
type InvitePeopleProvider struct { }
func (*InvitePeopleProvider) DoCommand ¶
func (me *InvitePeopleProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*InvitePeopleProvider) GetCommand ¶
func (me *InvitePeopleProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*InvitePeopleProvider) GetTrigger ¶
func (me *InvitePeopleProvider) GetTrigger() string
type JoinProvider ¶
type JoinProvider struct { }
func (*JoinProvider) DoCommand ¶
func (me *JoinProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*JoinProvider) GetCommand ¶
func (me *JoinProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*JoinProvider) GetTrigger ¶
func (me *JoinProvider) GetTrigger() string
type LeaveProvider ¶
type LeaveProvider struct { }
func (*LeaveProvider) DoCommand ¶
func (me *LeaveProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LeaveProvider) GetCommand ¶
func (me *LeaveProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*LeaveProvider) GetTrigger ¶
func (me *LeaveProvider) GetTrigger() string
type LineImportData ¶
type LineImportData struct { Type string `json:"type"` Team *TeamImportData `json:"team"` Channel *ChannelImportData `json:"channel"` User *UserImportData `json:"user"` Post *PostImportData `json:"post"` DirectChannel *DirectChannelImportData `json:"direct_channel"` DirectPost *DirectPostImportData `json:"direct_post"` Version *int `json:"version"` }
type LineImportWorkerData ¶
type LineImportWorkerData struct { LineImportData LineNumber int }
type LineImportWorkerError ¶
type LoadTestProvider ¶
type LoadTestProvider struct { }
func (*LoadTestProvider) ChannelsCommand ¶
func (me *LoadTestProvider) ChannelsCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) DoCommand ¶
func (me *LoadTestProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) GetCommand ¶
func (me *LoadTestProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*LoadTestProvider) GetTrigger ¶
func (me *LoadTestProvider) GetTrigger() string
func (*LoadTestProvider) HelpCommand ¶
func (me *LoadTestProvider) HelpCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) JsonCommand ¶
func (me *LoadTestProvider) JsonCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) PostsCommand ¶
func (me *LoadTestProvider) PostsCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) SetupCommand ¶
func (me *LoadTestProvider) SetupCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) UrlCommand ¶
func (me *LoadTestProvider) UrlCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) UsersCommand ¶
func (me *LoadTestProvider) UsersCommand(args *model.CommandArgs, message string) *model.CommandResponse
type LogoutProvider ¶
type LogoutProvider struct { }
func (*LogoutProvider) DoCommand ¶
func (me *LogoutProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LogoutProvider) GetCommand ¶
func (me *LogoutProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*LogoutProvider) GetTrigger ¶
func (me *LogoutProvider) GetTrigger() string
type MeProvider ¶
type MeProvider struct { }
func (*MeProvider) DoCommand ¶
func (me *MeProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*MeProvider) GetCommand ¶
func (me *MeProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*MeProvider) GetTrigger ¶
func (me *MeProvider) GetTrigger() string
type OfflineProvider ¶
type OfflineProvider struct { }
func (*OfflineProvider) DoCommand ¶
func (me *OfflineProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*OfflineProvider) GetCommand ¶
func (me *OfflineProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*OfflineProvider) GetTrigger ¶
func (me *OfflineProvider) GetTrigger() string
type OnlineProvider ¶
type OnlineProvider struct { }
func (*OnlineProvider) DoCommand ¶
func (me *OnlineProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*OnlineProvider) GetCommand ¶
func (me *OnlineProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*OnlineProvider) GetTrigger ¶
func (me *OnlineProvider) GetTrigger() string
type OpenProvider ¶
type OpenProvider struct {
JoinProvider
}
func (*OpenProvider) GetCommand ¶
func (open *OpenProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*OpenProvider) GetTrigger ¶
func (open *OpenProvider) GetTrigger() string
type PluginAPI ¶
type PluginAPI struct {
// contains filtered or unexported fields
}
func (*PluginAPI) CreatePost ¶
func (*PluginAPI) GetChannelByName ¶
func (*PluginAPI) GetDirectChannel ¶
func (*PluginAPI) GetLdapUserAttributes ¶
func (*PluginAPI) GetSessionFromRequest ¶
func (*PluginAPI) GetTeamByName ¶
func (*PluginAPI) GetUserByName ¶
func (*PluginAPI) LoadPluginConfiguration ¶
func (*PluginAPI) PluginRouter ¶
type PostImportData ¶
type PurposeProvider ¶
type PurposeProvider struct { }
func (*PurposeProvider) DoCommand ¶
func (me *PurposeProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*PurposeProvider) GetCommand ¶
func (me *PurposeProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*PurposeProvider) GetTrigger ¶
func (me *PurposeProvider) GetTrigger() string
type RecoveryLogger ¶
type RecoveryLogger struct { }
func (*RecoveryLogger) Println ¶
func (rl *RecoveryLogger) Println(i ...interface{})
type RenameProvider ¶
type RenameProvider struct { }
func (*RenameProvider) DoCommand ¶
func (me *RenameProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*RenameProvider) GetCommand ¶
func (me *RenameProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*RenameProvider) GetTrigger ¶
func (me *RenameProvider) GetTrigger() string
type SearchProvider ¶
type SearchProvider struct { }
func (*SearchProvider) DoCommand ¶
func (search *SearchProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*SearchProvider) GetCommand ¶
func (search *SearchProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*SearchProvider) GetTrigger ¶
func (search *SearchProvider) GetTrigger() string
type Server ¶
type Server struct { Store store.Store WebSocketRouter *WebSocketRouter Router *mux.Router GracefulServer *graceful.Server PluginEnv *pluginenv.Environment }
var Srv *Server
type SettingsProvider ¶
type SettingsProvider struct { }
func (*SettingsProvider) DoCommand ¶
func (settings *SettingsProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*SettingsProvider) GetCommand ¶
func (settings *SettingsProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*SettingsProvider) GetTrigger ¶
func (settings *SettingsProvider) GetTrigger() string
type ShortcutsProvider ¶
type ShortcutsProvider struct { }
func (*ShortcutsProvider) DoCommand ¶
func (me *ShortcutsProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*ShortcutsProvider) GetCommand ¶
func (me *ShortcutsProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*ShortcutsProvider) GetTrigger ¶
func (me *ShortcutsProvider) GetTrigger() string
type ShrugProvider ¶
type ShrugProvider struct { }
func (*ShrugProvider) DoCommand ¶
func (me *ShrugProvider) DoCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*ShrugProvider) GetCommand ¶
func (me *ShrugProvider) GetCommand(T goi18n.TranslateFunc) *model.Command
func (*ShrugProvider) GetTrigger ¶
func (me *ShrugProvider) GetTrigger() string
type SlackChannel ¶
type SlackChannel struct { Id string `json:"id"` Name string `json:"name"` Members []string `json:"members"` Topic map[string]string `json:"topic"` Purpose map[string]string `json:"purpose"` }
func SlackParseChannels ¶
func SlackParseChannels(data io.Reader) ([]SlackChannel, error)
type SlackComment ¶
type SlackPost ¶
type SlackPost struct { User string `json:"user"` BotId string `json:"bot_id"` BotUsername string `json:"username"` Text string `json:"text"` TimeStamp string `json:"ts"` Type string `json:"type"` SubType string `json:"subtype"` Comment *SlackComment `json:"comment"` Upload bool `json:"upload"` File *SlackFile `json:"file"` Attachments []*model.SlackAttachment `json:"attachments"` }
type SlackUser ¶
type TeamEnvironment ¶
type TeamImportData ¶
type TestEnvironment ¶
type TestEnvironment struct { Teams []*model.Team Environments []TeamEnvironment }
type TestHelper ¶
type TestHelper struct { BasicTeam *model.Team BasicUser *model.User BasicUser2 *model.User BasicChannel *model.Channel BasicPost *model.Post }
func Setup ¶
func Setup() *TestHelper
func SetupEnterprise ¶
func SetupEnterprise() *TestHelper
func (*TestHelper) CreateChannel ¶
func (me *TestHelper) CreateChannel(team *model.Team) *model.Channel
func (*TestHelper) CreatePost ¶
func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post
func (*TestHelper) CreatePrivateChannel ¶
func (me *TestHelper) CreatePrivateChannel(team *model.Team) *model.Channel
func (*TestHelper) CreateTeam ¶
func (me *TestHelper) CreateTeam() *model.Team
func (*TestHelper) CreateUser ¶
func (me *TestHelper) CreateUser() *model.User
func (*TestHelper) InitBasic ¶
func (me *TestHelper) InitBasic() *TestHelper
func (*TestHelper) MakeEmail ¶
func (me *TestHelper) MakeEmail() string
func (*TestHelper) MakeUsername ¶
func (me *TestHelper) MakeUsername() string
type UserChannelImportData ¶
type UserChannelImportData struct { Name *string `json:"name"` Roles *string `json:"roles"` NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props"` Favorite *bool `json:"favorite"` }
type UserImportData ¶
type UserImportData struct { Username *string `json:"username"` Email *string `json:"email"` AuthService *string `json:"auth_service"` AuthData *string `json:"auth_data"` Password *string `json:"password"` Nickname *string `json:"nickname"` FirstName *string `json:"first_name"` LastName *string `json:"last_name"` Position *string `json:"position"` Roles *string `json:"roles"` Locale *string `json:"locale"` Teams *[]UserTeamImportData `json:"teams"` Theme *string `json:"theme"` UseMilitaryTime *string `json:"military_time"` CollapsePreviews *string `json:"link_previews"` MessageDisplay *string `json:"message_display"` ChannelDisplayMode *string `json:"channel_display_mode"` TutorialStep *string `json:"tutorial_step"` NotifyProps *UserNotifyPropsImportData `json:"notify_props"` }
type UserNotifyPropsImportData ¶
type UserNotifyPropsImportData struct { Desktop *string `json:"desktop"` DesktopDuration *string `json:"desktop_duration"` DesktopSound *string `json:"desktop_sound"` Email *string `json:"email"` Mobile *string `json:"mobile"` MobilePushStatus *string `json:"mobile_push_status"` ChannelTrigger *string `json:"channel"` CommentsTrigger *string `json:"comments"` MentionKeys *string `json:"mention_keys"` }
type UserTeamImportData ¶
type UserTeamImportData struct { Name *string `json:"name"` Roles *string `json:"roles"` Channels *[]UserChannelImportData `json:"channels"` }
type WebConn ¶
type WebConn struct { WebSocket *websocket.Conn Send chan model.WebSocketMessage UserId string T goi18n.TranslateFunc Locale string AllChannelMembers map[string]string LastAllChannelMembersTime int64 Sequence int64 // contains filtered or unexported fields }
func NewWebConn ¶
func (*WebConn) GetSession ¶
func (*WebConn) GetSessionExpiresAt ¶
func (*WebConn) GetSessionToken ¶
func (*WebConn) InvalidateCache ¶
func (webCon *WebConn) InvalidateCache()
func (*WebConn) IsAuthenticated ¶
func (*WebConn) IsMemberOfTeam ¶
func (*WebConn) SetSession ¶
func (*WebConn) SetSessionExpiresAt ¶
func (*WebConn) SetSessionToken ¶
func (*WebConn) ShouldSendEvent ¶
func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool
type WebSocketRouter ¶
type WebSocketRouter struct {
// contains filtered or unexported fields
}
func NewWebSocketRouter ¶
func NewWebSocketRouter() *WebSocketRouter
func (*WebSocketRouter) Handle ¶
func (wr *WebSocketRouter) Handle(action string, handler webSocketHandler)
func (*WebSocketRouter) ServeWebSocket ¶
func (wr *WebSocketRouter) ServeWebSocket(conn *WebConn, r *model.WebSocketRequest)
Source Files ¶
- admin.go
- analytics.go
- app.go
- apptestlib.go
- audit.go
- authentication.go
- authorization.go
- auto_channels.go
- auto_constants.go
- auto_environment.go
- auto_posts.go
- auto_teams.go
- auto_users.go
- brand.go
- channel.go
- cluster_discovery.go
- cluster_handlers.go
- command.go
- command_away.go
- command_channel_header.go
- command_channel_purpose.go
- command_channel_rename.go
- command_code.go
- command_echo.go
- command_expand_collapse.go
- command_help.go
- command_invite_people.go
- command_join.go
- command_leave.go
- command_loadtest.go
- command_logout.go
- command_me.go
- command_msg.go
- command_offline.go
- command_online.go
- command_open.go
- command_search.go
- command_settings.go
- command_shortcuts.go
- command_shrug.go
- compliance.go
- diagnostics.go
- elasticsearch.go
- email.go
- email_batching.go
- emoji.go
- file.go
- import.go
- job.go
- ldap.go
- license.go
- login.go
- notification.go
- oauth.go
- plugins.go
- post.go
- preference.go
- reaction.go
- saml.go
- security_update_check.go
- server.go
- session.go
- slackimport.go
- status.go
- team.go
- user.go
- web_conn.go
- web_hub.go
- webhook.go
- webrtc.go
- websocket_router.go