app

package
v5.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2020 License: AGPL-3.0, Apache-2.0 Imports: 96 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DAY_MILLISECONDS   = 24 * 60 * 60 * 1000
	MONTH_MILLISECONDS = 31 * DAY_MILLISECONDS
)
View Source
const (
	RestLevelID        = 240
	RestContentLevelID = 241
	RestPermsLevelID   = 242
	CLILevelID         = 243
)
View Source
const (
	USER_PASSWORD           = "passwd"
	CHANNEL_TYPE            = model.CHANNEL_OPEN
	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"
)
View Source
const (
	BRAND_FILE_PATH = "brand/"
	BRAND_FILE_NAME = "image.png"
)
View Source
const (
	CMD_EXPAND   = "expand"
	CMD_COLLAPSE = "collapse"
)
View Source
const (
	CMD_REMOVE = "remove"
	CMD_KICK   = "kick"
)
View Source
const (
	SEGMENT_KEY = "placeholder_segment_key"

	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_NOTIFICATION_LOG   = "config_notifications_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_SUPPORT            = "config_support"
	TRACK_CONFIG_NATIVEAPP          = "config_nativeapp"
	TRACK_CONFIG_EXPERIMENTAL       = "config_experimental"
	TRACK_CONFIG_ANALYTICS          = "config_analytics"
	TRACK_CONFIG_ANNOUNCEMENT       = "config_announcement"
	TRACK_CONFIG_ELASTICSEARCH      = "config_elasticsearch"
	TRACK_CONFIG_PLUGIN             = "config_plugin"
	TRACK_CONFIG_DATA_RETENTION     = "config_data_retention"
	TRACK_CONFIG_MESSAGE_EXPORT     = "config_message_export"
	TRACK_CONFIG_DISPLAY            = "config_display"
	TRACK_CONFIG_GUEST_ACCOUNTS     = "config_guest_accounts"
	TRACK_CONFIG_IMAGE_PROXY        = "config_image_proxy"
	TRACK_PERMISSIONS_GENERAL       = "permissions_general"
	TRACK_PERMISSIONS_SYSTEM_SCHEME = "permissions_system_scheme"
	TRACK_PERMISSIONS_TEAM_SCHEMES  = "permissions_team_schemes"
	TRACK_ELASTICSEARCH             = "elasticsearch"
	TRACK_GROUPS                    = "groups"
	TRACK_CHANNEL_MODERATION        = "channel_moderation"

	TRACK_ACTIVITY = "activity"
	TRACK_LICENSE  = "license"
	TRACK_SERVER   = "server"
	TRACK_PLUGINS  = "plugins"
)
View Source
const (
	MaxEmojiFileSize       = 1 << 20 // 1 MB
	MaxEmojiWidth          = 128
	MaxEmojiHeight         = 128
	MaxEmojiOriginalWidth  = 1028
	MaxEmojiOriginalHeight = 1028
)
View Source
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
	ImageThumbnailWidth  = 120
	ImageThumbnailHeight = 100
	ImageThumbnailRatio  = float64(ImageThumbnailHeight) / float64(ImageThumbnailWidth)
	ImagePreviewWidth    = 1920

	UploadFileInitialBufferSize = 2 * 1024 * 1024 // 2Mb

	// Deprecated
	IMAGE_THUMBNAIL_PIXEL_WIDTH  = 120
	IMAGE_THUMBNAIL_PIXEL_HEIGHT = 100
	IMAGE_PREVIEW_PIXEL_WIDTH    = 1920
)
View Source
const (
	OAUTH_COOKIE_MAX_AGE_SECONDS = 30 * 60 // 30 minutes
	COOKIE_OAUTH                 = "MMOAUTH"
)
View Source
const (
	PERMISSION_MANAGE_SYSTEM                     = "manage_system"
	PERMISSION_MANAGE_EMOJIS                     = "manage_emojis"
	PERMISSION_MANAGE_OTHERS_EMOJIS              = "manage_others_emojis"
	PERMISSION_CREATE_EMOJIS                     = "create_emojis"
	PERMISSION_DELETE_EMOJIS                     = "delete_emojis"
	PERMISSION_DELETE_OTHERS_EMOJIS              = "delete_others_emojis"
	PERMISSION_MANAGE_WEBHOOKS                   = "manage_webhooks"
	PERMISSION_MANAGE_OTHERS_WEBHOOKS            = "manage_others_webhooks"
	PERMISSION_MANAGE_INCOMING_WEBHOOKS          = "manage_incoming_webhooks"
	PERMISSION_MANAGE_OTHERS_INCOMING_WEBHOOKS   = "manage_others_incoming_webhooks"
	PERMISSION_MANAGE_OUTGOING_WEBHOOKS          = "manage_outgoing_webhooks"
	PERMISSION_MANAGE_OTHERS_OUTGOING_WEBHOOKS   = "manage_others_outgoing_webhooks"
	PERMISSION_LIST_PUBLIC_TEAMS                 = "list_public_teams"
	PERMISSION_LIST_PRIVATE_TEAMS                = "list_private_teams"
	PERMISSION_JOIN_PUBLIC_TEAMS                 = "join_public_teams"
	PERMISSION_JOIN_PRIVATE_TEAMS                = "join_private_teams"
	PERMISSION_PERMANENT_DELETE_USER             = "permanent_delete_user"
	PERMISSION_CREATE_BOT                        = "create_bot"
	PERMISSION_READ_BOTS                         = "read_bots"
	PERMISSION_READ_OTHERS_BOTS                  = "read_others_bots"
	PERMISSION_MANAGE_BOTS                       = "manage_bots"
	PERMISSION_MANAGE_OTHERS_BOTS                = "manage_others_bots"
	PERMISSION_DELETE_PUBLIC_CHANNEL             = "delete_public_channel"
	PERMISSION_DELETE_PRIVATE_CHANNEL            = "delete_private_channel"
	PERMISSION_MANAGE_PUBLIC_CHANNEL_PROPERTIES  = "manage_public_channel_properties"
	PERMISSION_MANAGE_PRIVATE_CHANNEL_PROPERTIES = "manage_private_channel_properties"
	PERMISSION_VIEW_MEMBERS                      = "view_members"
	PERMISSION_INVITE_USER                       = "invite_user"
	PERMISSION_INVITE_GUEST                      = "invite_guest"
	PERMISSION_PROMOTE_GUEST                     = "promote_guest"
	PERMISSION_DEMOTE_TO_GUEST                   = "demote_to_guest"
	PERMISSION_USE_CHANNEL_MENTIONS              = "use_channel_mentions"
	PERMISSION_CREATE_POST                       = "create_post"
	PERMISSION_CREATE_POST_PUBLIC                = "create_post_public"
	PERMISSION_USE_GROUP_MENTIONS                = "use_group_mentions"
	PERMISSION_ADD_REACTION                      = "add_reaction"
	PERMISSION_REMOVE_REACTION                   = "remove_reaction"
	PERMISSION_MANAGE_PUBLIC_CHANNEL_MEMBERS     = "manage_public_channel_members"
	PERMISSION_MANAGE_PRIVATE_CHANNEL_MEMBERS    = "manage_private_channel_members"
)
View Source
const (
	SamlPublicCertificateName = "saml-public.crt"
	SamlPrivateKeyName        = "saml-private.key"
	SamlIdpCertificateName    = "saml-idp.crt"
)
View Source
const (
	SECURITY_URL           = "https://securityupdatecheck.mattermost.com"
	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"
)
View Source
const (
	TOKEN_TYPE_PASSWORD_RECOVERY  = "password_recovery"
	TOKEN_TYPE_VERIFY_EMAIL       = "verify_email"
	TOKEN_TYPE_TEAM_INVITATION    = "team_invitation"
	TOKEN_TYPE_GUEST_INVITATION   = "guest_invitation"
	PASSWORD_RECOVER_EXPIRY_TIME  = 1000 * 60 * 60      // 1 hour
	INVITATION_EXPIRY_TIME        = 1000 * 60 * 60 * 48 // 48 hours
	IMAGE_PROFILE_PIXEL_DIMENSION = 128
)
View Source
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
)
View Source
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
)
View Source
const (
	TRIGGERWORDS_EXACT_MATCH = 0
	TRIGGERWORDS_STARTS_WITH = 1

	MaxIntegrationResponseSize = 1024 * 1024 // Posts can be <100KB at most, so this is likely more than enough
)
View Source
const ADVANCED_PERMISSIONS_MIGRATION_KEY = "AdvancedPermissionsMigrationComplete"
View Source
const (
	CMD_AWAY = "away"
)
View Source
const (
	CMD_CODE = "code"
)
View Source
const (
	CMD_DND = "dnd"
)
View Source
const (
	CMD_ECHO = "echo"
)
View Source
const (
	CMD_GROUPMSG = "groupmsg"
)
View Source
const (
	CMD_HELP = "help"
)
View Source
const (
	CMD_INVITE = "invite"
)
View Source
const (
	CMD_INVITE_PEOPLE = "invite_people"
)
View Source
const (
	CMD_JOIN = "join"
)
View Source
const (
	CMD_LEAVE = "leave"
)
View Source
const (
	CMD_LOGOUT = "logout"
)
View Source
const (
	CMD_ME = "me"
)
View Source
const (
	CMD_MSG = "msg"
)
View Source
const (
	CMD_MUTE = "mute"
)
View Source
const (
	CMD_OFFLINE = "offline"
)
View Source
const (
	CMD_ONLINE = "online"
)
View Source
const (
	CMD_OPEN = "open"
)
View Source
const (
	CMD_SEARCH = "search"
)
View Source
const (
	CMD_SETTINGS = "settings"
)
View Source
const (
	CMD_SHORTCUTS = "shortcuts"
)
View Source
const (
	CMD_SHRUG = "shrug"
)
View Source
const (
	CMD_TEST = "test"
)
View Source
const (
	DISCOVERY_SERVICE_WRITE_PING = 60 * time.Second
)
View Source
const (
	EMAIL_BATCHING_TASK_NAME = "Email Batching"
)
View Source
const EMOJIS_PERMISSIONS_MIGRATION_KEY = "EmojisPermissionsMigrationComplete"
View Source
const (
	ERROR_TERMS_OF_SERVICE_NO_ROWS_FOUND = "store.sql_terms_of_service_store.get.no_rows.app_error"
)
View Source
const GUEST_ROLES_CREATION_MIGRATION_KEY = "GuestRolesCreationMigrationComplete"
View Source
const (
	// HTTP_REQUEST_TIMEOUT defines a high timeout for downloading large files
	// from an external URL to avoid slow connections from failing to install.
	HTTP_REQUEST_TIMEOUT = 1 * time.Hour
)
View Source
const MaxOpenGraphResponseSize = 1024 * 1024 * 50
View Source
const PUSH_NOTIFICATIONS_HUB_BUFFER_PER_WORKER = 50
View Source
const PUSH_NOTIFICATION_HUB_WORKERS = 1000
View Source
const (
	SESSIONS_CLEANUP_BATCH_SIZE = 1000
)
View Source
const SLACK_IMPORT_MAX_FILE_SIZE = 1024 * 1024 * 70
View Source
const (
	TIMESTAMP_FORMAT = "Mon Jan 2 15:04:05 -0700 MST 2006"
)
View Source
const TIME_TO_WAIT_FOR_CONNECTIONS_TO_CLOSE_ON_SERVER_SHUTDOWN = time.Second

Variables

View Source
var (
	RestLevel        = audit.Level{ID: RestLevelID, Name: "audit-rest", Stacktrace: false}
	RestContentLevel = audit.Level{ID: RestContentLevelID, Name: "audit-rest-content", Stacktrace: false}
	RestPermsLevel   = audit.Level{ID: RestPermsLevelID, Name: "audit-rest-perms", Stacktrace: false}
	CLILevel         = audit.Level{ID: CLILevelID, Name: "audit-cli", Stacktrace: false}
)
View Source
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}
	TEST_IMAGE_FILENAMES     = []string{"test.png", "testjpg.jpg", "testgif.gif"}
)
View Source
var MaxNotificationsPerChannelDefault int64 = 1000000

Functions

func CheckEmailDomain

func CheckEmailDomain(email string, domains string) bool

CheckEmailDomain checks that an email domain matches a list of space-delimited domains as a string.

func CheckUserDomain

func CheckUserDomain(user *model.User, domains string) bool

CheckUserDomain checks that a user's email domain matches a list of space-delimited domains as a string.

func CreateProfileImage

func CreateProfileImage(username string, userId string, initialFont string) ([]byte, *model.AppError)

func DoesNotifyPropsAllowPushNotification

func DoesNotifyPropsAllowPushNotification(user *model.User, channelNotifyProps model.StringMap, post *model.Post, wasMentioned bool) bool

func DoesStatusAllowPushNotification

func DoesStatusAllowPushNotification(userNotifyProps model.StringMap, status *model.Status, channelId string) bool

func GeneratePublicLinkHash

func GeneratePublicLinkHash(fileId, salt string) string

func GetProtocol

func GetProtocol(r *http.Request) string

func JoinCluster

func JoinCluster(s *Server) error

func RegisterAccountMigrationInterface

func RegisterAccountMigrationInterface(f func(*Server) einterfaces.AccountMigrationInterface)

func RegisterClusterInterface

func RegisterClusterInterface(f func(*Server) einterfaces.ClusterInterface)

func RegisterCommandProvider

func RegisterCommandProvider(newProvider CommandProvider)

func RegisterComplianceInterface

func RegisterComplianceInterface(f func(*Server) einterfaces.ComplianceInterface)

func RegisterDataRetentionInterface

func RegisterDataRetentionInterface(f func(*Server) einterfaces.DataRetentionInterface)

func RegisterElasticsearchInterface

func RegisterElasticsearchInterface(f func(*Server) searchengine.SearchEngineInterface)

func RegisterJobsDataRetentionJobInterface

func RegisterJobsDataRetentionJobInterface(f func(*Server) ejobs.DataRetentionJobInterface)

func RegisterJobsElasticsearchAggregatorInterface

func RegisterJobsElasticsearchAggregatorInterface(f func(*Server) ejobs.ElasticsearchAggregatorInterface)

func RegisterJobsElasticsearchIndexerInterface

func RegisterJobsElasticsearchIndexerInterface(f func(*Server) ejobs.ElasticsearchIndexerInterface)

func RegisterJobsLdapSyncInterface

func RegisterJobsLdapSyncInterface(f func(*App) ejobs.LdapSyncInterface)

func RegisterJobsMessageExportJobInterface

func RegisterJobsMessageExportJobInterface(f func(*Server) ejobs.MessageExportJobInterface)

func RegisterJobsMigrationsJobInterface

func RegisterJobsMigrationsJobInterface(f func(*App) tjobs.MigrationsJobInterface)

func RegisterJobsPluginsJobInterface

func RegisterJobsPluginsJobInterface(f func(*App) tjobs.PluginsJobInterface)

func RegisterLdapInterface

func RegisterLdapInterface(f func(*App) einterfaces.LdapInterface)

func RegisterMessageExportInterface

func RegisterMessageExportInterface(f func(*Server) einterfaces.MessageExportInterface)

func RegisterMetricsInterface

func RegisterMetricsInterface(f func(*Server) einterfaces.MetricsInterface)

func RegisterNewSamlInterface

func RegisterNewSamlInterface(f func(*App) einterfaces.SamlInterface)

func RegisterNotificationInterface

func RegisterNotificationInterface(f func(*App) einterfaces.NotificationInterface)

func RegisterSamlInterface

func RegisterSamlInterface(f func(*App) einterfaces.SamlInterface)

func RemoveRoles

func RemoveRoles(rolesToRemove []string, roles string) string

func ReturnWebSocketError

func ReturnWebSocketError(conn *WebConn, r *model.WebSocketRequest, err *model.AppError)

func RunJobs

func RunJobs(s *Server) error

func ShouldSendPushNotification

func ShouldSendPushNotification(user *model.User, channelNotifyProps model.StringMap, wasMentioned bool, status *model.Status, post *model.Post) bool

func SlackConvertChannelMentions

func SlackConvertChannelMentions(channels []SlackChannel, posts map[string][]SlackPost) map[string][]SlackPost

func SlackConvertChannelName

func SlackConvertChannelName(channelName string, channelId string) string

func SlackConvertPostsMarkup

func SlackConvertPostsMarkup(posts map[string][]SlackPost) map[string][]SlackPost

func SlackConvertTimeStamp

func SlackConvertTimeStamp(ts string) int64

func SlackConvertUserMentions

func SlackConvertUserMentions(users []SlackUser, posts map[string][]SlackPost) map[string][]SlackPost

func SlackSanitiseChannelProperties

func SlackSanitiseChannelProperties(channel model.Channel) model.Channel

func SplitWebhookPost

func SplitWebhookPost(post *model.Post, maxPostSize int) ([]*model.Post, *model.AppError)

func StartMetrics

func StartMetrics(s *Server) error

func StartSearchEngine

func StartSearchEngine(s *Server) error

func UploadFileSetClientId

func UploadFileSetClientId(clientId string) func(t *UploadFileTask)

func UploadFileSetContentLength

func UploadFileSetContentLength(contentLength int64) func(t *UploadFileTask)

func UploadFileSetRaw

func UploadFileSetRaw() func(t *UploadFileTask)

func UploadFileSetTeamId

func UploadFileSetTeamId(teamId string) func(t *UploadFileTask)

func UploadFileSetTimestamp

func UploadFileSetTimestamp(timestamp time.Time) func(t *UploadFileTask)

func UploadFileSetUserId

func UploadFileSetUserId(userId string) func(t *UploadFileTask)

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(options ...AppOption) *App

func (*App) AcceptLanguage

func (a *App) AcceptLanguage() string

func (*App) AccountMigration

func (a *App) AccountMigration() einterfaces.AccountMigrationInterface

func (*App) ActivateMfa

func (a *App) ActivateMfa(userId, token string) *model.AppError

func (*App) AddConfigListener

func (a *App) AddConfigListener(listener func(*model.Config, *model.Config)) string

func (*App) AddLicenseListener

func (a *App) AddLicenseListener(listener func(oldLicense, newLicense *model.License)) string

func (*App) AddNotificationEmailToBatch

func (a *App) AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError

func (*App) AddSamlIdpCertificate

func (a *App) AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError

func (*App) AddSamlPrivateCertificate

func (a *App) AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError

func (*App) AddSamlPublicCertificate

func (a *App) AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError

func (*App) AddSessionToCache

func (a *App) AddSessionToCache(session *model.Session)

func (*App) AddStatusCache

func (a *App) AddStatusCache(status *model.Status)

func (*App) AddStatusCacheSkipClusterSend

func (a *App) AddStatusCacheSkipClusterSend(status *model.Status)

func (*App) AllowOAuthAppAccessToUser

func (a *App) AllowOAuthAppAccessToUser(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)

func (*App) AsymmetricSigningKey

func (a *App) AsymmetricSigningKey() *ecdsa.PrivateKey

func (*App) AttachDeviceId

func (a *App) AttachDeviceId(sessionId string, deviceId string, expiresAt int64) *model.AppError

func (*App) AttachSessionCookies

func (a *App) AttachSessionCookies(w http.ResponseWriter, r *http.Request)

func (*App) AuthenticateUserForLogin

func (a *App) AuthenticateUserForLogin(id, loginId, password, mfaToken string, ldapOnly bool) (user *model.User, err *model.AppError)

func (*App) AuthorizeOAuthUser

func (a *App) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service, code, state, redirectUri string) (io.ReadCloser, string, map[string]string, *model.AppError)

func (*App) AutocompleteUsersInChannel

func (a *App) AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError)

func (*App) AutocompleteUsersInTeam

func (a *App) AutocompleteUsersInTeam(teamId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInTeam, *model.AppError)

func (*App) BroadcastStatus

func (a *App) BroadcastStatus(status *model.Status)

func (*App) BuildPostReactions

func (a *App) BuildPostReactions(postId string) (*[]ReactionImportData, *model.AppError)

func (*App) BuildPushNotificationMessage

func (a *App) BuildPushNotificationMessage(contentsConfig string, post *model.Post, user *model.User, channel *model.Channel, channelName string, senderName string,
	explicitMention bool, channelWideMention bool, replyToThreadType string) (*model.PushNotification, *model.AppError)

func (*App) BuildSamlMetadataObject

func (a *App) BuildSamlMetadataObject(idpMetadata []byte) (*model.SamlMetadataResponse, *model.AppError)

func (*App) BulkExport

func (a *App) BulkExport(writer io.Writer, file string, pathToEmojiDir string, dirNameToExportEmoji string) *model.AppError

func (*App) BulkImport

func (a *App) BulkImport(fileReader io.Reader, dryRun bool, workers int) (*model.AppError, int)

func (*App) CancelJob

func (a *App) CancelJob(jobId string) *model.AppError

func (*App) CheckForClientSideCert

func (a *App) CheckForClientSideCert(r *http.Request) (string, string, string)

func (*App) CheckPasswordAndAllCriteria

func (a *App) CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError

func (*App) CheckRolesExist

func (a *App) CheckRolesExist(roleNames []string) *model.AppError

func (*App) CheckUserAllAuthenticationCriteria

func (a *App) CheckUserAllAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError

func (*App) CheckUserMfa

func (a *App) CheckUserMfa(user *model.User, token string) *model.AppError

func (*App) CheckUserPostflightAuthenticationCriteria

func (a *App) CheckUserPostflightAuthenticationCriteria(user *model.User) *model.AppError

func (*App) CheckUserPreflightAuthenticationCriteria

func (a *App) CheckUserPreflightAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError

func (*App) ClearSessionCacheForAllUsers

func (a *App) ClearSessionCacheForAllUsers()

func (*App) ClearSessionCacheForAllUsersSkipClusterSend

func (a *App) ClearSessionCacheForAllUsersSkipClusterSend()

func (*App) ClearSessionCacheForUser

func (a *App) ClearSessionCacheForUser(userId string)

func (*App) ClearSessionCacheForUserSkipClusterSend

func (a *App) ClearSessionCacheForUserSkipClusterSend(userId string)

func (*App) ClientConfig

func (a *App) ClientConfig() map[string]string

func (*App) ClientConfigHash

func (a *App) ClientConfigHash() string

func (*App) ClientConfigWithComputed

func (a *App) ClientConfigWithComputed() map[string]string

ClientConfigWithComputed gets the configuration in a format suitable for sending to the client.

func (*App) ClientLicense

func (a *App) ClientLicense() map[string]string

func (*App) Cluster

func (a *App) Cluster() einterfaces.ClusterInterface

func (*App) CompleteOAuth

func (a *App) CompleteOAuth(service string, body io.ReadCloser, teamId string, props map[string]string) (*model.User, *model.AppError)

func (*App) CompleteSwitchWithOAuth

func (a *App) CompleteSwitchWithOAuth(service string, userData io.Reader, email string) (*model.User, *model.AppError)

func (*App) Compliance

func (a *App) Compliance() einterfaces.ComplianceInterface

func (*App) Config

func (a *App) Config() *model.Config

func (*App) Context

func (a *App) Context() context.Context

func (*App) CopyFileInfos

func (a *App) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)

func (*App) CreateBasicUser

func (a *App) CreateBasicUser(client *model.Client4) *model.AppError

Basic test team and user so you always know one

func (*App) CreateCommand

func (a *App) CreateCommand(cmd *model.Command) (*model.Command, *model.AppError)

func (*App) CreateCommandPost

func (a *App) CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse, skipSlackParsing bool) (*model.Post, *model.AppError)

@openTracingParams teamId, skipSlackParsing

func (*App) CreateCommandWebhook

func (a *App) CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)

func (*App) CreateDefaultMemberships

func (a *App) CreateDefaultMemberships(since int64) error

CreateDefaultMemberships adds users to teams and channels based on their group memberships and how those groups are configured to sync with teams and channels for group members on or after the given timestamp.

func (*App) CreateEmoji

func (a *App) CreateEmoji(sessionUserId string, emoji *model.Emoji, multiPartImageData *multipart.Form) (*model.Emoji, *model.AppError)

func (*App) CreateGuest

func (a *App) CreateGuest(user *model.User) (*model.User, *model.AppError)

CreateGuest creates a guest and sets several fields of the returned User struct to their zero values.

func (*App) CreateIncomingWebhookForChannel

func (a *App) CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)

func (*App) CreateJob

func (a *App) CreateJob(job *model.Job) (*model.Job, *model.AppError)

func (*App) CreateOAuthApp

func (a *App) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)

func (*App) CreateOAuthStateToken

func (a *App) CreateOAuthStateToken(extra string) (*model.Token, *model.AppError)

func (*App) CreateOAuthUser

func (a *App) CreateOAuthUser(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)

func (*App) CreateOutgoingWebhook

func (a *App) CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)

func (*App) CreatePasswordRecoveryToken

func (a *App) CreatePasswordRecoveryToken(userId, email string) (*model.Token, *model.AppError)

func (*App) CreateRole

func (a *App) CreateRole(role *model.Role) (*model.Role, *model.AppError)

func (*App) CreateScheme

func (a *App) CreateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)

func (*App) CreateSession

func (a *App) CreateSession(session *model.Session) (*model.Session, *model.AppError)

func (*App) CreateTermsOfService

func (a *App) CreateTermsOfService(text, userId string) (*model.TermsOfService, *model.AppError)

func (*App) CreateUser

func (a *App) CreateUser(user *model.User) (*model.User, *model.AppError)

CreateUser creates a user and sets several fields of the returned User struct to their zero values.

func (*App) CreateUserAccessToken

func (a *App) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)

func (*App) CreateUserAsAdmin

func (a *App) CreateUserAsAdmin(user *model.User) (*model.User, *model.AppError)

func (*App) CreateUserFromSignup

func (a *App) CreateUserFromSignup(user *model.User) (*model.User, *model.AppError)

func (*App) CreateUserWithInviteId

func (a *App) CreateUserWithInviteId(user *model.User, inviteId string) (*model.User, *model.AppError)

func (*App) CreateUserWithToken

func (a *App) CreateUserWithToken(user *model.User, token *model.Token) (*model.User, *model.AppError)

func (*App) CreateVerifyEmailToken

func (a *App) CreateVerifyEmailToken(userId string, newEmail string) (*model.Token, *model.AppError)

func (*App) CreateWebhookPost

func (a *App) CreateWebhookPost(userId string, channel *model.Channel, text, overrideUsername, overrideIconUrl, overrideIconEmoji string, props model.StringInterface, postType string, postRootId string) (*model.Post, *model.AppError)

func (*App) DataRetention

func (a *App) DataRetention() einterfaces.DataRetentionInterface

func (*App) DeactivateGuests

func (a *App) DeactivateGuests() *model.AppError

func (*App) DeactivateMfa

func (a *App) DeactivateMfa(userId string) *model.AppError

func (*App) DeauthorizeOAuthAppForUser

func (a *App) DeauthorizeOAuthAppForUser(userId, appId string) *model.AppError

func (*App) DeleteBrandImage

func (a *App) DeleteBrandImage() *model.AppError

func (*App) DeleteCommand

func (a *App) DeleteCommand(commandId string) *model.AppError

func (*App) DeleteEmoji

func (a *App) DeleteEmoji(emoji *model.Emoji) *model.AppError

func (*App) DeleteGroupConstrainedMemberships

func (a *App) DeleteGroupConstrainedMemberships() error

DeleteGroupConstrainedMemberships deletes team and channel memberships of users who aren't members of the allowed groups of all group-constrained teams and channels.

func (*App) DeleteIncomingWebhook

func (a *App) DeleteIncomingWebhook(hookId string) *model.AppError

func (*App) DeleteOAuthApp

func (a *App) DeleteOAuthApp(appId string) *model.AppError

func (*App) DeleteOutgoingWebhook

func (a *App) DeleteOutgoingWebhook(hookId string) *model.AppError

func (*App) DeletePreferences

func (a *App) DeletePreferences(userId string, preferences model.Preferences) *model.AppError

func (*App) DeleteReactionForPost

func (a *App) DeleteReactionForPost(reaction *model.Reaction) *model.AppError

func (*App) DeleteScheme

func (a *App) DeleteScheme(schemeId string) (*model.Scheme, *model.AppError)

func (*App) DeleteToken

func (a *App) DeleteToken(token *model.Token) *model.AppError

func (*App) DemoteUserToGuest

func (a *App) DemoteUserToGuest(user *model.User) *model.AppError

DemoteUserToGuest Convert user's roles and all his mermbership's roles from regular user roles to guest roles.

func (*App) DiagnosticId

func (a *App) DiagnosticId() string

func (*App) DisableAutoResponder

func (a *App) DisableAutoResponder(userId string, asAdmin bool) *model.AppError

func (*App) DisableUserAccessToken

func (a *App) DisableUserAccessToken(token *model.UserAccessToken) *model.AppError

func (*App) DoActionRequest

func (a *App) DoActionRequest(rawURL string, body []byte) (*http.Response, *model.AppError)

Perform an HTTP POST request to an integration's action endpoint. Caller must consume and close returned http.Response as necessary. For internal requests, requests are routed directly to a plugin ServerHTTP hook

func (*App) DoAdvancedPermissionsMigration

func (a *App) DoAdvancedPermissionsMigration()

This function migrates the default built in roles from code/config to the database.

func (*App) DoAppMigrations

func (a *App) DoAppMigrations()

func (*App) DoEmojisPermissionsMigration

func (a *App) DoEmojisPermissionsMigration()

func (*App) DoGuestRolesCreationMigration

func (a *App) DoGuestRolesCreationMigration()

func (*App) DoLocalRequest

func (a *App) DoLocalRequest(rawURL string, body []byte) (*http.Response, *model.AppError)

func (*App) DoLogin

func (a *App) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId string) *model.AppError

func (*App) DoPermissionsMigrations

func (a *App) DoPermissionsMigrations() error

DoPermissionsMigrations execute all the permissions migrations need by the current version.

func (*App) DoPostAction

func (a *App) DoPostAction(postId, actionId, userId, selectedOption string) (string, *model.AppError)

func (*App) DoPostActionWithCookie

func (a *App) DoPostActionWithCookie(postId, actionId, userId, selectedOption string, cookie *model.PostActionCookie) (string, *model.AppError)

func (*App) DoUploadFile

func (a *App) DoUploadFile(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, *model.AppError)

func (*App) DoUploadFileExpectModification

func (a *App) DoUploadFileExpectModification(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, []byte, *model.AppError)

func (*App) DoubleCheckPassword

func (a *App) DoubleCheckPassword(user *model.User, password string) *model.AppError

This to be used for places we check the users password when they are already logged in

func (*App) DownloadFromURL

func (a *App) DownloadFromURL(downloadURL string) ([]byte, error)

func (*App) EnableUserAccessToken

func (a *App) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError

func (*App) EnvironmentConfig

func (a *App) EnvironmentConfig() map[string]interface{}

func (*App) ExecuteCommand

func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)

@openTracingParams args

func (*App) ExportPermissions

func (a *App) ExportPermissions(w io.Writer) error

func (*App) FetchSamlMetadataFromIdp

func (a *App) FetchSamlMetadataFromIdp(url string) ([]byte, *model.AppError)

func (*App) FileBackend

func (a *App) FileBackend() (filesstore.FileBackend, *model.AppError)

func (*App) FileExists

func (a *App) FileExists(path string) (bool, *model.AppError)

func (*App) FileReader

func (a *App) FileReader(path string) (filesstore.ReadCloseSeeker, *model.AppError)

Caller must close the first return value

func (*App) FilterNonGroupChannelMembers

func (a *App) FilterNonGroupChannelMembers(userIds []string, channel *model.Channel) ([]string, error)

FilterNonGroupChannelMembers returns the subset of the given user IDs of the users who are not members of groups associated to the channel excluding bots

func (*App) FilterNonGroupTeamMembers

func (a *App) FilterNonGroupTeamMembers(userIds []string, team *model.Team) ([]string, error)

FilterNonGroupTeamMembers returns the subset of the given user IDs of the users who are not members of groups associated to the team excluding bots.

func (*App) GenerateMfaSecret

func (a *App) GenerateMfaSecret(userId string) (*model.MfaSecret, *model.AppError)
func (a *App) GeneratePublicLink(siteURL string, info *model.FileInfo) string

func (*App) GetAllLdapGroupsPage

func (a *App) GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)

GetAllLdapGroupsPage retrieves all LDAP groups under the configured base DN using the default or configured group filter.

func (*App) GetAllRoles

func (a *App) GetAllRoles() ([]*model.Role, *model.AppError)

func (*App) GetAllStatuses

func (a *App) GetAllStatuses() map[string]*model.Status

func (*App) GetAnalytics

func (a *App) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *model.AppError)

func (*App) GetAudits

func (a *App) GetAudits(userId string, limit int) (model.Audits, *model.AppError)

func (*App) GetAuditsPage

func (a *App) GetAuditsPage(userId string, page int, perPage int) (model.Audits, *model.AppError)

func (*App) GetAuthorizationCode

func (a *App) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, props map[string]string, loginHint string) (string, *model.AppError)

func (*App) GetAuthorizedAppsForUser

func (a *App) GetAuthorizedAppsForUser(userId string, page, perPage int) ([]*model.OAuthApp, *model.AppError)

func (*App) GetBrandImage

func (a *App) GetBrandImage() ([]byte, *model.AppError)

func (*App) GetBulkReactionsForPosts

func (a *App) GetBulkReactionsForPosts(postIds []string) (map[string][]*model.Reaction, *model.AppError)

func (*App) GetChannelGroupUsers

func (a *App) GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError)

GetChannelGroupUsers returns the users who are associated to the channel via GroupChannels and GroupMembers.

func (*App) GetChannelsForScheme

func (a *App) GetChannelsForScheme(scheme *model.Scheme, offset int, limit int) (model.ChannelList, *model.AppError)

func (*App) GetChannelsForSchemePage

func (a *App) GetChannelsForSchemePage(scheme *model.Scheme, page int, perPage int) (model.ChannelList, *model.AppError)

func (*App) GetClusterId

func (a *App) GetClusterId() string

func (*App) GetClusterStatus

func (a *App) GetClusterStatus() []*model.ClusterInfo

func (*App) GetCommand

func (a *App) GetCommand(commandId string) (*model.Command, *model.AppError)

func (*App) GetComplianceFile

func (a *App) GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError)

func (*App) GetComplianceReport

func (a *App) GetComplianceReport(reportId string) (*model.Compliance, *model.AppError)

func (*App) GetComplianceReports

func (a *App) GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError)

func (*App) GetConfigFile

func (a *App) GetConfigFile(name string) ([]byte, error)

GetConfigFile proxies access to the given configuration file to the underlying config store.

func (*App) GetCookieDomain

func (a *App) GetCookieDomain() string

func (*App) GetDataRetentionPolicy

func (a *App) GetDataRetentionPolicy() (*model.DataRetentionPolicy, *model.AppError)

func (*App) GetDefaultProfileImage

func (a *App) GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError)

func (*App) GetEmoji

func (a *App) GetEmoji(emojiId string) (*model.Emoji, *model.AppError)

func (*App) GetEmojiByName

func (a *App) GetEmojiByName(emojiName string) (*model.Emoji, *model.AppError)

func (*App) GetEmojiImage

func (a *App) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)

func (*App) GetEmojiList

func (a *App) GetEmojiList(page, perPage int, sort string) ([]*model.Emoji, *model.AppError)

func (*App) GetEmojiStaticUrl

func (a *App) GetEmojiStaticUrl(emojiName string) (string, *model.AppError)

GetEmojiStaticUrl returns a relative static URL for system default emojis, and the API route for custom ones. Errors if not found or if custom and deleted.

func (*App) GetEnvironmentConfig

func (a *App) GetEnvironmentConfig() map[string]interface{}

GetEnvironmentConfig returns a map of configuration keys whose values have been overridden by an environment variable.

func (*App) GetFile

func (a *App) GetFile(fileId string) ([]byte, *model.AppError)

func (*App) GetFileInfo

func (a *App) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError)

func (*App) GetFileInfos

func (a *App) GetFileInfos(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)

func (*App) GetHubForUserId

func (a *App) GetHubForUserId(userId string) *Hub

func (*App) GetIncomingWebhook

func (a *App) GetIncomingWebhook(hookId string) (*model.IncomingWebhook, *model.AppError)

func (*App) GetIncomingWebhooksForTeamPage

func (a *App) GetIncomingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*App) GetIncomingWebhooksForTeamPageByUser

func (a *App) GetIncomingWebhooksForTeamPageByUser(teamId string, userId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*App) GetIncomingWebhooksPage

func (a *App) GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*App) GetIncomingWebhooksPageByUser

func (a *App) GetIncomingWebhooksPageByUser(userId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*App) GetJob

func (a *App) GetJob(id string) (*model.Job, *model.AppError)

func (*App) GetJobs

func (a *App) GetJobs(offset int, limit int) ([]*model.Job, *model.AppError)

func (*App) GetJobsByType

func (a *App) GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError)

func (*App) GetJobsByTypePage

func (a *App) GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError)

func (*App) GetJobsPage

func (a *App) GetJobsPage(page int, perPage int) ([]*model.Job, *model.AppError)

func (*App) GetLatestTermsOfService

func (a *App) GetLatestTermsOfService() (*model.TermsOfService, *model.AppError)

func (*App) GetLdapGroup

func (a *App) GetLdapGroup(ldapGroupID string) (*model.Group, *model.AppError)

GetLdapGroup retrieves a single LDAP group by the given LDAP group id.

func (*App) GetLogs

func (a *App) GetLogs(page, perPage int) ([]string, *model.AppError)

func (*App) GetLogsSkipSend

func (a *App) GetLogsSkipSend(page, perPage int) ([]string, *model.AppError)

func (*App) GetMessageForNotification

func (a *App) GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string

func (*App) GetMultipleEmojiByName

func (a *App) GetMultipleEmojiByName(names []string) ([]*model.Emoji, *model.AppError)

func (*App) GetNewUsersForTeamPage

func (a *App) GetNewUsersForTeamPage(teamId string, page, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetNotificationNameFormat

func (a *App) GetNotificationNameFormat(user *model.User) string

func (*App) GetOAuthAccessTokenForCodeFlow

func (a *App) GetOAuthAccessTokenForCodeFlow(clientId, grantType, redirectUri, code, secret, refreshToken string) (*model.AccessResponse, *model.AppError)

func (*App) GetOAuthAccessTokenForImplicitFlow

func (a *App) GetOAuthAccessTokenForImplicitFlow(userId string, authRequest *model.AuthorizeRequest) (*model.Session, *model.AppError)

func (*App) GetOAuthApp

func (a *App) GetOAuthApp(appId string) (*model.OAuthApp, *model.AppError)

func (*App) GetOAuthApps

func (a *App) GetOAuthApps(page, perPage int) ([]*model.OAuthApp, *model.AppError)

func (*App) GetOAuthAppsByCreator

func (a *App) GetOAuthAppsByCreator(userId string, page, perPage int) ([]*model.OAuthApp, *model.AppError)

func (*App) GetOAuthCodeRedirect

func (a *App) GetOAuthCodeRedirect(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)

func (*App) GetOAuthImplicitRedirect

func (a *App) GetOAuthImplicitRedirect(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)

func (*App) GetOAuthLoginEndpoint

func (a *App) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, service, teamId, action, redirectTo, loginHint string) (string, *model.AppError)

func (*App) GetOAuthSignupEndpoint

func (a *App) GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamId string) (string, *model.AppError)

func (*App) GetOAuthStateToken

func (a *App) GetOAuthStateToken(token string) (*model.Token, *model.AppError)

func (*App) GetOpenGraphMetadata

func (a *App) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph

func (*App) GetOutgoingWebhook

func (a *App) GetOutgoingWebhook(hookId string) (*model.OutgoingWebhook, *model.AppError)

func (*App) GetOutgoingWebhooksForChannelPageByUser

func (a *App) GetOutgoingWebhooksForChannelPageByUser(channelId string, userId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*App) GetOutgoingWebhooksForTeamPage

func (a *App) GetOutgoingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*App) GetOutgoingWebhooksForTeamPageByUser

func (a *App) GetOutgoingWebhooksForTeamPageByUser(teamId string, userId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*App) GetOutgoingWebhooksPage

func (a *App) GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*App) GetOutgoingWebhooksPageByUser

func (a *App) GetOutgoingWebhooksPageByUser(userId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*App) GetPasswordRecoveryToken

func (a *App) GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError)

func (*App) GetPreferenceByCategoryAndNameForUser

func (a *App) GetPreferenceByCategoryAndNameForUser(userId string, category string, preferenceName string) (*model.Preference, *model.AppError)

func (*App) GetPreferenceByCategoryForUser

func (a *App) GetPreferenceByCategoryForUser(userId string, category string) (model.Preferences, *model.AppError)

func (*App) GetPreferencesForUser

func (a *App) GetPreferencesForUser(userId string) (model.Preferences, *model.AppError)

func (*App) GetProfileImage

func (a *App) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError)

func (*App) GetReactionsForPost

func (a *App) GetReactionsForPost(postId string) ([]*model.Reaction, *model.AppError)

func (*App) GetRecentlyActiveUsersForTeam

func (a *App) GetRecentlyActiveUsersForTeam(teamId string) (map[string]*model.User, *model.AppError)

func (*App) GetRecentlyActiveUsersForTeamPage

func (a *App) GetRecentlyActiveUsersForTeamPage(teamId string, page, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetRole

func (a *App) GetRole(id string) (*model.Role, *model.AppError)

func (*App) GetRoleByName

func (a *App) GetRoleByName(name string) (*model.Role, *model.AppError)

func (*App) GetRolesByNames

func (a *App) GetRolesByNames(names []string) ([]*model.Role, *model.AppError)

func (*App) GetSamlCertificateStatus

func (a *App) GetSamlCertificateStatus() *model.SamlCertificateStatus

func (*App) GetSamlMetadata

func (a *App) GetSamlMetadata() (string, *model.AppError)

func (*App) GetSamlMetadataFromIdp

func (a *App) GetSamlMetadataFromIdp(idpMetadataUrl string) (*model.SamlMetadataResponse, *model.AppError)

func (*App) GetSanitizeOptions

func (a *App) GetSanitizeOptions(asAdmin bool) map[string]bool

func (*App) GetSanitizedClientLicense

func (a *App) GetSanitizedClientLicense() map[string]string

func (*App) GetSanitizedConfig

func (a *App) GetSanitizedConfig() *model.Config

GetSanitizedConfig gets the configuration for a system admin without any secrets.

func (*App) GetScheme

func (a *App) GetScheme(id string) (*model.Scheme, *model.AppError)

func (*App) GetSchemeByName

func (a *App) GetSchemeByName(name string) (*model.Scheme, *model.AppError)

func (*App) GetSchemes

func (a *App) GetSchemes(scope string, offset int, limit int) ([]*model.Scheme, *model.AppError)

func (*App) GetSchemesPage

func (a *App) GetSchemesPage(scope string, page int, perPage int) ([]*model.Scheme, *model.AppError)

func (*App) GetSession

func (a *App) GetSession(token string) (*model.Session, *model.AppError)

func (*App) GetSessionById

func (a *App) GetSessionById(sessionId string) (*model.Session, *model.AppError)

func (*App) GetSessions

func (a *App) GetSessions(userId string) ([]*model.Session, *model.AppError)

func (*App) GetSiteURL

func (a *App) GetSiteURL() string

func (*App) GetStatus

func (a *App) GetStatus(userId string) (*model.Status, *model.AppError)

func (*App) GetStatusFromCache

func (a *App) GetStatusFromCache(userId string) *model.Status

func (*App) GetStatusesByIds

func (a *App) GetStatusesByIds(userIds []string) (map[string]interface{}, *model.AppError)

func (*App) GetT

func (a *App) GetT() goi18n.TranslateFunc

func (*App) GetTeamGroupUsers

func (a *App) GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError)

GetTeamGroupUsers returns the users who are associated to the team via GroupTeams and GroupMembers.

func (*App) GetTeamsForScheme

func (a *App) GetTeamsForScheme(scheme *model.Scheme, offset int, limit int) ([]*model.Team, *model.AppError)

func (*App) GetTeamsForSchemePage

func (a *App) GetTeamsForSchemePage(scheme *model.Scheme, page int, perPage int) ([]*model.Team, *model.AppError)

func (*App) GetTermsOfService

func (a *App) GetTermsOfService(id string) (*model.TermsOfService, *model.AppError)

func (*App) GetTotalUsersStats

func (a *App) GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions) (*model.UsersStats, *model.AppError)

GetTotalUsersStats is used for the DM list total

func (*App) GetUser

func (a *App) GetUser(userId string) (*model.User, *model.AppError)

func (*App) GetUserAccessToken

func (a *App) GetUserAccessToken(tokenId string, sanitize bool) (*model.UserAccessToken, *model.AppError)

func (*App) GetUserAccessTokens

func (a *App) GetUserAccessTokens(page, perPage int) ([]*model.UserAccessToken, *model.AppError)

func (*App) GetUserAccessTokensForUser

func (a *App) GetUserAccessTokensForUser(userId string, page, perPage int) ([]*model.UserAccessToken, *model.AppError)

func (*App) GetUserByAuth

func (a *App) GetUserByAuth(authData *string, authService string) (*model.User, *model.AppError)

func (*App) GetUserByEmail

func (a *App) GetUserByEmail(email string) (*model.User, *model.AppError)

func (*App) GetUserByUsername

func (a *App) GetUserByUsername(username string) (*model.User, *model.AppError)

func (*App) GetUserForLogin

func (a *App) GetUserForLogin(id, loginId string) (*model.User, *model.AppError)

func (*App) GetUserStatusesByIds

func (a *App) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError)

GetUserStatusesByIds used by apiV4

func (*App) GetUserTermsOfService

func (a *App) GetUserTermsOfService(userId string) (*model.UserTermsOfService, *model.AppError)

func (*App) GetUsers

func (a *App) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)

func (*App) GetUsersByGroupChannelIds

func (a *App) GetUsersByGroupChannelIds(channelIds []string, asAdmin bool) (map[string][]*model.User, *model.AppError)

func (*App) GetUsersByIds

func (a *App) GetUsersByIds(userIds []string, options *store.UserGetByIdsOpts) ([]*model.User, *model.AppError)

func (*App) GetUsersByUsernames

func (a *App) GetUsersByUsernames(usernames []string, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetUsersEtag

func (a *App) GetUsersEtag(restrictionsHash string) string

func (*App) GetUsersInChannel

func (a *App) GetUsersInChannel(channelId string, offset int, limit int) ([]*model.User, *model.AppError)

func (*App) GetUsersInChannelByStatus

func (a *App) GetUsersInChannelByStatus(channelId string, offset int, limit int) ([]*model.User, *model.AppError)

func (*App) GetUsersInChannelMap

func (a *App) GetUsersInChannelMap(channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)

func (*App) GetUsersInChannelPage

func (a *App) GetUsersInChannelPage(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)

func (*App) GetUsersInChannelPageByStatus

func (a *App) GetUsersInChannelPageByStatus(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)

func (*App) GetUsersInTeam

func (a *App) GetUsersInTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)

func (*App) GetUsersInTeamEtag

func (a *App) GetUsersInTeamEtag(teamId string, restrictionsHash string) string

func (*App) GetUsersInTeamPage

func (a *App) GetUsersInTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)

func (*App) GetUsersNotInChannel

func (a *App) GetUsersNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetUsersNotInChannelMap

func (a *App) GetUsersNotInChannelMap(teamId string, channelId string, groupConstrained bool, offset int, limit int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) (map[string]*model.User, *model.AppError)

func (*App) GetUsersNotInChannelPage

func (a *App) GetUsersNotInChannelPage(teamId string, channelId string, groupConstrained bool, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetUsersNotInTeam

func (a *App) GetUsersNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetUsersNotInTeamEtag

func (a *App) GetUsersNotInTeamEtag(teamId string, restrictionsHash string) string

func (*App) GetUsersNotInTeamPage

func (a *App) GetUsersNotInTeamPage(teamId string, groupConstrained bool, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*App) GetUsersPage

func (a *App) GetUsersPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)

func (*App) GetUsersWithoutTeam

func (a *App) GetUsersWithoutTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)

func (*App) GetUsersWithoutTeamPage

func (a *App) GetUsersWithoutTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)

func (*App) GetVerifyEmailToken

func (a *App) GetVerifyEmailToken(token string) (*model.Token, *model.AppError)

func (*App) GetViewUsersRestrictions

func (a *App) GetViewUsersRestrictions(userId string) (*model.ViewUsersRestrictions, *model.AppError)

func (*App) HTMLTemplates

func (a *App) HTMLTemplates() *template.Template

func (*App) HTTPService

func (a *App) HTTPService() httpservice.HTTPService

func (*App) Handle404

func (a *App) Handle404(w http.ResponseWriter, r *http.Request)

func (*App) HandleCommandResponse

func (a *App) HandleCommandResponse(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.CommandResponse, *model.AppError)

func (*App) HandleCommandResponsePost

func (a *App) HandleCommandResponsePost(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.Post, *model.AppError)

func (*App) HandleCommandWebhook

func (a *App) HandleCommandWebhook(hookId string, response *model.CommandResponse) *model.AppError

func (*App) HandleImages

func (a *App) HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte)

func (*App) HandleIncomingWebhook

func (a *App) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookRequest) *model.AppError

func (*App) HandleMessageExportConfig

func (a *App) HandleMessageExportConfig(cfg *model.Config, appCfg *model.Config)

func (*App) HasPermissionTo

func (a *App) HasPermissionTo(askingUserId string, permission *model.Permission) bool

func (*App) HasPermissionToChannel

func (a *App) HasPermissionToChannel(askingUserId string, channelId string, permission *model.Permission) bool

func (*App) HasPermissionToChannelByPost

func (a *App) HasPermissionToChannelByPost(askingUserId string, postId string, permission *model.Permission) bool

func (*App) HasPermissionToTeam

func (a *App) HasPermissionToTeam(askingUserId string, teamId string, permission *model.Permission) bool

func (*App) HasPermissionToUser

func (a *App) HasPermissionToUser(askingUserId string, userId string) bool

func (*App) HubRegister

func (a *App) HubRegister(webConn *WebConn)

func (*App) HubStart

func (a *App) HubStart()

func (*App) HubStop

func (a *App) HubStop()

func (*App) HubUnregister

func (a *App) HubUnregister(webConn *WebConn)

func (*App) ImageProxy

func (a *App) ImageProxy() *imageproxy.ImageProxy

func (*App) ImportPermissions

func (a *App) ImportPermissions(jsonl io.Reader) error

func (*App) InvalidateAllCaches

func (a *App) InvalidateAllCaches() *model.AppError

func (*App) InvalidateAllCachesSkipSend

func (a *App) InvalidateAllCachesSkipSend()

func (*App) InvalidateCacheForUser

func (a *App) InvalidateCacheForUser(userId string)

func (*App) InvalidateWebConnSessionCacheForUser

func (a *App) InvalidateWebConnSessionCacheForUser(userId string)

func (*App) IpAddress

func (a *App) IpAddress() string

func (*App) IsFirstUserAccount

func (a *App) IsFirstUserAccount() bool

func (*App) IsLeader

func (a *App) IsLeader() bool

func (*App) IsPasswordValid

func (a *App) IsPasswordValid(password string) *model.AppError

func (*App) IsPhase2MigrationCompleted

func (a *App) IsPhase2MigrationCompleted() *model.AppError

func (*App) IsUserAway

func (a *App) IsUserAway(lastActivityAt int64) bool

func (*App) IsUserSignUpAllowed

func (a *App) IsUserSignUpAllowed() *model.AppError

func (*App) IsUsernameTaken

func (a *App) IsUsernameTaken(name string) bool

IsUsernameTaken checks if the username is already used by another user. Return false if the username is invalid.

func (*App) Ldap

func (a *App) Ldap() einterfaces.LdapInterface

func (*App) License

func (a *App) License() *model.License

License returns the currently active license or nil if the application is unlicensed.

func (*App) LimitedClientConfig

func (a *App) LimitedClientConfig() map[string]string

func (*App) LimitedClientConfigWithComputed

func (a *App) LimitedClientConfigWithComputed() map[string]string

LimitedClientConfigWithComputed gets the configuration in a format suitable for sending to the client.

func (*App) ListAllCommands

func (a *App) ListAllCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)

func (*App) ListAutocompleteCommands

func (a *App) ListAutocompleteCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)

@openTracingParams teamId previous ListCommands now ListAutocompleteCommands

func (*App) ListDirectory

func (a *App) ListDirectory(path string) ([]string, *model.AppError)

func (*App) ListTeamCommands

func (a *App) ListTeamCommands(teamId string) ([]*model.Command, *model.AppError)

func (*App) LoadLicense

func (a *App) LoadLicense()

func (*App) Log

func (a *App) Log() *mlog.Logger

func (*App) LoginByOAuth

func (a *App) LoginByOAuth(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)

func (*App) MakePermissionError

func (a *App) MakePermissionError(permission *model.Permission) *model.AppError

func (*App) MessageExport

func (a *App) MessageExport() einterfaces.MessageExportInterface

func (*App) Metrics

func (a *App) Metrics() einterfaces.MetricsInterface

func (*App) MigrateFilenamesToFileInfos

func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo

Creates and stores FileInfos for a post created before the FileInfos table existed.

func (*App) MoveCommand

func (a *App) MoveCommand(team *model.Team, command *model.Command) *model.AppError

func (*App) MoveFile

func (a *App) MoveFile(oldPath, newPath string) *model.AppError

func (*App) NewClusterDiscoveryService

func (a *App) NewClusterDiscoveryService() *ClusterDiscoveryService

func (*App) NewWebConn

func (a *App) NewWebConn(ws *websocket.Conn, session model.Session, t goi18n.TranslateFunc, locale string) *WebConn

func (*App) NewWebHub

func (a *App) NewWebHub() *Hub

func (*App) Notification

func (a *App) Notification() einterfaces.NotificationInterface

func (*App) NotificationsLog

func (a *App) NotificationsLog() *mlog.Logger

func (*App) OpenInteractiveDialog

func (a *App) OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError

func (*App) OriginChecker

func (a *App) OriginChecker() func(*http.Request) bool

func (*App) PatchRole

func (a *App) PatchRole(role *model.Role, patch *model.RolePatch) (*model.Role, *model.AppError)

func (*App) PatchScheme

func (a *App) PatchScheme(scheme *model.Scheme, patch *model.SchemePatch) (*model.Scheme, *model.AppError)

func (*App) PatchUser

func (a *App) PatchUser(userId string, patch *model.UserPatch, asAdmin bool) (*model.User, *model.AppError)

func (*App) Path

func (a *App) Path() string

func (*App) PermanentDeleteAllUsers

func (a *App) PermanentDeleteAllUsers() *model.AppError

func (*App) PermanentDeleteUser

func (a *App) PermanentDeleteUser(user *model.User) *model.AppError

func (*App) PostActionCookieSecret

func (a *App) PostActionCookieSecret() []byte

func (*App) ProcessSlackAttachments

func (a *App) ProcessSlackAttachments(attachments []*model.SlackAttachment) []*model.SlackAttachment

Expand announcements in incoming webhooks from Slack. Those announcements can be found in the text attribute, or in the pretext, text, title and value attributes of the attachment structure. The Slack attachment structure is documented here: https://api.slack.com/docs/attachments

func (*App) ProcessSlackText

func (a *App) ProcessSlackText(text string) string

func (*App) PromoteGuestToUser

func (a *App) PromoteGuestToUser(user *model.User, requestorId string) *model.AppError

PromoteGuestToUser Convert user's roles and all his mermbership's roles from guest roles to regular user roles.

func (*App) Publish

func (a *App) Publish(message *model.WebSocketEvent)

func (*App) PublishSkipClusterSend

func (a *App) PublishSkipClusterSend(message *model.WebSocketEvent)

func (*App) PurgeElasticsearchIndexes

func (a *App) PurgeElasticsearchIndexes() *model.AppError

func (*App) ReadFile

func (a *App) ReadFile(path string) ([]byte, *model.AppError)

func (*App) RecycleDatabaseConnection

func (a *App) RecycleDatabaseConnection()

func (*App) RegenCommandToken

func (a *App) RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError)

func (*App) RegenOutgoingWebhookToken

func (a *App) RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)

func (*App) RegenerateOAuthAppSecret

func (a *App) RegenerateOAuthAppSecret(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)

func (*App) ReloadConfig

func (a *App) ReloadConfig() error

func (*App) RemoveConfigListener

func (a *App) RemoveConfigListener(id string)

func (*App) RemoveFile

func (a *App) RemoveFile(path string) *model.AppError

func (*App) RemoveLicense

func (a *App) RemoveLicense() *model.AppError

func (*App) RemoveLicenseListener

func (a *App) RemoveLicenseListener(id string)

func (*App) RemoveSamlIdpCertificate

func (a *App) RemoveSamlIdpCertificate() *model.AppError

func (*App) RemoveSamlPrivateCertificate

func (a *App) RemoveSamlPrivateCertificate() *model.AppError

func (*App) RemoveSamlPublicCertificate

func (a *App) RemoveSamlPublicCertificate() *model.AppError

func (*App) RequestId

func (a *App) RequestId() string

func (*App) ResetPasswordFromToken

func (a *App) ResetPasswordFromToken(userSuppliedTokenString, newPassword string) *model.AppError

func (*App) ResetPermissionsSystem

func (a *App) ResetPermissionsSystem() *model.AppError

func (*App) RestrictUsersGetByPermissions

func (a *App) RestrictUsersGetByPermissions(userId string, options *model.UserGetOptions) (*model.UserGetOptions, *model.AppError)

func (*App) RestrictUsersSearchByPermissions

func (a *App) RestrictUsersSearchByPermissions(userId string, options *model.UserSearchOptions) (*model.UserSearchOptions, *model.AppError)

func (*App) RevokeAccessToken

func (a *App) RevokeAccessToken(token string) *model.AppError

func (*App) RevokeAllSessions

func (a *App) RevokeAllSessions(userId string) *model.AppError

func (*App) RevokeSession

func (a *App) RevokeSession(session *model.Session) *model.AppError

func (*App) RevokeSessionById

func (a *App) RevokeSessionById(sessionId string) *model.AppError

func (*App) RevokeSessionsForDeviceId

func (a *App) RevokeSessionsForDeviceId(userId string, deviceId string, currentSessionId string) *model.AppError

func (*App) RevokeSessionsFromAllUsers

func (a *App) RevokeSessionsFromAllUsers() *model.AppError

RevokeSessionsFromAllUsers will go through all the sessions active in the server and revoke them

func (*App) RevokeUserAccessToken

func (a *App) RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError

func (*App) RolesGrantPermission

func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool

func (*App) Saml

func (a *App) Saml() einterfaces.SamlInterface

func (*App) SanitizeProfile

func (a *App) SanitizeProfile(user *model.User, asAdmin bool)

func (*App) SaveAndBroadcastStatus

func (a *App) SaveAndBroadcastStatus(status *model.Status)

func (*App) SaveBrandImage

func (a *App) SaveBrandImage(imageData *multipart.FileHeader) *model.AppError

func (*App) SaveComplianceReport

func (a *App) SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)

func (*App) SaveConfig

func (a *App) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) *model.AppError

SaveConfig replaces the active configuration, optionally notifying cluster peers.

func (*App) SaveLicense

func (a *App) SaveLicense(licenseBytes []byte) (*model.License, *model.AppError)

func (*App) SaveReactionForPost

func (a *App) SaveReactionForPost(reaction *model.Reaction) (*model.Reaction, *model.AppError)

func (*App) SaveUserTermsOfService

func (a *App) SaveUserTermsOfService(userId, termsOfServiceId string, accepted bool) *model.AppError

func (*App) SchemesIterator

func (a *App) SchemesIterator(scope string, batchSize int) func() []*model.Scheme

func (*App) SearchEmoji

func (a *App) SearchEmoji(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError)

func (*App) SearchEngine

func (a *App) SearchEngine() *searchengine.Broker

func (*App) SearchUserAccessTokens

func (a *App) SearchUserAccessTokens(term string) ([]*model.UserAccessToken, *model.AppError)

func (*App) SearchUsers

func (a *App) SearchUsers(props *model.UserSearch, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*App) SearchUsersInChannel

func (a *App) SearchUsersInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*App) SearchUsersInTeam

func (a *App) SearchUsersInTeam(teamId, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*App) SearchUsersNotInChannel

func (a *App) SearchUsersNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*App) SearchUsersNotInTeam

func (a *App) SearchUsersNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*App) SearchUsersWithoutTeam

func (a *App) SearchUsersWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*App) SendAckToPushProxy

func (a *App) SendAckToPushProxy(ack *model.PushNotificationAck) error

func (*App) SendAutoResponse

func (a *App) SendAutoResponse(channel *model.Channel, receiver *model.User) (bool, *model.AppError)

func (*App) SendAutoResponseIfNecessary

func (a *App) SendAutoResponseIfNecessary(channel *model.Channel, sender *model.User) (bool, *model.AppError)

func (*App) SendDailyDiagnostics

func (a *App) SendDailyDiagnostics()

func (*App) SendDeactivateAccountEmail

func (a *App) SendDeactivateAccountEmail(email string, locale, siteURL string) *model.AppError

func (*App) SendDiagnostic

func (a *App) SendDiagnostic(event string, properties map[string]interface{})

func (*App) SendEmailVerification

func (a *App) SendEmailVerification(user *model.User, newEmail string) *model.AppError

func (*App) SendInviteEmails

func (a *App) SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, siteURL string)

func (*App) SendNotifications

func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList) ([]string, error)

func (*App) SendPasswordReset

func (a *App) SendPasswordReset(email string, siteURL string) (bool, *model.AppError)

func (*App) SendPasswordResetEmail

func (a *App) SendPasswordResetEmail(email string, token *model.Token, locale, siteURL string) (bool, *model.AppError)

func (*App) SendSignInChangeEmail

func (a *App) SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError

func (*App) ServerBusyStateChanged

func (a *App) ServerBusyStateChanged(sbs *model.ServerBusyState)

ServerBusyStateChanged is called when a CLUSTER_EVENT_BUSY_STATE_CHANGED is received.

func (*App) Session

func (a *App) Session() *model.Session

func (*App) SessionCacheLength

func (a *App) SessionCacheLength() int

func (*App) SessionHasPermissionTo

func (a *App) SessionHasPermissionTo(session model.Session, permission *model.Permission) bool

func (*App) SessionHasPermissionToChannel

func (a *App) SessionHasPermissionToChannel(session model.Session, channelId string, permission *model.Permission) bool

func (*App) SessionHasPermissionToChannelByPost

func (a *App) SessionHasPermissionToChannelByPost(session model.Session, postId string, permission *model.Permission) bool

func (*App) SessionHasPermissionToManageBot

func (a *App) SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError

SessionHasPermissionToManageBot returns nil if the session has access to manage the given bot. This function deviates from other authorization checks in returning an error instead of just a boolean, allowing the permission failure to be exposed with more granularity.

func (*App) SessionHasPermissionToTeam

func (a *App) SessionHasPermissionToTeam(session model.Session, teamId string, permission *model.Permission) bool

func (*App) SessionHasPermissionToUser

func (a *App) SessionHasPermissionToUser(session model.Session, userId string) bool

func (*App) SessionHasPermissionToUserOrBot

func (a *App) SessionHasPermissionToUserOrBot(session model.Session, userId string) bool

func (*App) SetAcceptLanguage

func (a *App) SetAcceptLanguage(s string)

func (*App) SetAutoResponderStatus

func (a *App) SetAutoResponderStatus(user *model.User, oldNotifyProps model.StringMap)

func (*App) SetClientLicense

func (a *App) SetClientLicense(m map[string]string)

func (*App) SetContext

func (a *App) SetContext(c context.Context)

func (*App) SetDefaultProfileImage

func (a *App) SetDefaultProfileImage(user *model.User) *model.AppError

func (*App) SetDiagnosticId

func (a *App) SetDiagnosticId(id string)

func (*App) SetIpAddress

func (a *App) SetIpAddress(s string)

func (*App) SetLicense

func (a *App) SetLicense(license *model.License) bool

func (*App) SetLog

func (a *App) SetLog(l *mlog.Logger)

func (*App) SetPath

func (a *App) SetPath(s string)

func (*App) SetPhase2PermissionsMigrationStatus

func (a *App) SetPhase2PermissionsMigrationStatus(isComplete bool) error

func (*App) SetProfileImage

func (a *App) SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppError

func (*App) SetProfileImageFromFile

func (a *App) SetProfileImageFromFile(userId string, file io.Reader) *model.AppError

func (*App) SetProfileImageFromMultiPartFile

func (a *App) SetProfileImageFromMultiPartFile(userId string, file multipart.File) *model.AppError

func (*App) SetRequestId

func (a *App) SetRequestId(s string)

func (*App) SetSamlIdpCertificateFromMetadata

func (a *App) SetSamlIdpCertificateFromMetadata(data []byte) *model.AppError

func (*App) SetSearchEngine

func (a *App) SetSearchEngine(se *searchengine.Broker)

func (*App) SetServer

func (a *App) SetServer(srv *Server)

func (*App) SetSession

func (a *App) SetSession(s *model.Session)

func (*App) SetStatusAwayIfNeeded

func (a *App) SetStatusAwayIfNeeded(userId string, manual bool)

func (*App) SetStatusDoNotDisturb

func (a *App) SetStatusDoNotDisturb(userId string)

func (*App) SetStatusLastActivityAt

func (a *App) SetStatusLastActivityAt(userId string, activityAt int64)

SetStatusLastActivityAt sets the last activity at for a user on the local app server and updates status to away if needed. Used by the WS to set status to away if an 'online' device disconnects while an 'away' device is still connected

func (*App) SetStatusOffline

func (a *App) SetStatusOffline(userId string, manual bool)

func (*App) SetStatusOnline

func (a *App) SetStatusOnline(userId string, manual bool)

func (*App) SetStatusOutOfOffice

func (a *App) SetStatusOutOfOffice(userId string)

func (*App) SetT

func (a *App) SetT(t goi18n.TranslateFunc)

func (*App) SetUserAgent

func (a *App) SetUserAgent(s string)

func (*App) SetupInviteEmailRateLimiting

func (a *App) SetupInviteEmailRateLimiting() error

func (*App) Shutdown

func (a *App) Shutdown()

DO NOT CALL THIS. This is to avoid having to change all the code in cmd/mattermost/commands/* for now shutdown should be called directly on the server

func (*App) SlackAddBotUser

func (a *App) SlackAddBotUser(teamId string, log *bytes.Buffer) *model.User

func (*App) SlackAddChannels

func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User, importerLog *bytes.Buffer) map[string]*model.Channel

func (*App) SlackAddPosts

func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User)

func (*App) SlackAddUsers

func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, importerLog *bytes.Buffer) map[string]*model.User

func (*App) SlackImport

func (a *App) SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)

func (*App) SlackUploadFile

func (a *App) SlackUploadFile(slackPostFile *SlackFile, uploads map[string]*zip.File, teamId string, channelId string, userId string, slackTimestamp string) (*model.FileInfo, bool)

func (*App) Srv

func (a *App) Srv() *Server

func (*App) StartPushNotificationsHubWorkers

func (a *App) StartPushNotificationsHubWorkers()

func (*App) StopPushNotificationsHubWorkers

func (a *App) StopPushNotificationsHubWorkers()

func (*App) SubmitInteractiveDialog

func (a *App) SubmitInteractiveDialog(request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError)

func (*App) SwitchEmailToLdap

func (a *App) SwitchEmailToLdap(email, password, code, ldapLoginId, ldapPassword string) (string, *model.AppError)

func (*App) SwitchEmailToOAuth

func (a *App) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, password, code, service string) (string, *model.AppError)

func (*App) SwitchLdapToEmail

func (a *App) SwitchLdapToEmail(ldapPassword, code, email, newPassword string) (string, *model.AppError)

func (*App) SwitchOAuthToEmail

func (a *App) SwitchOAuthToEmail(email, password, requesterId string) (string, *model.AppError)

func (*App) SyncLdap

func (a *App) SyncLdap()

func (*App) SyncRolesAndMembership

func (a *App) SyncRolesAndMembership(syncableID string, syncableType model.GroupSyncableType)

SyncRolesAndMembership updates the SchemeAdmin status and membership of all of the members of the given syncable.

func (*App) SyncSyncableRoles

func (a *App) SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError

SyncSyncableRoles updates the SchemeAdmin field value of the given syncable's members based on the configuration of the member's group memberships and the configuration of those groups to the syncable. This method should only be invoked on group-synced (aka group-constrained) syncables.

func (*App) T

func (a *App) T(translationID string, args ...interface{}) string

func (*App) TestElasticsearch

func (a *App) TestElasticsearch(cfg *model.Config) *model.AppError

func (*App) TestEmail

func (a *App) TestEmail(userId string, cfg *model.Config) *model.AppError

func (*App) TestLdap

func (a *App) TestLdap() *model.AppError

func (*App) TestSiteURL

func (a *App) TestSiteURL(siteURL string) *model.AppError

func (*App) Timezones

func (a *App) Timezones() *timezones.Timezones

func (*App) TotalWebsocketConnections

func (a *App) TotalWebsocketConnections() int

func (*App) TriggerWebhook

func (a *App) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, post *model.Post, channel *model.Channel)

func (*App) UpdateActive

func (a *App) UpdateActive(user *model.User, active bool) (*model.User, *model.AppError)

func (*App) UpdateCommand

func (a *App) UpdateCommand(oldCmd, updatedCmd *model.Command) (*model.Command, *model.AppError)

func (*App) UpdateConfig

func (a *App) UpdateConfig(f func(*model.Config))

func (*App) UpdateIncomingWebhook

func (a *App) UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)

func (*App) UpdateLastActivityAtIfNeeded

func (a *App) UpdateLastActivityAtIfNeeded(session model.Session)

func (*App) UpdateMfa

func (a *App) UpdateMfa(activate bool, userId, token string) *model.AppError

func (*App) UpdateMobileAppBadge

func (a *App) UpdateMobileAppBadge(userId string)

func (*App) UpdateOAuthUserAttrs

func (a *App) UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, service string) *model.AppError

func (*App) UpdateOauthApp

func (a *App) UpdateOauthApp(oldApp, updatedApp *model.OAuthApp) (*model.OAuthApp, *model.AppError)

func (*App) UpdateOutgoingWebhook

func (a *App) UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)

func (*App) UpdatePassword

func (a *App) UpdatePassword(user *model.User, newPassword string) *model.AppError

func (*App) UpdatePasswordAsUser

func (a *App) UpdatePasswordAsUser(userId, currentPassword, newPassword string) *model.AppError

func (*App) UpdatePasswordByUserIdSendEmail

func (a *App) UpdatePasswordByUserIdSendEmail(userId, newPassword, method string) *model.AppError

func (*App) UpdatePasswordSendEmail

func (a *App) UpdatePasswordSendEmail(user *model.User, newPassword, method string) *model.AppError

func (*App) UpdatePreferences

func (a *App) UpdatePreferences(userId string, preferences model.Preferences) *model.AppError

func (*App) UpdateRole

func (a *App) UpdateRole(role *model.Role) (*model.Role, *model.AppError)

func (*App) UpdateScheme

func (a *App) UpdateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)

func (*App) UpdateSessionsIsGuest

func (a *App) UpdateSessionsIsGuest(userId string, isGuest bool)

func (*App) UpdateUser

func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError)

func (*App) UpdateUserActive

func (a *App) UpdateUserActive(userId string, active bool) *model.AppError

func (*App) UpdateUserAsUser

func (a *App) UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *model.AppError)

func (*App) UpdateUserAuth

func (a *App) UpdateUserAuth(userId string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError)

func (*App) UpdateUserNotifyProps

func (a *App) UpdateUserNotifyProps(userId string, props map[string]string) (*model.User, *model.AppError)

func (*App) UpdateUserRoles

func (a *App) UpdateUserRoles(userId string, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError)

func (*App) UpdateWebConnUserActivity

func (a *App) UpdateWebConnUserActivity(session model.Session, activityAt int64)

func (*App) UploadEmojiImage

func (a *App) UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError

func (*App) UploadFile

func (a *App) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError)

UploadFile uploads a single file in form of a completely constructed byte array for a channel.

func (*App) UploadFileX

func (a *App) UploadFileX(channelId, name string, input io.Reader,
	opts ...func(*UploadFileTask)) (*model.FileInfo, *model.AppError)

UploadFileX uploads a single file as specified in t. It applies the upload constraints, executes processing logic as needed

func (*App) UploadFiles

func (a *App) UploadFiles(teamId string, channelId string, userId string, files []io.ReadCloser, filenames []string, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)

Uploads some files to the given team and channel as the given user. files and filenames should have the same length. clientIds should either not be provided or have the same length as files and filenames. The provided files should be closed by the caller so that they are not leaked.

func (*App) UploadMultipartFiles

func (a *App) UploadMultipartFiles(teamId string, channelId string, userId string, fileHeaders []*multipart.FileHeader, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)

func (*App) UserAgent

func (a *App) UserAgent() string

func (*App) UserCanSeeOtherUser

func (a *App) UserCanSeeOtherUser(userId string, otherUserId string) (bool, *model.AppError)

func (*App) ValidateAndSetLicenseBytes

func (a *App) ValidateAndSetLicenseBytes(b []byte)

func (*App) VerifyEmailFromToken

func (a *App) VerifyEmailFromToken(userSuppliedTokenString string) *model.AppError

func (*App) VerifyUserEmail

func (a *App) VerifyUserEmail(userId, email string) *model.AppError

func (*App) WriteFile

func (a *App) WriteFile(fr io.Reader, path string) (int64, *model.AppError)

type AppIface

type AppIface interface {
	AcceptLanguage() string
	AccountMigration() einterfaces.AccountMigrationInterface
	ActivateMfa(userId, token string) *model.AppError
	AddConfigListener(listener func(*model.Config, *model.Config)) string
	AddLicenseListener(listener func(oldLicense, newLicense *model.License)) string
	AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError
	AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError
	AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
	AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError
	AddSessionToCache(session *model.Session)
	AddStatusCache(status *model.Status)
	AddStatusCacheSkipClusterSend(status *model.Status)
	AllowOAuthAppAccessToUser(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
	AsymmetricSigningKey() *ecdsa.PrivateKey
	AttachDeviceId(sessionId string, deviceId string, expiresAt int64) *model.AppError
	AttachSessionCookies(w http.ResponseWriter, r *http.Request)
	AuthenticateUserForLogin(id, loginId, password, mfaToken string, ldapOnly bool) (*model.User, *model.AppError)
	AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service, code, state, redirectUri string) (io.ReadCloser, string, map[string]string, *model.AppError)
	AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError)
	AutocompleteUsersInTeam(teamId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInTeam, *model.AppError)
	BroadcastStatus(status *model.Status)
	BuildPostReactions(postId string) (*[]ReactionImportData, *model.AppError)
	BuildPushNotificationMessage(contentsConfig string, post *model.Post, user *model.User, channel *model.Channel, channelName string, senderName string, explicitMention bool, channelWideMention bool, replyToThreadType string) (*model.PushNotification, *model.AppError)
	BuildSamlMetadataObject(idpMetadata []byte) (*model.SamlMetadataResponse, *model.AppError)
	BulkExport(writer io.Writer, file string, pathToEmojiDir string, dirNameToExportEmoji string) *model.AppError
	BulkImport(fileReader io.Reader, dryRun bool, workers int) (*model.AppError, int)
	CancelJob(jobId string) *model.AppError
	CheckForClientSideCert(r *http.Request) (string, string, string)
	CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError
	CheckRolesExist(roleNames []string) *model.AppError
	CheckUserAllAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError
	CheckUserMfa(user *model.User, token string) *model.AppError
	CheckUserPostflightAuthenticationCriteria(user *model.User) *model.AppError
	CheckUserPreflightAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError
	ClearSessionCacheForAllUsers()
	ClearSessionCacheForAllUsersSkipClusterSend()
	ClearSessionCacheForUser(userId string)
	ClearSessionCacheForUserSkipClusterSend(userId string)
	ClientConfig() map[string]string
	ClientConfigHash() string
	ClientConfigWithComputed() map[string]string
	ClientLicense() map[string]string
	Cluster() einterfaces.ClusterInterface
	CompleteOAuth(service string, body io.ReadCloser, teamId string, props map[string]string) (*model.User, *model.AppError)
	CompleteSwitchWithOAuth(service string, userData io.Reader, email string) (*model.User, *model.AppError)
	Compliance() einterfaces.ComplianceInterface
	Config() *model.Config
	Context() context.Context
	CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)
	CreateBasicUser(client *model.Client4) *model.AppError
	CreateCommand(cmd *model.Command) (*model.Command, *model.AppError)
	CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse, skipSlackParsing bool) (*model.Post, *model.AppError)
	CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
	CreateDefaultMemberships(since int64) error
	CreateEmoji(sessionUserId string, emoji *model.Emoji, multiPartImageData *multipart.Form) (*model.Emoji, *model.AppError)
	CreateGuest(user *model.User) (*model.User, *model.AppError)
	CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
	CreateJob(job *model.Job) (*model.Job, *model.AppError)
	CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
	CreateOAuthStateToken(extra string) (*model.Token, *model.AppError)
	CreateOAuthUser(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)
	CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
	CreatePasswordRecoveryToken(userId, email string) (*model.Token, *model.AppError)
	CreateRole(role *model.Role) (*model.Role, *model.AppError)
	CreateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)
	CreateSession(session *model.Session) (*model.Session, *model.AppError)
	CreateTermsOfService(text, userId string) (*model.TermsOfService, *model.AppError)
	CreateUser(user *model.User) (*model.User, *model.AppError)
	CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
	CreateUserAsAdmin(user *model.User) (*model.User, *model.AppError)
	CreateUserFromSignup(user *model.User) (*model.User, *model.AppError)
	CreateUserWithInviteId(user *model.User, inviteId string) (*model.User, *model.AppError)
	CreateUserWithToken(user *model.User, token *model.Token) (*model.User, *model.AppError)
	CreateVerifyEmailToken(userId string, newEmail string) (*model.Token, *model.AppError)
	CreateWebhookPost(userId string, channel *model.Channel, text, overrideUsername, overrideIconUrl, overrideIconEmoji string, props model.StringInterface, postType string, postRootId string) (*model.Post, *model.AppError)
	DataRetention() einterfaces.DataRetentionInterface
	DeactivateGuests() *model.AppError
	DeactivateMfa(userId string) *model.AppError
	DeauthorizeOAuthAppForUser(userId, appId string) *model.AppError
	DeleteBrandImage() *model.AppError
	DeleteCommand(commandId string) *model.AppError
	DeleteEmoji(emoji *model.Emoji) *model.AppError
	DeleteGroupConstrainedMemberships() error
	DeleteIncomingWebhook(hookId string) *model.AppError
	DeleteOAuthApp(appId string) *model.AppError
	DeleteOutgoingWebhook(hookId string) *model.AppError
	DeletePreferences(userId string, preferences model.Preferences) *model.AppError
	DeleteReactionForPost(reaction *model.Reaction) *model.AppError
	DeleteScheme(schemeId string) (*model.Scheme, *model.AppError)
	DeleteToken(token *model.Token) *model.AppError
	DemoteUserToGuest(user *model.User) *model.AppError
	DiagnosticId() string
	DisableAutoResponder(userId string, asAdmin bool) *model.AppError
	DisableUserAccessToken(token *model.UserAccessToken) *model.AppError
	DoActionRequest(rawURL string, body []byte) (*http.Response, *model.AppError)
	DoAdvancedPermissionsMigration()
	DoAppMigrations()
	DoEmojisPermissionsMigration()
	DoGuestRolesCreationMigration()
	DoLocalRequest(rawURL string, body []byte) (*http.Response, *model.AppError)
	DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId string) *model.AppError
	DoPermissionsMigrations() error
	DoPostAction(postId, actionId, userId, selectedOption string) (string, *model.AppError)
	DoPostActionWithCookie(postId, actionId, userId, selectedOption string, cookie *model.PostActionCookie) (string, *model.AppError)
	DoUploadFile(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, *model.AppError)
	DoUploadFileExpectModification(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, []byte, *model.AppError)
	DoubleCheckPassword(user *model.User, password string) *model.AppError
	DownloadFromURL(downloadURL string) ([]byte, error)
	EnableUserAccessToken(token *model.UserAccessToken) *model.AppError
	EnvironmentConfig() map[string]interface{}
	ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
	ExportPermissions(w io.Writer) error
	FetchSamlMetadataFromIdp(url string) ([]byte, *model.AppError)
	FileBackend() (filesstore.FileBackend, *model.AppError)
	FileExists(path string) (bool, *model.AppError)
	FileReader(path string) (filesstore.ReadCloseSeeker, *model.AppError)
	FilterNonGroupChannelMembers(userIds []string, channel *model.Channel) ([]string, error)
	FilterNonGroupTeamMembers(userIds []string, team *model.Team) ([]string, error)
	GenerateMfaSecret(userId string) (*model.MfaSecret, *model.AppError)
	GeneratePublicLink(siteURL string, info *model.FileInfo) string
	GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
	GetAllRoles() ([]*model.Role, *model.AppError)
	GetAllStatuses() map[string]*model.Status
	GetAnalytics(name string, teamId string) (model.AnalyticsRows, *model.AppError)
	GetAudits(userId string, limit int) (model.Audits, *model.AppError)
	GetAuditsPage(userId string, page int, perPage int) (model.Audits, *model.AppError)
	GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, props map[string]string, loginHint string) (string, *model.AppError)
	GetAuthorizedAppsForUser(userId string, page, perPage int) ([]*model.OAuthApp, *model.AppError)
	GetBrandImage() ([]byte, *model.AppError)
	GetBulkReactionsForPosts(postIds []string) (map[string][]*model.Reaction, *model.AppError)
	GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError)
	GetChannelsForScheme(scheme *model.Scheme, offset int, limit int) (model.ChannelList, *model.AppError)
	GetChannelsForSchemePage(scheme *model.Scheme, page int, perPage int) (model.ChannelList, *model.AppError)
	GetClusterId() string
	GetClusterStatus() []*model.ClusterInfo
	GetCommand(commandId string) (*model.Command, *model.AppError)
	GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError)
	GetComplianceReport(reportId string) (*model.Compliance, *model.AppError)
	GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError)
	GetConfigFile(name string) ([]byte, error)
	GetCookieDomain() string
	GetDataRetentionPolicy() (*model.DataRetentionPolicy, *model.AppError)
	GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError)
	GetEmoji(emojiId string) (*model.Emoji, *model.AppError)
	GetEmojiByName(emojiName string) (*model.Emoji, *model.AppError)
	GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)
	GetEmojiList(page, perPage int, sort string) ([]*model.Emoji, *model.AppError)
	GetEmojiStaticUrl(emojiName string) (string, *model.AppError)
	GetEnvironmentConfig() map[string]interface{}
	GetFile(fileId string) ([]byte, *model.AppError)
	GetFileInfo(fileId string) (*model.FileInfo, *model.AppError)
	GetFileInfos(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)
	GetHubForUserId(userId string) *Hub
	GetIncomingWebhook(hookId string) (*model.IncomingWebhook, *model.AppError)
	GetIncomingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
	GetIncomingWebhooksForTeamPageByUser(teamId string, userId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
	GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
	GetIncomingWebhooksPageByUser(userId string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
	GetJob(id string) (*model.Job, *model.AppError)
	GetJobs(offset int, limit int) ([]*model.Job, *model.AppError)
	GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError)
	GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError)
	GetJobsPage(page int, perPage int) ([]*model.Job, *model.AppError)
	GetLatestTermsOfService() (*model.TermsOfService, *model.AppError)
	GetLdapGroup(ldapGroupID string) (*model.Group, *model.AppError)
	GetLogs(page, perPage int) ([]string, *model.AppError)
	GetLogsSkipSend(page, perPage int) ([]string, *model.AppError)
	GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string
	GetMultipleEmojiByName(names []string) ([]*model.Emoji, *model.AppError)
	GetNewUsersForTeamPage(teamId string, page, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetNotificationNameFormat(user *model.User) string
	GetOAuthAccessTokenForCodeFlow(clientId, grantType, redirectUri, code, secret, refreshToken string) (*model.AccessResponse, *model.AppError)
	GetOAuthAccessTokenForImplicitFlow(userId string, authRequest *model.AuthorizeRequest) (*model.Session, *model.AppError)
	GetOAuthApp(appId string) (*model.OAuthApp, *model.AppError)
	GetOAuthApps(page, perPage int) ([]*model.OAuthApp, *model.AppError)
	GetOAuthAppsByCreator(userId string, page, perPage int) ([]*model.OAuthApp, *model.AppError)
	GetOAuthCodeRedirect(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
	GetOAuthImplicitRedirect(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
	GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, service, teamId, action, redirectTo, loginHint string) (string, *model.AppError)
	GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamId string) (string, *model.AppError)
	GetOAuthStateToken(token string) (*model.Token, *model.AppError)
	GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph
	GetOutgoingWebhook(hookId string) (*model.OutgoingWebhook, *model.AppError)
	GetOutgoingWebhooksForChannelPageByUser(channelId string, userId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
	GetOutgoingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
	GetOutgoingWebhooksForTeamPageByUser(teamId string, userId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
	GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
	GetOutgoingWebhooksPageByUser(userId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
	GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError)
	GetPreferenceByCategoryAndNameForUser(userId string, category string, preferenceName string) (*model.Preference, *model.AppError)
	GetPreferenceByCategoryForUser(userId string, category string) (model.Preferences, *model.AppError)
	GetPreferencesForUser(userId string) (model.Preferences, *model.AppError)
	GetProfileImage(user *model.User) ([]byte, bool, *model.AppError)
	GetReactionsForPost(postId string) ([]*model.Reaction, *model.AppError)
	GetRecentlyActiveUsersForTeam(teamId string) (map[string]*model.User, *model.AppError)
	GetRecentlyActiveUsersForTeamPage(teamId string, page, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetRole(id string) (*model.Role, *model.AppError)
	GetRoleByName(name string) (*model.Role, *model.AppError)
	GetRolesByNames(names []string) ([]*model.Role, *model.AppError)
	GetSamlCertificateStatus() *model.SamlCertificateStatus
	GetSamlMetadata() (string, *model.AppError)
	GetSamlMetadataFromIdp(idpMetadataUrl string) (*model.SamlMetadataResponse, *model.AppError)
	GetSanitizeOptions(asAdmin bool) map[string]bool
	GetSanitizedClientLicense() map[string]string
	GetSanitizedConfig() *model.Config
	GetScheme(id string) (*model.Scheme, *model.AppError)
	GetSchemeByName(name string) (*model.Scheme, *model.AppError)
	GetSchemes(scope string, offset int, limit int) ([]*model.Scheme, *model.AppError)
	GetSchemesPage(scope string, page int, perPage int) ([]*model.Scheme, *model.AppError)
	GetSession(token string) (*model.Session, *model.AppError)
	GetSessionById(sessionId string) (*model.Session, *model.AppError)
	GetSessions(userId string) ([]*model.Session, *model.AppError)
	GetSiteURL() string
	GetStatus(userId string) (*model.Status, *model.AppError)
	GetStatusFromCache(userId string) *model.Status
	GetStatusesByIds(userIds []string) (map[string]interface{}, *model.AppError)
	GetT() goi18n.TranslateFunc
	GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError)
	GetTeamsForScheme(scheme *model.Scheme, offset int, limit int) ([]*model.Team, *model.AppError)
	GetTeamsForSchemePage(scheme *model.Scheme, page int, perPage int) ([]*model.Team, *model.AppError)
	GetTermsOfService(id string) (*model.TermsOfService, *model.AppError)
	GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions) (*model.UsersStats, *model.AppError)
	GetUser(userId string) (*model.User, *model.AppError)
	GetUserAccessToken(tokenId string, sanitize bool) (*model.UserAccessToken, *model.AppError)
	GetUserAccessTokens(page, perPage int) ([]*model.UserAccessToken, *model.AppError)
	GetUserAccessTokensForUser(userId string, page, perPage int) ([]*model.UserAccessToken, *model.AppError)
	GetUserByAuth(authData *string, authService string) (*model.User, *model.AppError)
	GetUserByEmail(email string) (*model.User, *model.AppError)
	GetUserByUsername(username string) (*model.User, *model.AppError)
	GetUserForLogin(id, loginId string) (*model.User, *model.AppError)
	GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError)
	GetUserTermsOfService(userId string) (*model.UserTermsOfService, *model.AppError)
	GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)
	GetUsersByGroupChannelIds(channelIds []string, asAdmin bool) (map[string][]*model.User, *model.AppError)
	GetUsersByIds(userIds []string, options *store.UserGetByIdsOpts) ([]*model.User, *model.AppError)
	GetUsersByUsernames(usernames []string, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetUsersEtag(restrictionsHash string) string
	GetUsersInChannel(channelId string, offset int, limit int) ([]*model.User, *model.AppError)
	GetUsersInChannelByStatus(channelId string, offset int, limit int) ([]*model.User, *model.AppError)
	GetUsersInChannelMap(channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
	GetUsersInChannelPage(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
	GetUsersInChannelPageByStatus(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
	GetUsersInTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)
	GetUsersInTeamEtag(teamId string, restrictionsHash string) string
	GetUsersInTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
	GetUsersNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetUsersNotInChannelMap(teamId string, channelId string, groupConstrained bool, offset int, limit int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) (map[string]*model.User, *model.AppError)
	GetUsersNotInChannelPage(teamId string, channelId string, groupConstrained bool, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetUsersNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetUsersNotInTeamEtag(teamId string, restrictionsHash string) string
	GetUsersNotInTeamPage(teamId string, groupConstrained bool, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
	GetUsersPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
	GetUsersWithoutTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)
	GetUsersWithoutTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
	GetVerifyEmailToken(token string) (*model.Token, *model.AppError)
	GetViewUsersRestrictions(userId string) (*model.ViewUsersRestrictions, *model.AppError)
	HTMLTemplates() *template.Template
	HTTPService() httpservice.HTTPService
	Handle404(w http.ResponseWriter, r *http.Request)
	HandleCommandResponse(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.CommandResponse, *model.AppError)
	HandleCommandResponsePost(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.Post, *model.AppError)
	HandleCommandWebhook(hookId string, response *model.CommandResponse) *model.AppError
	HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte)
	HandleIncomingWebhook(hookId string, req *model.IncomingWebhookRequest) *model.AppError
	HandleMessageExportConfig(cfg *model.Config, appCfg *model.Config)
	HasPermissionTo(askingUserId string, permission *model.Permission) bool
	HasPermissionToChannel(askingUserId string, channelId string, permission *model.Permission) bool
	HasPermissionToChannelByPost(askingUserId string, postId string, permission *model.Permission) bool
	HasPermissionToTeam(askingUserId string, teamId string, permission *model.Permission) bool
	HasPermissionToUser(askingUserId string, userId string) bool
	HubRegister(webConn *WebConn)
	HubStart()
	HubStop()
	HubUnregister(webConn *WebConn)
	ImageProxy() *imageproxy.ImageProxy
	ImportPermissions(jsonl io.Reader) error
	InvalidateAllCaches() *model.AppError
	InvalidateAllCachesSkipSend()
	InvalidateCacheForUser(userId string)
	InvalidateWebConnSessionCacheForUser(userId string)
	IpAddress() string
	IsFirstUserAccount() bool
	IsLeader() bool
	IsPasswordValid(password string) *model.AppError
	IsPhase2MigrationCompleted() *model.AppError
	IsUserAway(lastActivityAt int64) bool
	IsUserSignUpAllowed() *model.AppError
	IsUsernameTaken(name string) bool
	Ldap() einterfaces.LdapInterface
	License() *model.License
	LimitedClientConfig() map[string]string
	LimitedClientConfigWithComputed() map[string]string
	ListAllCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
	ListAutocompleteCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
	ListDirectory(path string) ([]string, *model.AppError)
	ListTeamCommands(teamId string) ([]*model.Command, *model.AppError)
	LoadLicense()
	Log() *mlog.Logger
	LoginByOAuth(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)
	MakePermissionError(permission *model.Permission) *model.AppError
	MessageExport() einterfaces.MessageExportInterface
	Metrics() einterfaces.MetricsInterface
	MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo
	MoveCommand(team *model.Team, command *model.Command) *model.AppError
	MoveFile(oldPath, newPath string) *model.AppError
	NewClusterDiscoveryService() *ClusterDiscoveryService
	NewWebConn(ws *websocket.Conn, session model.Session, t goi18n.TranslateFunc, locale string) *WebConn
	NewWebHub() *Hub
	Notification() einterfaces.NotificationInterface
	NotificationsLog() *mlog.Logger
	OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError
	OriginChecker() func(*http.Request) bool
	PatchRole(role *model.Role, patch *model.RolePatch) (*model.Role, *model.AppError)
	PatchScheme(scheme *model.Scheme, patch *model.SchemePatch) (*model.Scheme, *model.AppError)
	PatchUser(userId string, patch *model.UserPatch, asAdmin bool) (*model.User, *model.AppError)
	Path() string
	PermanentDeleteAllUsers() *model.AppError
	PermanentDeleteUser(user *model.User) *model.AppError
	PostActionCookieSecret() []byte
	ProcessSlackAttachments(attachments []*model.SlackAttachment) []*model.SlackAttachment
	ProcessSlackText(text string) string
	PromoteGuestToUser(user *model.User, requestorId string) *model.AppError
	Publish(message *model.WebSocketEvent)
	PublishSkipClusterSend(message *model.WebSocketEvent)
	PurgeElasticsearchIndexes() *model.AppError
	ReadFile(path string) ([]byte, *model.AppError)
	RecycleDatabaseConnection()
	RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError)
	RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
	RegenerateOAuthAppSecret(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
	ReloadConfig() error
	RemoveConfigListener(id string)
	RemoveFile(path string) *model.AppError
	RemoveLicense() *model.AppError
	RemoveLicenseListener(id string)
	RemoveSamlIdpCertificate() *model.AppError
	RemoveSamlPrivateCertificate() *model.AppError
	RemoveSamlPublicCertificate() *model.AppError
	RequestId() string
	ResetPasswordFromToken(userSuppliedTokenString, newPassword string) *model.AppError
	ResetPermissionsSystem() *model.AppError
	RestrictUsersGetByPermissions(userId string, options *model.UserGetOptions) (*model.UserGetOptions, *model.AppError)
	RestrictUsersSearchByPermissions(userId string, options *model.UserSearchOptions) (*model.UserSearchOptions, *model.AppError)
	RevokeAccessToken(token string) *model.AppError
	RevokeAllSessions(userId string) *model.AppError
	RevokeSession(session *model.Session) *model.AppError
	RevokeSessionById(sessionId string) *model.AppError
	RevokeSessionsForDeviceId(userId string, deviceId string, currentSessionId string) *model.AppError
	RevokeSessionsFromAllUsers() *model.AppError
	RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
	RolesGrantPermission(roleNames []string, permissionId string) bool
	Saml() einterfaces.SamlInterface
	SanitizeProfile(user *model.User, asAdmin bool)
	SaveAndBroadcastStatus(status *model.Status)
	SaveBrandImage(imageData *multipart.FileHeader) *model.AppError
	SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)
	SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) *model.AppError
	SaveLicense(licenseBytes []byte) (*model.License, *model.AppError)
	SaveReactionForPost(reaction *model.Reaction) (*model.Reaction, *model.AppError)
	SaveUserTermsOfService(userId, termsOfServiceId string, accepted bool) *model.AppError
	SchemesIterator(scope string, batchSize int) func() []*model.Scheme
	SearchEmoji(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError)
	SearchEngine() *searchengine.Broker
	SearchUserAccessTokens(term string) ([]*model.UserAccessToken, *model.AppError)
	SearchUsers(props *model.UserSearch, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
	SearchUsersInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
	SearchUsersInTeam(teamId, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
	SearchUsersNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
	SearchUsersNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
	SearchUsersWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
	SendAckToPushProxy(ack *model.PushNotificationAck) error
	SendAutoResponse(channel *model.Channel, receiver *model.User) (bool, *model.AppError)
	SendAutoResponseIfNecessary(channel *model.Channel, sender *model.User) (bool, *model.AppError)
	SendDailyDiagnostics()
	SendDeactivateAccountEmail(email string, locale, siteURL string) *model.AppError
	SendDiagnostic(event string, properties map[string]interface{})
	SendEmailVerification(user *model.User, newEmail string) *model.AppError
	SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, siteURL string)
	SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList) ([]string, error)
	SendPasswordReset(email string, siteURL string) (bool, *model.AppError)
	SendPasswordResetEmail(email string, token *model.Token, locale, siteURL string) (bool, *model.AppError)
	SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError
	ServerBusyStateChanged(sbs *model.ServerBusyState)
	Session() *model.Session
	SessionCacheLength() int
	SessionHasPermissionTo(session model.Session, permission *model.Permission) bool
	SessionHasPermissionToChannel(session model.Session, channelId string, permission *model.Permission) bool
	SessionHasPermissionToChannelByPost(session model.Session, postId string, permission *model.Permission) bool
	SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError
	SessionHasPermissionToTeam(session model.Session, teamId string, permission *model.Permission) bool
	SessionHasPermissionToUser(session model.Session, userId string) bool
	SessionHasPermissionToUserOrBot(session model.Session, userId string) bool
	SetAcceptLanguage(s string)
	SetAutoResponderStatus(user *model.User, oldNotifyProps model.StringMap)
	SetClientLicense(m map[string]string)
	SetContext(c context.Context)
	SetDefaultProfileImage(user *model.User) *model.AppError
	SetDiagnosticId(id string)
	SetIpAddress(s string)
	SetLicense(license *model.License) bool
	SetLog(l *mlog.Logger)
	SetPath(s string)
	SetPhase2PermissionsMigrationStatus(isComplete bool) error
	SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppError
	SetProfileImageFromFile(userId string, file io.Reader) *model.AppError
	SetProfileImageFromMultiPartFile(userId string, file multipart.File) *model.AppError
	SetRequestId(s string)
	SetSamlIdpCertificateFromMetadata(data []byte) *model.AppError
	SetSearchEngine(se *searchengine.Broker)
	SetServer(srv *Server)
	SetSession(s *model.Session)
	SetStatusAwayIfNeeded(userId string, manual bool)
	SetStatusDoNotDisturb(userId string)
	SetStatusLastActivityAt(userId string, activityAt int64)
	SetStatusOffline(userId string, manual bool)
	SetStatusOnline(userId string, manual bool)
	SetStatusOutOfOffice(userId string)
	SetT(t goi18n.TranslateFunc)
	SetUserAgent(s string)
	SetupInviteEmailRateLimiting() error
	Shutdown()
	SlackAddBotUser(teamId string, log *bytes.Buffer) *model.User
	SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User, importerLog *bytes.Buffer) map[string]*model.Channel
	SlackAddPosts(teamId string, channel *model.Channel, posts []SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User)
	SlackAddUsers(teamId string, slackusers []SlackUser, importerLog *bytes.Buffer) map[string]*model.User
	SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)
	SlackUploadFile(slackPostFile *SlackFile, uploads map[string]*zip.File, teamId string, channelId string, userId string, slackTimestamp string) (*model.FileInfo, bool)
	Srv() *Server
	StartPushNotificationsHubWorkers()
	StopPushNotificationsHubWorkers()
	SubmitInteractiveDialog(request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError)
	SwitchEmailToLdap(email, password, code, ldapLoginId, ldapPassword string) (string, *model.AppError)
	SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, password, code, service string) (string, *model.AppError)
	SwitchLdapToEmail(ldapPassword, code, email, newPassword string) (string, *model.AppError)
	SwitchOAuthToEmail(email, password, requesterId string) (string, *model.AppError)
	SyncLdap()
	SyncRolesAndMembership(syncableID string, syncableType model.GroupSyncableType)
	SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError
	T(translationID string, args ...interface{}) string
	TestElasticsearch(cfg *model.Config) *model.AppError
	TestEmail(userId string, cfg *model.Config) *model.AppError
	TestLdap() *model.AppError
	TestSiteURL(siteURL string) *model.AppError
	Timezones() *timezones.Timezones
	TotalWebsocketConnections() int
	TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, post *model.Post, channel *model.Channel)
	UpdateActive(user *model.User, active bool) (*model.User, *model.AppError)
	UpdateCommand(oldCmd, updatedCmd *model.Command) (*model.Command, *model.AppError)
	UpdateConfig(f func(*model.Config))
	UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
	UpdateLastActivityAtIfNeeded(session model.Session)
	UpdateMfa(activate bool, userId, token string) *model.AppError
	UpdateMobileAppBadge(userId string)
	UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, service string) *model.AppError
	UpdateOauthApp(oldApp, updatedApp *model.OAuthApp) (*model.OAuthApp, *model.AppError)
	UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
	UpdatePassword(user *model.User, newPassword string) *model.AppError
	UpdatePasswordAsUser(userId, currentPassword, newPassword string) *model.AppError
	UpdatePasswordByUserIdSendEmail(userId, newPassword, method string) *model.AppError
	UpdatePasswordSendEmail(user *model.User, newPassword, method string) *model.AppError
	UpdatePreferences(userId string, preferences model.Preferences) *model.AppError
	UpdateRole(role *model.Role) (*model.Role, *model.AppError)
	UpdateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)
	UpdateSessionsIsGuest(userId string, isGuest bool)
	UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError)
	UpdateUserActive(userId string, active bool) *model.AppError
	UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *model.AppError)
	UpdateUserAuth(userId string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError)
	UpdateUserNotifyProps(userId string, props map[string]string) (*model.User, *model.AppError)
	UpdateUserRoles(userId string, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError)
	UpdateWebConnUserActivity(session model.Session, activityAt int64)
	UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError
	UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError)
	UploadFileX(channelId, name string, input io.Reader, opts ...func(*UploadFileTask)) (*model.FileInfo, *model.AppError)
	UploadFiles(teamId string, channelId string, userId string, files []io.ReadCloser, filenames []string, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)
	UploadMultipartFiles(teamId string, channelId string, userId string, fileHeaders []*multipart.FileHeader, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)
	UserAgent() string
	UserCanSeeOtherUser(userId string, otherUserId string) (bool, *model.AppError)
	ValidateAndSetLicenseBytes(b []byte)
	VerifyEmailFromToken(userSuppliedTokenString string) *model.AppError
	VerifyUserEmail(userId, email string) *model.AppError
	WriteFile(fr io.Reader, path string) (int64, *model.AppError)
}

AppIface is extracted from App struct and contains all it's exported methods. It's provided to allow partial interface passing and app layers creation.

type AppOption

type AppOption func(a *App)

func ServerConnector

func ServerConnector(s *Server) AppOption

type AppOptionCreator

type AppOptionCreator func() []AppOption

type AttachmentImportData

type AttachmentImportData struct {
	Path *string `json:"path"`
}

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(a *App, client *model.Client4, team *model.Team) *AutoUserCreator

func (*AutoUserCreator) CreateTestUsers

func (cfg *AutoUserCreator) CreateTestUsers(num utils.Range) ([]*model.User, bool)

type AwayProvider

type AwayProvider struct {
}

func (*AwayProvider) DoCommand

func (me *AwayProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*AwayProvider) GetCommand

func (me *AwayProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*AwayProvider) GetTrigger

func (me *AwayProvider) GetTrigger() string

type Busy

type Busy struct {
	// contains filtered or unexported fields
}

Busy represents the busy state of the server. A server marked busy will have non-critical services disabled. If a Cluster is provided any changes will be propagated to each node.

func NewBusy

func NewBusy(cluster einterfaces.ClusterInterface) *Busy

NewBusy creates a new Busy instance with optional cluster which will be notified of busy state changes.

func (*Busy) Clear

func (b *Busy) Clear()

ClearBusy marks the server as not busy and notifies cluster nodes.

func (*Busy) ClusterEventChanged

func (b *Busy) ClusterEventChanged(sbs *model.ServerBusyState)

ClusterEventChanged is called when a CLUSTER_EVENT_BUSY_STATE_CHANGED is received.

func (*Busy) Expires

func (b *Busy) Expires() time.Time

Expires returns the expected time that the server will be marked not busy. This expiry can be extended via additional calls to SetBusy.

func (*Busy) IsBusy

func (b *Busy) IsBusy() bool

IsBusy returns true if the server has been marked as busy.

func (*Busy) Set

func (b *Busy) Set(dur time.Duration)

Set marks the server as busy for dur duration and notifies cluster nodes.

func (*Busy) ToJson

func (b *Busy) ToJson() string

type ChannelImportData

type ChannelImportData struct {
	Team        *string `json:"team"`
	Name        *string `json:"name"`
	DisplayName *string `json:"display_name"`
	Type        *string `json:"type"`
	Header      *string `json:"header,omitempty"`
	Purpose     *string `json:"purpose,omitempty"`
	Scheme      *string `json:"scheme,omitempty"`
}

type ClusterDiscoveryService

type ClusterDiscoveryService struct {
	model.ClusterDiscovery
	// contains filtered or unexported fields
}

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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*CodeProvider) GetCommand

func (me *CodeProvider) GetCommand(a *App, 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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*CollapseProvider) GetCommand

func (me *CollapseProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*CollapseProvider) GetTrigger

func (me *CollapseProvider) GetTrigger() string

type CommandProvider

type CommandProvider interface {
	GetTrigger() string
	GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
	DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
}

func GetCommandProvider

func GetCommandProvider(name string) CommandProvider

type ComparablePreference

type ComparablePreference struct {
	Category string
	Name     string
}

type DirectChannelImportData

type DirectChannelImportData struct {
	Members     *[]string `json:"members"`
	FavoritedBy *[]string `json:"favorited_by"`

	Header *string `json:"header"`
}

type DirectPostImportData

type DirectPostImportData struct {
	ChannelMembers *[]string `json:"channel_members"`
	User           *string   `json:"user"`

	Message  *string                `json:"message"`
	Props    *model.StringInterface `json:"props"`
	CreateAt *int64                 `json:"create_at"`

	FlaggedBy   *[]string               `json:"flagged_by"`
	Reactions   *[]ReactionImportData   `json:"reactions"`
	Replies     *[]ReplyImportData      `json:"replies"`
	Attachments *[]AttachmentImportData `json:"attachments"`
}

type DndProvider

type DndProvider struct {
}

func (*DndProvider) DoCommand

func (me *DndProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*DndProvider) GetCommand

func (me *DndProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*DndProvider) GetTrigger

func (me *DndProvider) GetTrigger() string

type EchoProvider

type EchoProvider struct {
}

func (*EchoProvider) DoCommand

func (me *EchoProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*EchoProvider) GetCommand

func (me *EchoProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*EchoProvider) GetTrigger

func (me *EchoProvider) GetTrigger() string

type EmailBatchingJob

type EmailBatchingJob struct {
	// contains filtered or unexported fields
}

func NewEmailBatchingJob

func NewEmailBatchingJob(s *Server, bufferSize int) *EmailBatchingJob

func (*EmailBatchingJob) Add

func (job *EmailBatchingJob) Add(user *model.User, post *model.Post, team *model.Team) bool

func (*EmailBatchingJob) CheckPendingEmails

func (job *EmailBatchingJob) CheckPendingEmails()

func (*EmailBatchingJob) Start

func (job *EmailBatchingJob) Start()

type EmojiImportData

type EmojiImportData struct {
	Name  *string `json:"name"`
	Image *string `json:"image"`
}

type ExpandProvider

type ExpandProvider struct {
}

func (*ExpandProvider) DoCommand

func (me *ExpandProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*ExpandProvider) GetCommand

func (me *ExpandProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*ExpandProvider) GetTrigger

func (me *ExpandProvider) GetTrigger() string

type ExplicitMentions

type ExplicitMentions struct {
	// Mentions contains the ID of each user that was mentioned and how they were mentioned.
	Mentions map[string]MentionType

	// OtherPotentialMentions contains a list of strings that looked like mentions, but didn't have
	// a corresponding keyword.
	OtherPotentialMentions []string

	// HereMentioned is true if the message contained @here.
	HereMentioned bool

	// AllMentioned is true if the message contained @all.
	AllMentioned bool

	// ChannelMentioned is true if the message contained @channel.
	ChannelMentioned bool
}

type HelpProvider

type HelpProvider struct {
}

func (*HelpProvider) DoCommand

func (h *HelpProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*HelpProvider) GetCommand

func (h *HelpProvider) GetCommand(a *App, 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 (*Hub) Broadcast

func (h *Hub) Broadcast(message *model.WebSocketEvent)

func (*Hub) InvalidateUser

func (h *Hub) InvalidateUser(userId string)

func (*Hub) Register

func (h *Hub) Register(webConn *WebConn)

func (*Hub) Start

func (h *Hub) Start()

func (*Hub) Stop

func (h *Hub) Stop()

func (*Hub) Unregister

func (h *Hub) Unregister(webConn *WebConn)

func (*Hub) UpdateActivity

func (h *Hub) UpdateActivity(userId, sessionToken string, activityAt int64)

type InvitePeopleProvider

type InvitePeopleProvider struct {
}

func (*InvitePeopleProvider) DoCommand

func (me *InvitePeopleProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*InvitePeopleProvider) GetCommand

func (me *InvitePeopleProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*InvitePeopleProvider) GetTrigger

func (me *InvitePeopleProvider) GetTrigger() string

type InviteProvider

type InviteProvider struct {
}

func (*InviteProvider) DoCommand

func (me *InviteProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*InviteProvider) GetCommand

func (me *InviteProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*InviteProvider) GetTrigger

func (me *InviteProvider) GetTrigger() string

type JoinProvider

type JoinProvider struct {
}

func (*JoinProvider) DoCommand

func (me *JoinProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*JoinProvider) GetCommand

func (me *JoinProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*JoinProvider) GetTrigger

func (me *JoinProvider) GetTrigger() string

type KickProvider

type KickProvider struct {
}

func (*KickProvider) DoCommand

func (me *KickProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*KickProvider) GetCommand

func (me *KickProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*KickProvider) GetTrigger

func (me *KickProvider) GetTrigger() string

type LeaveProvider

type LeaveProvider struct {
}

func (*LeaveProvider) DoCommand

func (me *LeaveProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LeaveProvider) GetCommand

func (me *LeaveProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*LeaveProvider) GetTrigger

func (me *LeaveProvider) GetTrigger() string

type LineImportData

type LineImportData struct {
	Type          string                   `json:"type"`
	Scheme        *SchemeImportData        `json:"scheme,omitempty"`
	Team          *TeamImportData          `json:"team,omitempty"`
	Channel       *ChannelImportData       `json:"channel,omitempty"`
	User          *UserImportData          `json:"user,omitempty"`
	Post          *PostImportData          `json:"post,omitempty"`
	DirectChannel *DirectChannelImportData `json:"direct_channel,omitempty"`
	DirectPost    *DirectPostImportData    `json:"direct_post,omitempty"`
	Emoji         *EmojiImportData         `json:"emoji,omitempty"`
	Version       *int                     `json:"version,omitempty"`
}

func ImportLineForDirectPost

func ImportLineForDirectPost(post *model.DirectPostForExport) *LineImportData

func ImportLineForPost

func ImportLineForPost(post *model.PostForExport) *LineImportData

func ImportLineFromChannel

func ImportLineFromChannel(channel *model.ChannelForExport) *LineImportData

func ImportLineFromDirectChannel

func ImportLineFromDirectChannel(channel *model.DirectChannelForExport) *LineImportData

func ImportLineFromEmoji

func ImportLineFromEmoji(emoji *model.Emoji, filePath string) *LineImportData

func ImportLineFromTeam

func ImportLineFromTeam(team *model.TeamForExport) *LineImportData

func ImportLineFromUser

func ImportLineFromUser(user *model.User, exportedPrefs map[string]*string) *LineImportData

type LineImportWorkerData

type LineImportWorkerData struct {
	LineImportData
	LineNumber int
}

type LineImportWorkerError

type LineImportWorkerError struct {
	Error      *model.AppError
	LineNumber int
}

type LoadTestProvider

type LoadTestProvider struct {
}

func (*LoadTestProvider) ActivateUserCommand

func (me *LoadTestProvider) ActivateUserCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) ChannelsCommand

func (me *LoadTestProvider) ChannelsCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) DeActivateUserCommand

func (me *LoadTestProvider) DeActivateUserCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) DoCommand

func (me *LoadTestProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) GetCommand

func (me *LoadTestProvider) GetCommand(a *App, 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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) PostCommand

func (me *LoadTestProvider) PostCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) PostsCommand

func (me *LoadTestProvider) PostsCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) SetupCommand

func (me *LoadTestProvider) SetupCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) ThreadedPostCommand

func (me *LoadTestProvider) ThreadedPostCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) UrlCommand

func (me *LoadTestProvider) UrlCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LoadTestProvider) UsersCommand

func (me *LoadTestProvider) UsersCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

type LocalResponseWriter

type LocalResponseWriter struct {
	// contains filtered or unexported fields
}

func (*LocalResponseWriter) Header

func (w *LocalResponseWriter) Header() http.Header

func (*LocalResponseWriter) Write

func (w *LocalResponseWriter) Write(bytes []byte) (int, error)

func (*LocalResponseWriter) WriteHeader

func (w *LocalResponseWriter) WriteHeader(statusCode int)

type LogoutProvider

type LogoutProvider struct {
}

func (*LogoutProvider) DoCommand

func (me *LogoutProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*LogoutProvider) GetCommand

func (me *LogoutProvider) GetCommand(a *App, 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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*MeProvider) GetCommand

func (me *MeProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*MeProvider) GetTrigger

func (me *MeProvider) GetTrigger() string

type MentionType

type MentionType int
const (

	// A placeholder that should never be used in practice
	NoMention MentionType = iota

	// The post is in a thread that the user has commented on
	ThreadMention

	// The post is a comment on a thread started by the user
	CommentMention

	// The post contains an at-channel, at-all, or at-here
	ChannelMention

	// The post is a DM
	DMMention

	// The post contains an at-mention for the user
	KeywordMention
)

type MuteProvider

type MuteProvider struct {
}

func (*MuteProvider) DoCommand

func (me *MuteProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*MuteProvider) GetCommand

func (me *MuteProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*MuteProvider) GetTrigger

func (me *MuteProvider) GetTrigger() string

type OfflineProvider

type OfflineProvider struct {
}

func (*OfflineProvider) DoCommand

func (me *OfflineProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*OfflineProvider) GetCommand

func (me *OfflineProvider) GetCommand(a *App, 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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*OnlineProvider) GetCommand

func (me *OnlineProvider) GetCommand(a *App, 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(a *App, T goi18n.TranslateFunc) *model.Command

func (*OpenProvider) GetTrigger

func (open *OpenProvider) GetTrigger() string

type OpenTracingAppLayer

type OpenTracingAppLayer struct {
	// contains filtered or unexported fields
}

func NewOpenTracingAppLayer

func NewOpenTracingAppLayer(childApp AppIface, ctx context.Context) *OpenTracingAppLayer

func (*OpenTracingAppLayer) AcceptLanguage

func (a *OpenTracingAppLayer) AcceptLanguage() string

func (*OpenTracingAppLayer) AccountMigration

func (*OpenTracingAppLayer) ActivateMfa

func (a *OpenTracingAppLayer) ActivateMfa(userId string, token string) *model.AppError

func (*OpenTracingAppLayer) AddConfigListener

func (a *OpenTracingAppLayer) AddConfigListener(listener func(*model.Config, *model.Config)) string

func (*OpenTracingAppLayer) AddLicenseListener

func (a *OpenTracingAppLayer) AddLicenseListener(listener func(oldLicense, newLicense *model.License)) string

func (*OpenTracingAppLayer) AddNotificationEmailToBatch

func (a *OpenTracingAppLayer) AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError

func (*OpenTracingAppLayer) AddSamlIdpCertificate

func (a *OpenTracingAppLayer) AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError

func (*OpenTracingAppLayer) AddSamlPrivateCertificate

func (a *OpenTracingAppLayer) AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError

func (*OpenTracingAppLayer) AddSamlPublicCertificate

func (a *OpenTracingAppLayer) AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError

func (*OpenTracingAppLayer) AddSessionToCache

func (a *OpenTracingAppLayer) AddSessionToCache(session *model.Session)

func (*OpenTracingAppLayer) AddStatusCache

func (a *OpenTracingAppLayer) AddStatusCache(status *model.Status)

func (*OpenTracingAppLayer) AddStatusCacheSkipClusterSend

func (a *OpenTracingAppLayer) AddStatusCacheSkipClusterSend(status *model.Status)

func (*OpenTracingAppLayer) AllowOAuthAppAccessToUser

func (a *OpenTracingAppLayer) AllowOAuthAppAccessToUser(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)

func (*OpenTracingAppLayer) AsymmetricSigningKey

func (a *OpenTracingAppLayer) AsymmetricSigningKey() *ecdsa.PrivateKey

func (*OpenTracingAppLayer) AttachDeviceId

func (a *OpenTracingAppLayer) AttachDeviceId(sessionId string, deviceId string, expiresAt int64) *model.AppError

func (*OpenTracingAppLayer) AttachSessionCookies

func (a *OpenTracingAppLayer) AttachSessionCookies(w http.ResponseWriter, r *http.Request)

func (*OpenTracingAppLayer) AuthenticateUserForLogin

func (a *OpenTracingAppLayer) AuthenticateUserForLogin(id string, loginId string, password string, mfaToken string, ldapOnly bool) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) AuthorizeOAuthUser

func (a *OpenTracingAppLayer) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service string, code string, state string, redirectUri string) (io.ReadCloser, string, map[string]string, *model.AppError)

func (*OpenTracingAppLayer) AutocompleteUsersInChannel

func (a *OpenTracingAppLayer) AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError)

func (*OpenTracingAppLayer) AutocompleteUsersInTeam

func (a *OpenTracingAppLayer) AutocompleteUsersInTeam(teamId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInTeam, *model.AppError)

func (*OpenTracingAppLayer) BroadcastStatus

func (a *OpenTracingAppLayer) BroadcastStatus(status *model.Status)

func (*OpenTracingAppLayer) BuildPostReactions

func (a *OpenTracingAppLayer) BuildPostReactions(postId string) (*[]ReactionImportData, *model.AppError)

func (*OpenTracingAppLayer) BuildPushNotificationMessage

func (a *OpenTracingAppLayer) BuildPushNotificationMessage(contentsConfig string, post *model.Post, user *model.User, channel *model.Channel, channelName string, senderName string, explicitMention bool, channelWideMention bool, replyToThreadType string) (*model.PushNotification, *model.AppError)

func (*OpenTracingAppLayer) BuildSamlMetadataObject

func (a *OpenTracingAppLayer) BuildSamlMetadataObject(idpMetadata []byte) (*model.SamlMetadataResponse, *model.AppError)

func (*OpenTracingAppLayer) BulkExport

func (a *OpenTracingAppLayer) BulkExport(writer io.Writer, file string, pathToEmojiDir string, dirNameToExportEmoji string) *model.AppError

func (*OpenTracingAppLayer) BulkImport

func (a *OpenTracingAppLayer) BulkImport(fileReader io.Reader, dryRun bool, workers int) (*model.AppError, int)

func (*OpenTracingAppLayer) CancelJob

func (a *OpenTracingAppLayer) CancelJob(jobId string) *model.AppError

func (*OpenTracingAppLayer) CheckForClientSideCert

func (a *OpenTracingAppLayer) CheckForClientSideCert(r *http.Request) (string, string, string)

func (*OpenTracingAppLayer) CheckPasswordAndAllCriteria

func (a *OpenTracingAppLayer) CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError

func (*OpenTracingAppLayer) CheckRolesExist

func (a *OpenTracingAppLayer) CheckRolesExist(roleNames []string) *model.AppError

func (*OpenTracingAppLayer) CheckUserAllAuthenticationCriteria

func (a *OpenTracingAppLayer) CheckUserAllAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError

func (*OpenTracingAppLayer) CheckUserMfa

func (a *OpenTracingAppLayer) CheckUserMfa(user *model.User, token string) *model.AppError

func (*OpenTracingAppLayer) CheckUserPostflightAuthenticationCriteria

func (a *OpenTracingAppLayer) CheckUserPostflightAuthenticationCriteria(user *model.User) *model.AppError

func (*OpenTracingAppLayer) CheckUserPreflightAuthenticationCriteria

func (a *OpenTracingAppLayer) CheckUserPreflightAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError

func (*OpenTracingAppLayer) ClearSessionCacheForAllUsers

func (a *OpenTracingAppLayer) ClearSessionCacheForAllUsers()

func (*OpenTracingAppLayer) ClearSessionCacheForAllUsersSkipClusterSend

func (a *OpenTracingAppLayer) ClearSessionCacheForAllUsersSkipClusterSend()

func (*OpenTracingAppLayer) ClearSessionCacheForUser

func (a *OpenTracingAppLayer) ClearSessionCacheForUser(userId string)

func (*OpenTracingAppLayer) ClearSessionCacheForUserSkipClusterSend

func (a *OpenTracingAppLayer) ClearSessionCacheForUserSkipClusterSend(userId string)

func (*OpenTracingAppLayer) ClientConfig

func (a *OpenTracingAppLayer) ClientConfig() map[string]string

func (*OpenTracingAppLayer) ClientConfigHash

func (a *OpenTracingAppLayer) ClientConfigHash() string

func (*OpenTracingAppLayer) ClientConfigWithComputed

func (a *OpenTracingAppLayer) ClientConfigWithComputed() map[string]string

func (*OpenTracingAppLayer) ClientLicense

func (a *OpenTracingAppLayer) ClientLicense() map[string]string

func (*OpenTracingAppLayer) Cluster

func (*OpenTracingAppLayer) CompleteOAuth

func (a *OpenTracingAppLayer) CompleteOAuth(service string, body io.ReadCloser, teamId string, props map[string]string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CompleteSwitchWithOAuth

func (a *OpenTracingAppLayer) CompleteSwitchWithOAuth(service string, userData io.Reader, email string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) Compliance

func (*OpenTracingAppLayer) Config

func (a *OpenTracingAppLayer) Config() *model.Config

func (*OpenTracingAppLayer) Context

func (a *OpenTracingAppLayer) Context() context.Context

func (*OpenTracingAppLayer) CopyFileInfos

func (a *OpenTracingAppLayer) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)

func (*OpenTracingAppLayer) CreateBasicUser

func (a *OpenTracingAppLayer) CreateBasicUser(client *model.Client4) *model.AppError

func (*OpenTracingAppLayer) CreateCommand

func (a *OpenTracingAppLayer) CreateCommand(cmd *model.Command) (*model.Command, *model.AppError)

func (*OpenTracingAppLayer) CreateCommandPost

func (a *OpenTracingAppLayer) CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse, skipSlackParsing bool) (*model.Post, *model.AppError)

func (*OpenTracingAppLayer) CreateCommandWebhook

func (a *OpenTracingAppLayer) CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)

func (*OpenTracingAppLayer) CreateDefaultMemberships

func (a *OpenTracingAppLayer) CreateDefaultMemberships(since int64) error

func (*OpenTracingAppLayer) CreateEmoji

func (a *OpenTracingAppLayer) CreateEmoji(sessionUserId string, emoji *model.Emoji, multiPartImageData *multipart.Form) (*model.Emoji, *model.AppError)

func (*OpenTracingAppLayer) CreateGuest

func (a *OpenTracingAppLayer) CreateGuest(user *model.User) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateIncomingWebhookForChannel

func (a *OpenTracingAppLayer) CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) CreateJob

func (a *OpenTracingAppLayer) CreateJob(job *model.Job) (*model.Job, *model.AppError)

func (*OpenTracingAppLayer) CreateOAuthApp

func (a *OpenTracingAppLayer) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) CreateOAuthStateToken

func (a *OpenTracingAppLayer) CreateOAuthStateToken(extra string) (*model.Token, *model.AppError)

func (*OpenTracingAppLayer) CreateOAuthUser

func (a *OpenTracingAppLayer) CreateOAuthUser(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateOutgoingWebhook

func (a *OpenTracingAppLayer) CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) CreatePasswordRecoveryToken

func (a *OpenTracingAppLayer) CreatePasswordRecoveryToken(userId string, email string) (*model.Token, *model.AppError)

func (*OpenTracingAppLayer) CreateRole

func (a *OpenTracingAppLayer) CreateRole(role *model.Role) (*model.Role, *model.AppError)

func (*OpenTracingAppLayer) CreateScheme

func (a *OpenTracingAppLayer) CreateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) CreateSession

func (a *OpenTracingAppLayer) CreateSession(session *model.Session) (*model.Session, *model.AppError)

func (*OpenTracingAppLayer) CreateTermsOfService

func (a *OpenTracingAppLayer) CreateTermsOfService(text string, userId string) (*model.TermsOfService, *model.AppError)

func (*OpenTracingAppLayer) CreateUser

func (a *OpenTracingAppLayer) CreateUser(user *model.User) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateUserAccessToken

func (a *OpenTracingAppLayer) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)

func (*OpenTracingAppLayer) CreateUserAsAdmin

func (a *OpenTracingAppLayer) CreateUserAsAdmin(user *model.User) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateUserFromSignup

func (a *OpenTracingAppLayer) CreateUserFromSignup(user *model.User) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateUserWithInviteId

func (a *OpenTracingAppLayer) CreateUserWithInviteId(user *model.User, inviteId string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateUserWithToken

func (a *OpenTracingAppLayer) CreateUserWithToken(user *model.User, token *model.Token) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) CreateVerifyEmailToken

func (a *OpenTracingAppLayer) CreateVerifyEmailToken(userId string, newEmail string) (*model.Token, *model.AppError)

func (*OpenTracingAppLayer) CreateWebhookPost

func (a *OpenTracingAppLayer) CreateWebhookPost(userId string, channel *model.Channel, text string, overrideUsername string, overrideIconUrl string, overrideIconEmoji string, props model.StringInterface, postType string, postRootId string) (*model.Post, *model.AppError)

func (*OpenTracingAppLayer) DataRetention

func (*OpenTracingAppLayer) DeactivateGuests

func (a *OpenTracingAppLayer) DeactivateGuests() *model.AppError

func (*OpenTracingAppLayer) DeactivateMfa

func (a *OpenTracingAppLayer) DeactivateMfa(userId string) *model.AppError

func (*OpenTracingAppLayer) DeauthorizeOAuthAppForUser

func (a *OpenTracingAppLayer) DeauthorizeOAuthAppForUser(userId string, appId string) *model.AppError

func (*OpenTracingAppLayer) DeleteBrandImage

func (a *OpenTracingAppLayer) DeleteBrandImage() *model.AppError

func (*OpenTracingAppLayer) DeleteCommand

func (a *OpenTracingAppLayer) DeleteCommand(commandId string) *model.AppError

func (*OpenTracingAppLayer) DeleteEmoji

func (a *OpenTracingAppLayer) DeleteEmoji(emoji *model.Emoji) *model.AppError

func (*OpenTracingAppLayer) DeleteGroupConstrainedMemberships

func (a *OpenTracingAppLayer) DeleteGroupConstrainedMemberships() error

func (*OpenTracingAppLayer) DeleteIncomingWebhook

func (a *OpenTracingAppLayer) DeleteIncomingWebhook(hookId string) *model.AppError

func (*OpenTracingAppLayer) DeleteOAuthApp

func (a *OpenTracingAppLayer) DeleteOAuthApp(appId string) *model.AppError

func (*OpenTracingAppLayer) DeleteOutgoingWebhook

func (a *OpenTracingAppLayer) DeleteOutgoingWebhook(hookId string) *model.AppError

func (*OpenTracingAppLayer) DeletePreferences

func (a *OpenTracingAppLayer) DeletePreferences(userId string, preferences model.Preferences) *model.AppError

func (*OpenTracingAppLayer) DeleteReactionForPost

func (a *OpenTracingAppLayer) DeleteReactionForPost(reaction *model.Reaction) *model.AppError

func (*OpenTracingAppLayer) DeleteScheme

func (a *OpenTracingAppLayer) DeleteScheme(schemeId string) (*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) DeleteToken

func (a *OpenTracingAppLayer) DeleteToken(token *model.Token) *model.AppError

func (*OpenTracingAppLayer) DemoteUserToGuest

func (a *OpenTracingAppLayer) DemoteUserToGuest(user *model.User) *model.AppError

func (*OpenTracingAppLayer) DiagnosticId

func (a *OpenTracingAppLayer) DiagnosticId() string

func (*OpenTracingAppLayer) DisableAutoResponder

func (a *OpenTracingAppLayer) DisableAutoResponder(userId string, asAdmin bool) *model.AppError

func (*OpenTracingAppLayer) DisableUserAccessToken

func (a *OpenTracingAppLayer) DisableUserAccessToken(token *model.UserAccessToken) *model.AppError

func (*OpenTracingAppLayer) DoActionRequest

func (a *OpenTracingAppLayer) DoActionRequest(rawURL string, body []byte) (*http.Response, *model.AppError)

func (*OpenTracingAppLayer) DoAdvancedPermissionsMigration

func (a *OpenTracingAppLayer) DoAdvancedPermissionsMigration()

func (*OpenTracingAppLayer) DoAppMigrations

func (a *OpenTracingAppLayer) DoAppMigrations()

func (*OpenTracingAppLayer) DoEmojisPermissionsMigration

func (a *OpenTracingAppLayer) DoEmojisPermissionsMigration()

func (*OpenTracingAppLayer) DoGuestRolesCreationMigration

func (a *OpenTracingAppLayer) DoGuestRolesCreationMigration()

func (*OpenTracingAppLayer) DoLocalRequest

func (a *OpenTracingAppLayer) DoLocalRequest(rawURL string, body []byte) (*http.Response, *model.AppError)

func (*OpenTracingAppLayer) DoLogin

func (a *OpenTracingAppLayer) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId string) *model.AppError

func (*OpenTracingAppLayer) DoPermissionsMigrations

func (a *OpenTracingAppLayer) DoPermissionsMigrations() error

func (*OpenTracingAppLayer) DoPostAction

func (a *OpenTracingAppLayer) DoPostAction(postId string, actionId string, userId string, selectedOption string) (string, *model.AppError)

func (*OpenTracingAppLayer) DoPostActionWithCookie

func (a *OpenTracingAppLayer) DoPostActionWithCookie(postId string, actionId string, userId string, selectedOption string, cookie *model.PostActionCookie) (string, *model.AppError)

func (*OpenTracingAppLayer) DoUploadFile

func (a *OpenTracingAppLayer) DoUploadFile(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, *model.AppError)

func (*OpenTracingAppLayer) DoUploadFileExpectModification

func (a *OpenTracingAppLayer) DoUploadFileExpectModification(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, []byte, *model.AppError)

func (*OpenTracingAppLayer) DoubleCheckPassword

func (a *OpenTracingAppLayer) DoubleCheckPassword(user *model.User, password string) *model.AppError

func (*OpenTracingAppLayer) DownloadFromURL

func (a *OpenTracingAppLayer) DownloadFromURL(downloadURL string) ([]byte, error)

func (*OpenTracingAppLayer) EnableUserAccessToken

func (a *OpenTracingAppLayer) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError

func (*OpenTracingAppLayer) EnvironmentConfig

func (a *OpenTracingAppLayer) EnvironmentConfig() map[string]interface{}

func (*OpenTracingAppLayer) ExecuteCommand

func (*OpenTracingAppLayer) ExportPermissions

func (a *OpenTracingAppLayer) ExportPermissions(w io.Writer) error

func (*OpenTracingAppLayer) FetchSamlMetadataFromIdp

func (a *OpenTracingAppLayer) FetchSamlMetadataFromIdp(url string) ([]byte, *model.AppError)

func (*OpenTracingAppLayer) FileBackend

func (*OpenTracingAppLayer) FileExists

func (a *OpenTracingAppLayer) FileExists(path string) (bool, *model.AppError)

func (*OpenTracingAppLayer) FileReader

func (*OpenTracingAppLayer) FilterNonGroupChannelMembers

func (a *OpenTracingAppLayer) FilterNonGroupChannelMembers(userIds []string, channel *model.Channel) ([]string, error)

func (*OpenTracingAppLayer) FilterNonGroupTeamMembers

func (a *OpenTracingAppLayer) FilterNonGroupTeamMembers(userIds []string, team *model.Team) ([]string, error)

func (*OpenTracingAppLayer) GenerateMfaSecret

func (a *OpenTracingAppLayer) GenerateMfaSecret(userId string) (*model.MfaSecret, *model.AppError)
func (a *OpenTracingAppLayer) GeneratePublicLink(siteURL string, info *model.FileInfo) string

func (*OpenTracingAppLayer) GetAllLdapGroupsPage

func (a *OpenTracingAppLayer) GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)

func (*OpenTracingAppLayer) GetAllRoles

func (a *OpenTracingAppLayer) GetAllRoles() ([]*model.Role, *model.AppError)

func (*OpenTracingAppLayer) GetAllStatuses

func (a *OpenTracingAppLayer) GetAllStatuses() map[string]*model.Status

func (*OpenTracingAppLayer) GetAnalytics

func (a *OpenTracingAppLayer) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *model.AppError)

func (*OpenTracingAppLayer) GetAudits

func (a *OpenTracingAppLayer) GetAudits(userId string, limit int) (model.Audits, *model.AppError)

func (*OpenTracingAppLayer) GetAuditsPage

func (a *OpenTracingAppLayer) GetAuditsPage(userId string, page int, perPage int) (model.Audits, *model.AppError)

func (*OpenTracingAppLayer) GetAuthorizationCode

func (a *OpenTracingAppLayer) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, props map[string]string, loginHint string) (string, *model.AppError)

func (*OpenTracingAppLayer) GetAuthorizedAppsForUser

func (a *OpenTracingAppLayer) GetAuthorizedAppsForUser(userId string, page int, perPage int) ([]*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) GetBrandImage

func (a *OpenTracingAppLayer) GetBrandImage() ([]byte, *model.AppError)

func (*OpenTracingAppLayer) GetBulkReactionsForPosts

func (a *OpenTracingAppLayer) GetBulkReactionsForPosts(postIds []string) (map[string][]*model.Reaction, *model.AppError)

func (*OpenTracingAppLayer) GetChannelGroupUsers

func (a *OpenTracingAppLayer) GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetChannelsForScheme

func (a *OpenTracingAppLayer) GetChannelsForScheme(scheme *model.Scheme, offset int, limit int) (model.ChannelList, *model.AppError)

func (*OpenTracingAppLayer) GetChannelsForSchemePage

func (a *OpenTracingAppLayer) GetChannelsForSchemePage(scheme *model.Scheme, page int, perPage int) (model.ChannelList, *model.AppError)

func (*OpenTracingAppLayer) GetClusterId

func (a *OpenTracingAppLayer) GetClusterId() string

func (*OpenTracingAppLayer) GetClusterStatus

func (a *OpenTracingAppLayer) GetClusterStatus() []*model.ClusterInfo

func (*OpenTracingAppLayer) GetCommand

func (a *OpenTracingAppLayer) GetCommand(commandId string) (*model.Command, *model.AppError)

func (*OpenTracingAppLayer) GetComplianceFile

func (a *OpenTracingAppLayer) GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError)

func (*OpenTracingAppLayer) GetComplianceReport

func (a *OpenTracingAppLayer) GetComplianceReport(reportId string) (*model.Compliance, *model.AppError)

func (*OpenTracingAppLayer) GetComplianceReports

func (a *OpenTracingAppLayer) GetComplianceReports(page int, perPage int) (model.Compliances, *model.AppError)

func (*OpenTracingAppLayer) GetConfigFile

func (a *OpenTracingAppLayer) GetConfigFile(name string) ([]byte, error)

func (*OpenTracingAppLayer) GetCookieDomain

func (a *OpenTracingAppLayer) GetCookieDomain() string

func (*OpenTracingAppLayer) GetDataRetentionPolicy

func (a *OpenTracingAppLayer) GetDataRetentionPolicy() (*model.DataRetentionPolicy, *model.AppError)

func (*OpenTracingAppLayer) GetDefaultProfileImage

func (a *OpenTracingAppLayer) GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError)

func (*OpenTracingAppLayer) GetEmoji

func (a *OpenTracingAppLayer) GetEmoji(emojiId string) (*model.Emoji, *model.AppError)

func (*OpenTracingAppLayer) GetEmojiByName

func (a *OpenTracingAppLayer) GetEmojiByName(emojiName string) (*model.Emoji, *model.AppError)

func (*OpenTracingAppLayer) GetEmojiImage

func (a *OpenTracingAppLayer) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)

func (*OpenTracingAppLayer) GetEmojiList

func (a *OpenTracingAppLayer) GetEmojiList(page int, perPage int, sort string) ([]*model.Emoji, *model.AppError)

func (*OpenTracingAppLayer) GetEmojiStaticUrl

func (a *OpenTracingAppLayer) GetEmojiStaticUrl(emojiName string) (string, *model.AppError)

func (*OpenTracingAppLayer) GetEnvironmentConfig

func (a *OpenTracingAppLayer) GetEnvironmentConfig() map[string]interface{}

func (*OpenTracingAppLayer) GetFile

func (a *OpenTracingAppLayer) GetFile(fileId string) ([]byte, *model.AppError)

func (*OpenTracingAppLayer) GetFileInfo

func (a *OpenTracingAppLayer) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError)

func (*OpenTracingAppLayer) GetFileInfos

func (a *OpenTracingAppLayer) GetFileInfos(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)

func (*OpenTracingAppLayer) GetHubForUserId

func (a *OpenTracingAppLayer) GetHubForUserId(userId string) *Hub

func (*OpenTracingAppLayer) GetIncomingWebhook

func (a *OpenTracingAppLayer) GetIncomingWebhook(hookId string) (*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetIncomingWebhooksForTeamPage

func (a *OpenTracingAppLayer) GetIncomingWebhooksForTeamPage(teamId string, page int, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetIncomingWebhooksForTeamPageByUser

func (a *OpenTracingAppLayer) GetIncomingWebhooksForTeamPageByUser(teamId string, userId string, page int, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetIncomingWebhooksPage

func (a *OpenTracingAppLayer) GetIncomingWebhooksPage(page int, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetIncomingWebhooksPageByUser

func (a *OpenTracingAppLayer) GetIncomingWebhooksPageByUser(userId string, page int, perPage int) ([]*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetJob

func (a *OpenTracingAppLayer) GetJob(id string) (*model.Job, *model.AppError)

func (*OpenTracingAppLayer) GetJobs

func (a *OpenTracingAppLayer) GetJobs(offset int, limit int) ([]*model.Job, *model.AppError)

func (*OpenTracingAppLayer) GetJobsByType

func (a *OpenTracingAppLayer) GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError)

func (*OpenTracingAppLayer) GetJobsByTypePage

func (a *OpenTracingAppLayer) GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError)

func (*OpenTracingAppLayer) GetJobsPage

func (a *OpenTracingAppLayer) GetJobsPage(page int, perPage int) ([]*model.Job, *model.AppError)

func (*OpenTracingAppLayer) GetLatestTermsOfService

func (a *OpenTracingAppLayer) GetLatestTermsOfService() (*model.TermsOfService, *model.AppError)

func (*OpenTracingAppLayer) GetLdapGroup

func (a *OpenTracingAppLayer) GetLdapGroup(ldapGroupID string) (*model.Group, *model.AppError)

func (*OpenTracingAppLayer) GetLogs

func (a *OpenTracingAppLayer) GetLogs(page int, perPage int) ([]string, *model.AppError)

func (*OpenTracingAppLayer) GetLogsSkipSend

func (a *OpenTracingAppLayer) GetLogsSkipSend(page int, perPage int) ([]string, *model.AppError)

func (*OpenTracingAppLayer) GetMessageForNotification

func (a *OpenTracingAppLayer) GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string

func (*OpenTracingAppLayer) GetMultipleEmojiByName

func (a *OpenTracingAppLayer) GetMultipleEmojiByName(names []string) ([]*model.Emoji, *model.AppError)

func (*OpenTracingAppLayer) GetNewUsersForTeamPage

func (a *OpenTracingAppLayer) GetNewUsersForTeamPage(teamId string, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetNotificationNameFormat

func (a *OpenTracingAppLayer) GetNotificationNameFormat(user *model.User) string

func (*OpenTracingAppLayer) GetOAuthAccessTokenForCodeFlow

func (a *OpenTracingAppLayer) GetOAuthAccessTokenForCodeFlow(clientId string, grantType string, redirectUri string, code string, secret string, refreshToken string) (*model.AccessResponse, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthAccessTokenForImplicitFlow

func (a *OpenTracingAppLayer) GetOAuthAccessTokenForImplicitFlow(userId string, authRequest *model.AuthorizeRequest) (*model.Session, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthApp

func (a *OpenTracingAppLayer) GetOAuthApp(appId string) (*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthApps

func (a *OpenTracingAppLayer) GetOAuthApps(page int, perPage int) ([]*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthAppsByCreator

func (a *OpenTracingAppLayer) GetOAuthAppsByCreator(userId string, page int, perPage int) ([]*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthCodeRedirect

func (a *OpenTracingAppLayer) GetOAuthCodeRedirect(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthImplicitRedirect

func (a *OpenTracingAppLayer) GetOAuthImplicitRedirect(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthLoginEndpoint

func (a *OpenTracingAppLayer) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, service string, teamId string, action string, redirectTo string, loginHint string) (string, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthSignupEndpoint

func (a *OpenTracingAppLayer) GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service string, teamId string) (string, *model.AppError)

func (*OpenTracingAppLayer) GetOAuthStateToken

func (a *OpenTracingAppLayer) GetOAuthStateToken(token string) (*model.Token, *model.AppError)

func (*OpenTracingAppLayer) GetOpenGraphMetadata

func (a *OpenTracingAppLayer) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph

func (*OpenTracingAppLayer) GetOutgoingWebhook

func (a *OpenTracingAppLayer) GetOutgoingWebhook(hookId string) (*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetOutgoingWebhooksForChannelPageByUser

func (a *OpenTracingAppLayer) GetOutgoingWebhooksForChannelPageByUser(channelId string, userId string, page int, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetOutgoingWebhooksForTeamPage

func (a *OpenTracingAppLayer) GetOutgoingWebhooksForTeamPage(teamId string, page int, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetOutgoingWebhooksForTeamPageByUser

func (a *OpenTracingAppLayer) GetOutgoingWebhooksForTeamPageByUser(teamId string, userId string, page int, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetOutgoingWebhooksPage

func (a *OpenTracingAppLayer) GetOutgoingWebhooksPage(page int, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetOutgoingWebhooksPageByUser

func (a *OpenTracingAppLayer) GetOutgoingWebhooksPageByUser(userId string, page int, perPage int) ([]*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) GetPasswordRecoveryToken

func (a *OpenTracingAppLayer) GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError)

func (*OpenTracingAppLayer) GetPreferenceByCategoryAndNameForUser

func (a *OpenTracingAppLayer) GetPreferenceByCategoryAndNameForUser(userId string, category string, preferenceName string) (*model.Preference, *model.AppError)

func (*OpenTracingAppLayer) GetPreferenceByCategoryForUser

func (a *OpenTracingAppLayer) GetPreferenceByCategoryForUser(userId string, category string) (model.Preferences, *model.AppError)

func (*OpenTracingAppLayer) GetPreferencesForUser

func (a *OpenTracingAppLayer) GetPreferencesForUser(userId string) (model.Preferences, *model.AppError)

func (*OpenTracingAppLayer) GetProfileImage

func (a *OpenTracingAppLayer) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError)

func (*OpenTracingAppLayer) GetReactionsForPost

func (a *OpenTracingAppLayer) GetReactionsForPost(postId string) ([]*model.Reaction, *model.AppError)

func (*OpenTracingAppLayer) GetRecentlyActiveUsersForTeam

func (a *OpenTracingAppLayer) GetRecentlyActiveUsersForTeam(teamId string) (map[string]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetRecentlyActiveUsersForTeamPage

func (a *OpenTracingAppLayer) GetRecentlyActiveUsersForTeamPage(teamId string, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetRole

func (a *OpenTracingAppLayer) GetRole(id string) (*model.Role, *model.AppError)

func (*OpenTracingAppLayer) GetRoleByName

func (a *OpenTracingAppLayer) GetRoleByName(name string) (*model.Role, *model.AppError)

func (*OpenTracingAppLayer) GetRolesByNames

func (a *OpenTracingAppLayer) GetRolesByNames(names []string) ([]*model.Role, *model.AppError)

func (*OpenTracingAppLayer) GetSamlCertificateStatus

func (a *OpenTracingAppLayer) GetSamlCertificateStatus() *model.SamlCertificateStatus

func (*OpenTracingAppLayer) GetSamlMetadata

func (a *OpenTracingAppLayer) GetSamlMetadata() (string, *model.AppError)

func (*OpenTracingAppLayer) GetSamlMetadataFromIdp

func (a *OpenTracingAppLayer) GetSamlMetadataFromIdp(idpMetadataUrl string) (*model.SamlMetadataResponse, *model.AppError)

func (*OpenTracingAppLayer) GetSanitizeOptions

func (a *OpenTracingAppLayer) GetSanitizeOptions(asAdmin bool) map[string]bool

func (*OpenTracingAppLayer) GetSanitizedClientLicense

func (a *OpenTracingAppLayer) GetSanitizedClientLicense() map[string]string

func (*OpenTracingAppLayer) GetSanitizedConfig

func (a *OpenTracingAppLayer) GetSanitizedConfig() *model.Config

func (*OpenTracingAppLayer) GetScheme

func (a *OpenTracingAppLayer) GetScheme(id string) (*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) GetSchemeByName

func (a *OpenTracingAppLayer) GetSchemeByName(name string) (*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) GetSchemes

func (a *OpenTracingAppLayer) GetSchemes(scope string, offset int, limit int) ([]*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) GetSchemesPage

func (a *OpenTracingAppLayer) GetSchemesPage(scope string, page int, perPage int) ([]*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) GetSession

func (a *OpenTracingAppLayer) GetSession(token string) (*model.Session, *model.AppError)

func (*OpenTracingAppLayer) GetSessionById

func (a *OpenTracingAppLayer) GetSessionById(sessionId string) (*model.Session, *model.AppError)

func (*OpenTracingAppLayer) GetSessions

func (a *OpenTracingAppLayer) GetSessions(userId string) ([]*model.Session, *model.AppError)

func (*OpenTracingAppLayer) GetSiteURL

func (a *OpenTracingAppLayer) GetSiteURL() string

func (*OpenTracingAppLayer) GetStatus

func (a *OpenTracingAppLayer) GetStatus(userId string) (*model.Status, *model.AppError)

func (*OpenTracingAppLayer) GetStatusFromCache

func (a *OpenTracingAppLayer) GetStatusFromCache(userId string) *model.Status

func (*OpenTracingAppLayer) GetStatusesByIds

func (a *OpenTracingAppLayer) GetStatusesByIds(userIds []string) (map[string]interface{}, *model.AppError)

func (*OpenTracingAppLayer) GetT

func (*OpenTracingAppLayer) GetTeamGroupUsers

func (a *OpenTracingAppLayer) GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetTeamsForScheme

func (a *OpenTracingAppLayer) GetTeamsForScheme(scheme *model.Scheme, offset int, limit int) ([]*model.Team, *model.AppError)

func (*OpenTracingAppLayer) GetTeamsForSchemePage

func (a *OpenTracingAppLayer) GetTeamsForSchemePage(scheme *model.Scheme, page int, perPage int) ([]*model.Team, *model.AppError)

func (*OpenTracingAppLayer) GetTermsOfService

func (a *OpenTracingAppLayer) GetTermsOfService(id string) (*model.TermsOfService, *model.AppError)

func (*OpenTracingAppLayer) GetTotalUsersStats

func (a *OpenTracingAppLayer) GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions) (*model.UsersStats, *model.AppError)

func (*OpenTracingAppLayer) GetUser

func (a *OpenTracingAppLayer) GetUser(userId string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUserAccessToken

func (a *OpenTracingAppLayer) GetUserAccessToken(tokenId string, sanitize bool) (*model.UserAccessToken, *model.AppError)

func (*OpenTracingAppLayer) GetUserAccessTokens

func (a *OpenTracingAppLayer) GetUserAccessTokens(page int, perPage int) ([]*model.UserAccessToken, *model.AppError)

func (*OpenTracingAppLayer) GetUserAccessTokensForUser

func (a *OpenTracingAppLayer) GetUserAccessTokensForUser(userId string, page int, perPage int) ([]*model.UserAccessToken, *model.AppError)

func (*OpenTracingAppLayer) GetUserByAuth

func (a *OpenTracingAppLayer) GetUserByAuth(authData *string, authService string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUserByEmail

func (a *OpenTracingAppLayer) GetUserByEmail(email string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUserByUsername

func (a *OpenTracingAppLayer) GetUserByUsername(username string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUserForLogin

func (a *OpenTracingAppLayer) GetUserForLogin(id string, loginId string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUserStatusesByIds

func (a *OpenTracingAppLayer) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError)

func (*OpenTracingAppLayer) GetUserTermsOfService

func (a *OpenTracingAppLayer) GetUserTermsOfService(userId string) (*model.UserTermsOfService, *model.AppError)

func (*OpenTracingAppLayer) GetUsers

func (a *OpenTracingAppLayer) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersByGroupChannelIds

func (a *OpenTracingAppLayer) GetUsersByGroupChannelIds(channelIds []string, asAdmin bool) (map[string][]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersByIds

func (a *OpenTracingAppLayer) GetUsersByIds(userIds []string, options *store.UserGetByIdsOpts) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersByUsernames

func (a *OpenTracingAppLayer) GetUsersByUsernames(usernames []string, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersEtag

func (a *OpenTracingAppLayer) GetUsersEtag(restrictionsHash string) string

func (*OpenTracingAppLayer) GetUsersInChannel

func (a *OpenTracingAppLayer) GetUsersInChannel(channelId string, offset int, limit int) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersInChannelByStatus

func (a *OpenTracingAppLayer) GetUsersInChannelByStatus(channelId string, offset int, limit int) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersInChannelMap

func (a *OpenTracingAppLayer) GetUsersInChannelMap(channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersInChannelPage

func (a *OpenTracingAppLayer) GetUsersInChannelPage(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersInChannelPageByStatus

func (a *OpenTracingAppLayer) GetUsersInChannelPageByStatus(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersInTeam

func (a *OpenTracingAppLayer) GetUsersInTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersInTeamEtag

func (a *OpenTracingAppLayer) GetUsersInTeamEtag(teamId string, restrictionsHash string) string

func (*OpenTracingAppLayer) GetUsersInTeamPage

func (a *OpenTracingAppLayer) GetUsersInTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersNotInChannel

func (a *OpenTracingAppLayer) GetUsersNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersNotInChannelMap

func (a *OpenTracingAppLayer) GetUsersNotInChannelMap(teamId string, channelId string, groupConstrained bool, offset int, limit int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) (map[string]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersNotInChannelPage

func (a *OpenTracingAppLayer) GetUsersNotInChannelPage(teamId string, channelId string, groupConstrained bool, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersNotInTeam

func (a *OpenTracingAppLayer) GetUsersNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersNotInTeamEtag

func (a *OpenTracingAppLayer) GetUsersNotInTeamEtag(teamId string, restrictionsHash string) string

func (*OpenTracingAppLayer) GetUsersNotInTeamPage

func (a *OpenTracingAppLayer) GetUsersNotInTeamPage(teamId string, groupConstrained bool, page int, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersPage

func (a *OpenTracingAppLayer) GetUsersPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersWithoutTeam

func (a *OpenTracingAppLayer) GetUsersWithoutTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetUsersWithoutTeamPage

func (a *OpenTracingAppLayer) GetUsersWithoutTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) GetVerifyEmailToken

func (a *OpenTracingAppLayer) GetVerifyEmailToken(token string) (*model.Token, *model.AppError)

func (*OpenTracingAppLayer) GetViewUsersRestrictions

func (a *OpenTracingAppLayer) GetViewUsersRestrictions(userId string) (*model.ViewUsersRestrictions, *model.AppError)

func (*OpenTracingAppLayer) HTMLTemplates

func (a *OpenTracingAppLayer) HTMLTemplates() *template.Template

func (*OpenTracingAppLayer) HTTPService

func (a *OpenTracingAppLayer) HTTPService() httpservice.HTTPService

func (*OpenTracingAppLayer) Handle404

func (a *OpenTracingAppLayer) Handle404(w http.ResponseWriter, r *http.Request)

func (*OpenTracingAppLayer) HandleCommandResponse

func (a *OpenTracingAppLayer) HandleCommandResponse(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.CommandResponse, *model.AppError)

func (*OpenTracingAppLayer) HandleCommandResponsePost

func (a *OpenTracingAppLayer) HandleCommandResponsePost(command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.Post, *model.AppError)

func (*OpenTracingAppLayer) HandleCommandWebhook

func (a *OpenTracingAppLayer) HandleCommandWebhook(hookId string, response *model.CommandResponse) *model.AppError

func (*OpenTracingAppLayer) HandleImages

func (a *OpenTracingAppLayer) HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte)

func (*OpenTracingAppLayer) HandleIncomingWebhook

func (a *OpenTracingAppLayer) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookRequest) *model.AppError

func (*OpenTracingAppLayer) HandleMessageExportConfig

func (a *OpenTracingAppLayer) HandleMessageExportConfig(cfg *model.Config, appCfg *model.Config)

func (*OpenTracingAppLayer) HasPermissionTo

func (a *OpenTracingAppLayer) HasPermissionTo(askingUserId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) HasPermissionToChannel

func (a *OpenTracingAppLayer) HasPermissionToChannel(askingUserId string, channelId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) HasPermissionToChannelByPost

func (a *OpenTracingAppLayer) HasPermissionToChannelByPost(askingUserId string, postId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) HasPermissionToTeam

func (a *OpenTracingAppLayer) HasPermissionToTeam(askingUserId string, teamId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) HasPermissionToUser

func (a *OpenTracingAppLayer) HasPermissionToUser(askingUserId string, userId string) bool

func (*OpenTracingAppLayer) HubRegister

func (a *OpenTracingAppLayer) HubRegister(webConn *WebConn)

func (*OpenTracingAppLayer) HubStart

func (a *OpenTracingAppLayer) HubStart()

func (*OpenTracingAppLayer) HubStop

func (a *OpenTracingAppLayer) HubStop()

func (*OpenTracingAppLayer) HubUnregister

func (a *OpenTracingAppLayer) HubUnregister(webConn *WebConn)

func (*OpenTracingAppLayer) ImageProxy

func (a *OpenTracingAppLayer) ImageProxy() *imageproxy.ImageProxy

func (*OpenTracingAppLayer) ImportPermissions

func (a *OpenTracingAppLayer) ImportPermissions(jsonl io.Reader) error

func (*OpenTracingAppLayer) InvalidateAllCaches

func (a *OpenTracingAppLayer) InvalidateAllCaches() *model.AppError

func (*OpenTracingAppLayer) InvalidateAllCachesSkipSend

func (a *OpenTracingAppLayer) InvalidateAllCachesSkipSend()

func (*OpenTracingAppLayer) InvalidateCacheForUser

func (a *OpenTracingAppLayer) InvalidateCacheForUser(userId string)

func (*OpenTracingAppLayer) InvalidateWebConnSessionCacheForUser

func (a *OpenTracingAppLayer) InvalidateWebConnSessionCacheForUser(userId string)

func (*OpenTracingAppLayer) IpAddress

func (a *OpenTracingAppLayer) IpAddress() string

func (*OpenTracingAppLayer) IsFirstUserAccount

func (a *OpenTracingAppLayer) IsFirstUserAccount() bool

func (*OpenTracingAppLayer) IsLeader

func (a *OpenTracingAppLayer) IsLeader() bool

func (*OpenTracingAppLayer) IsPasswordValid

func (a *OpenTracingAppLayer) IsPasswordValid(password string) *model.AppError

func (*OpenTracingAppLayer) IsPhase2MigrationCompleted

func (a *OpenTracingAppLayer) IsPhase2MigrationCompleted() *model.AppError

func (*OpenTracingAppLayer) IsUserAway

func (a *OpenTracingAppLayer) IsUserAway(lastActivityAt int64) bool

func (*OpenTracingAppLayer) IsUserSignUpAllowed

func (a *OpenTracingAppLayer) IsUserSignUpAllowed() *model.AppError

func (*OpenTracingAppLayer) IsUsernameTaken

func (a *OpenTracingAppLayer) IsUsernameTaken(name string) bool

func (*OpenTracingAppLayer) Ldap

func (*OpenTracingAppLayer) License

func (a *OpenTracingAppLayer) License() *model.License

func (*OpenTracingAppLayer) LimitedClientConfig

func (a *OpenTracingAppLayer) LimitedClientConfig() map[string]string

func (*OpenTracingAppLayer) LimitedClientConfigWithComputed

func (a *OpenTracingAppLayer) LimitedClientConfigWithComputed() map[string]string

func (*OpenTracingAppLayer) ListAllCommands

func (a *OpenTracingAppLayer) ListAllCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)

func (*OpenTracingAppLayer) ListAutocompleteCommands

func (a *OpenTracingAppLayer) ListAutocompleteCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)

func (*OpenTracingAppLayer) ListDirectory

func (a *OpenTracingAppLayer) ListDirectory(path string) ([]string, *model.AppError)

func (*OpenTracingAppLayer) ListTeamCommands

func (a *OpenTracingAppLayer) ListTeamCommands(teamId string) ([]*model.Command, *model.AppError)

func (*OpenTracingAppLayer) LoadLicense

func (a *OpenTracingAppLayer) LoadLicense()

func (*OpenTracingAppLayer) Log

func (a *OpenTracingAppLayer) Log() *mlog.Logger

func (*OpenTracingAppLayer) LoginByOAuth

func (a *OpenTracingAppLayer) LoginByOAuth(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) MakePermissionError

func (a *OpenTracingAppLayer) MakePermissionError(permission *model.Permission) *model.AppError

func (*OpenTracingAppLayer) MessageExport

func (*OpenTracingAppLayer) Metrics

func (*OpenTracingAppLayer) MigrateFilenamesToFileInfos

func (a *OpenTracingAppLayer) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo

func (*OpenTracingAppLayer) MoveCommand

func (a *OpenTracingAppLayer) MoveCommand(team *model.Team, command *model.Command) *model.AppError

func (*OpenTracingAppLayer) MoveFile

func (a *OpenTracingAppLayer) MoveFile(oldPath string, newPath string) *model.AppError

func (*OpenTracingAppLayer) NewClusterDiscoveryService

func (a *OpenTracingAppLayer) NewClusterDiscoveryService() *ClusterDiscoveryService

func (*OpenTracingAppLayer) NewWebConn

func (a *OpenTracingAppLayer) NewWebConn(ws *websocket.Conn, session model.Session, t goi18n.TranslateFunc, locale string) *WebConn

func (*OpenTracingAppLayer) NewWebHub

func (a *OpenTracingAppLayer) NewWebHub() *Hub

func (*OpenTracingAppLayer) Notification

func (*OpenTracingAppLayer) NotificationsLog

func (a *OpenTracingAppLayer) NotificationsLog() *mlog.Logger

func (*OpenTracingAppLayer) OpenInteractiveDialog

func (a *OpenTracingAppLayer) OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError

func (*OpenTracingAppLayer) OriginChecker

func (a *OpenTracingAppLayer) OriginChecker() func(*http.Request) bool

func (*OpenTracingAppLayer) PatchRole

func (a *OpenTracingAppLayer) PatchRole(role *model.Role, patch *model.RolePatch) (*model.Role, *model.AppError)

func (*OpenTracingAppLayer) PatchScheme

func (a *OpenTracingAppLayer) PatchScheme(scheme *model.Scheme, patch *model.SchemePatch) (*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) PatchUser

func (a *OpenTracingAppLayer) PatchUser(userId string, patch *model.UserPatch, asAdmin bool) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) Path

func (a *OpenTracingAppLayer) Path() string

func (*OpenTracingAppLayer) PermanentDeleteAllUsers

func (a *OpenTracingAppLayer) PermanentDeleteAllUsers() *model.AppError

func (*OpenTracingAppLayer) PermanentDeleteUser

func (a *OpenTracingAppLayer) PermanentDeleteUser(user *model.User) *model.AppError

func (*OpenTracingAppLayer) PostActionCookieSecret

func (a *OpenTracingAppLayer) PostActionCookieSecret() []byte

func (*OpenTracingAppLayer) ProcessSlackAttachments

func (a *OpenTracingAppLayer) ProcessSlackAttachments(attachments []*model.SlackAttachment) []*model.SlackAttachment

func (*OpenTracingAppLayer) ProcessSlackText

func (a *OpenTracingAppLayer) ProcessSlackText(text string) string

func (*OpenTracingAppLayer) PromoteGuestToUser

func (a *OpenTracingAppLayer) PromoteGuestToUser(user *model.User, requestorId string) *model.AppError

func (*OpenTracingAppLayer) Publish

func (a *OpenTracingAppLayer) Publish(message *model.WebSocketEvent)

func (*OpenTracingAppLayer) PublishSkipClusterSend

func (a *OpenTracingAppLayer) PublishSkipClusterSend(message *model.WebSocketEvent)

func (*OpenTracingAppLayer) PurgeElasticsearchIndexes

func (a *OpenTracingAppLayer) PurgeElasticsearchIndexes() *model.AppError

func (*OpenTracingAppLayer) ReadFile

func (a *OpenTracingAppLayer) ReadFile(path string) ([]byte, *model.AppError)

func (*OpenTracingAppLayer) RecycleDatabaseConnection

func (a *OpenTracingAppLayer) RecycleDatabaseConnection()

func (*OpenTracingAppLayer) RegenCommandToken

func (a *OpenTracingAppLayer) RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError)

func (*OpenTracingAppLayer) RegenOutgoingWebhookToken

func (a *OpenTracingAppLayer) RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) RegenerateOAuthAppSecret

func (a *OpenTracingAppLayer) RegenerateOAuthAppSecret(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) ReloadConfig

func (a *OpenTracingAppLayer) ReloadConfig() error

func (*OpenTracingAppLayer) RemoveConfigListener

func (a *OpenTracingAppLayer) RemoveConfigListener(id string)

func (*OpenTracingAppLayer) RemoveFile

func (a *OpenTracingAppLayer) RemoveFile(path string) *model.AppError

func (*OpenTracingAppLayer) RemoveLicense

func (a *OpenTracingAppLayer) RemoveLicense() *model.AppError

func (*OpenTracingAppLayer) RemoveLicenseListener

func (a *OpenTracingAppLayer) RemoveLicenseListener(id string)

func (*OpenTracingAppLayer) RemoveSamlIdpCertificate

func (a *OpenTracingAppLayer) RemoveSamlIdpCertificate() *model.AppError

func (*OpenTracingAppLayer) RemoveSamlPrivateCertificate

func (a *OpenTracingAppLayer) RemoveSamlPrivateCertificate() *model.AppError

func (*OpenTracingAppLayer) RemoveSamlPublicCertificate

func (a *OpenTracingAppLayer) RemoveSamlPublicCertificate() *model.AppError

func (*OpenTracingAppLayer) RequestId

func (a *OpenTracingAppLayer) RequestId() string

func (*OpenTracingAppLayer) ResetPasswordFromToken

func (a *OpenTracingAppLayer) ResetPasswordFromToken(userSuppliedTokenString string, newPassword string) *model.AppError

func (*OpenTracingAppLayer) ResetPermissionsSystem

func (a *OpenTracingAppLayer) ResetPermissionsSystem() *model.AppError

func (*OpenTracingAppLayer) RestrictUsersGetByPermissions

func (a *OpenTracingAppLayer) RestrictUsersGetByPermissions(userId string, options *model.UserGetOptions) (*model.UserGetOptions, *model.AppError)

func (*OpenTracingAppLayer) RestrictUsersSearchByPermissions

func (a *OpenTracingAppLayer) RestrictUsersSearchByPermissions(userId string, options *model.UserSearchOptions) (*model.UserSearchOptions, *model.AppError)

func (*OpenTracingAppLayer) RevokeAccessToken

func (a *OpenTracingAppLayer) RevokeAccessToken(token string) *model.AppError

func (*OpenTracingAppLayer) RevokeAllSessions

func (a *OpenTracingAppLayer) RevokeAllSessions(userId string) *model.AppError

func (*OpenTracingAppLayer) RevokeSession

func (a *OpenTracingAppLayer) RevokeSession(session *model.Session) *model.AppError

func (*OpenTracingAppLayer) RevokeSessionById

func (a *OpenTracingAppLayer) RevokeSessionById(sessionId string) *model.AppError

func (*OpenTracingAppLayer) RevokeSessionsForDeviceId

func (a *OpenTracingAppLayer) RevokeSessionsForDeviceId(userId string, deviceId string, currentSessionId string) *model.AppError

func (*OpenTracingAppLayer) RevokeSessionsFromAllUsers

func (a *OpenTracingAppLayer) RevokeSessionsFromAllUsers() *model.AppError

func (*OpenTracingAppLayer) RevokeUserAccessToken

func (a *OpenTracingAppLayer) RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError

func (*OpenTracingAppLayer) RolesGrantPermission

func (a *OpenTracingAppLayer) RolesGrantPermission(roleNames []string, permissionId string) bool

func (*OpenTracingAppLayer) Saml

func (*OpenTracingAppLayer) SanitizeProfile

func (a *OpenTracingAppLayer) SanitizeProfile(user *model.User, asAdmin bool)

func (*OpenTracingAppLayer) SaveAndBroadcastStatus

func (a *OpenTracingAppLayer) SaveAndBroadcastStatus(status *model.Status)

func (*OpenTracingAppLayer) SaveBrandImage

func (a *OpenTracingAppLayer) SaveBrandImage(imageData *multipart.FileHeader) *model.AppError

func (*OpenTracingAppLayer) SaveComplianceReport

func (a *OpenTracingAppLayer) SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)

func (*OpenTracingAppLayer) SaveConfig

func (a *OpenTracingAppLayer) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) *model.AppError

func (*OpenTracingAppLayer) SaveLicense

func (a *OpenTracingAppLayer) SaveLicense(licenseBytes []byte) (*model.License, *model.AppError)

func (*OpenTracingAppLayer) SaveReactionForPost

func (a *OpenTracingAppLayer) SaveReactionForPost(reaction *model.Reaction) (*model.Reaction, *model.AppError)

func (*OpenTracingAppLayer) SaveUserTermsOfService

func (a *OpenTracingAppLayer) SaveUserTermsOfService(userId string, termsOfServiceId string, accepted bool) *model.AppError

func (*OpenTracingAppLayer) SchemesIterator

func (a *OpenTracingAppLayer) SchemesIterator(scope string, batchSize int) func() []*model.Scheme

func (*OpenTracingAppLayer) SearchEmoji

func (a *OpenTracingAppLayer) SearchEmoji(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError)

func (*OpenTracingAppLayer) SearchEngine

func (a *OpenTracingAppLayer) SearchEngine() *searchengine.Broker

func (*OpenTracingAppLayer) SearchUserAccessTokens

func (a *OpenTracingAppLayer) SearchUserAccessTokens(term string) ([]*model.UserAccessToken, *model.AppError)

func (*OpenTracingAppLayer) SearchUsers

func (a *OpenTracingAppLayer) SearchUsers(props *model.UserSearch, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) SearchUsersInChannel

func (a *OpenTracingAppLayer) SearchUsersInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) SearchUsersInTeam

func (a *OpenTracingAppLayer) SearchUsersInTeam(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) SearchUsersNotInChannel

func (a *OpenTracingAppLayer) SearchUsersNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) SearchUsersNotInTeam

func (a *OpenTracingAppLayer) SearchUsersNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) SearchUsersWithoutTeam

func (a *OpenTracingAppLayer) SearchUsersWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)

func (*OpenTracingAppLayer) SendAckToPushProxy

func (a *OpenTracingAppLayer) SendAckToPushProxy(ack *model.PushNotificationAck) error

func (*OpenTracingAppLayer) SendAutoResponse

func (a *OpenTracingAppLayer) SendAutoResponse(channel *model.Channel, receiver *model.User) (bool, *model.AppError)

func (*OpenTracingAppLayer) SendAutoResponseIfNecessary

func (a *OpenTracingAppLayer) SendAutoResponseIfNecessary(channel *model.Channel, sender *model.User) (bool, *model.AppError)

func (*OpenTracingAppLayer) SendDailyDiagnostics

func (a *OpenTracingAppLayer) SendDailyDiagnostics()

func (*OpenTracingAppLayer) SendDeactivateAccountEmail

func (a *OpenTracingAppLayer) SendDeactivateAccountEmail(email string, locale string, siteURL string) *model.AppError

func (*OpenTracingAppLayer) SendDiagnostic

func (a *OpenTracingAppLayer) SendDiagnostic(event string, properties map[string]interface{})

func (*OpenTracingAppLayer) SendEmailVerification

func (a *OpenTracingAppLayer) SendEmailVerification(user *model.User, newEmail string) *model.AppError

func (*OpenTracingAppLayer) SendInviteEmails

func (a *OpenTracingAppLayer) SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, siteURL string)

func (*OpenTracingAppLayer) SendNotifications

func (a *OpenTracingAppLayer) SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList) ([]string, error)

func (*OpenTracingAppLayer) SendPasswordReset

func (a *OpenTracingAppLayer) SendPasswordReset(email string, siteURL string) (bool, *model.AppError)

func (*OpenTracingAppLayer) SendPasswordResetEmail

func (a *OpenTracingAppLayer) SendPasswordResetEmail(email string, token *model.Token, locale string, siteURL string) (bool, *model.AppError)

func (*OpenTracingAppLayer) SendSignInChangeEmail

func (a *OpenTracingAppLayer) SendSignInChangeEmail(email string, method string, locale string, siteURL string) *model.AppError

func (*OpenTracingAppLayer) ServerBusyStateChanged

func (a *OpenTracingAppLayer) ServerBusyStateChanged(sbs *model.ServerBusyState)

func (*OpenTracingAppLayer) Session

func (a *OpenTracingAppLayer) Session() *model.Session

func (*OpenTracingAppLayer) SessionCacheLength

func (a *OpenTracingAppLayer) SessionCacheLength() int

func (*OpenTracingAppLayer) SessionHasPermissionTo

func (a *OpenTracingAppLayer) SessionHasPermissionTo(session model.Session, permission *model.Permission) bool

func (*OpenTracingAppLayer) SessionHasPermissionToChannel

func (a *OpenTracingAppLayer) SessionHasPermissionToChannel(session model.Session, channelId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) SessionHasPermissionToChannelByPost

func (a *OpenTracingAppLayer) SessionHasPermissionToChannelByPost(session model.Session, postId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) SessionHasPermissionToManageBot

func (a *OpenTracingAppLayer) SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError

func (*OpenTracingAppLayer) SessionHasPermissionToTeam

func (a *OpenTracingAppLayer) SessionHasPermissionToTeam(session model.Session, teamId string, permission *model.Permission) bool

func (*OpenTracingAppLayer) SessionHasPermissionToUser

func (a *OpenTracingAppLayer) SessionHasPermissionToUser(session model.Session, userId string) bool

func (*OpenTracingAppLayer) SessionHasPermissionToUserOrBot

func (a *OpenTracingAppLayer) SessionHasPermissionToUserOrBot(session model.Session, userId string) bool

func (*OpenTracingAppLayer) SetAcceptLanguage

func (a *OpenTracingAppLayer) SetAcceptLanguage(str string)

func (*OpenTracingAppLayer) SetAutoResponderStatus

func (a *OpenTracingAppLayer) SetAutoResponderStatus(user *model.User, oldNotifyProps model.StringMap)

func (*OpenTracingAppLayer) SetClientLicense

func (a *OpenTracingAppLayer) SetClientLicense(m map[string]string)

func (*OpenTracingAppLayer) SetContext

func (a *OpenTracingAppLayer) SetContext(c context.Context)

func (*OpenTracingAppLayer) SetDefaultProfileImage

func (a *OpenTracingAppLayer) SetDefaultProfileImage(user *model.User) *model.AppError

func (*OpenTracingAppLayer) SetDiagnosticId

func (a *OpenTracingAppLayer) SetDiagnosticId(id string)

func (*OpenTracingAppLayer) SetIpAddress

func (a *OpenTracingAppLayer) SetIpAddress(str string)

func (*OpenTracingAppLayer) SetLicense

func (a *OpenTracingAppLayer) SetLicense(license *model.License) bool

func (*OpenTracingAppLayer) SetLog

func (a *OpenTracingAppLayer) SetLog(l *mlog.Logger)

func (*OpenTracingAppLayer) SetPath

func (a *OpenTracingAppLayer) SetPath(str string)

func (*OpenTracingAppLayer) SetPhase2PermissionsMigrationStatus

func (a *OpenTracingAppLayer) SetPhase2PermissionsMigrationStatus(isComplete bool) error

func (*OpenTracingAppLayer) SetProfileImage

func (a *OpenTracingAppLayer) SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppError

func (*OpenTracingAppLayer) SetProfileImageFromFile

func (a *OpenTracingAppLayer) SetProfileImageFromFile(userId string, file io.Reader) *model.AppError

func (*OpenTracingAppLayer) SetProfileImageFromMultiPartFile

func (a *OpenTracingAppLayer) SetProfileImageFromMultiPartFile(userId string, file multipart.File) *model.AppError

func (*OpenTracingAppLayer) SetRequestId

func (a *OpenTracingAppLayer) SetRequestId(str string)

func (*OpenTracingAppLayer) SetSamlIdpCertificateFromMetadata

func (a *OpenTracingAppLayer) SetSamlIdpCertificateFromMetadata(data []byte) *model.AppError

func (*OpenTracingAppLayer) SetSearchEngine

func (a *OpenTracingAppLayer) SetSearchEngine(se *searchengine.Broker)

func (*OpenTracingAppLayer) SetServer

func (a *OpenTracingAppLayer) SetServer(srv *Server)

func (*OpenTracingAppLayer) SetSession

func (a *OpenTracingAppLayer) SetSession(sess *model.Session)

func (*OpenTracingAppLayer) SetStatusAwayIfNeeded

func (a *OpenTracingAppLayer) SetStatusAwayIfNeeded(userId string, manual bool)

func (*OpenTracingAppLayer) SetStatusDoNotDisturb

func (a *OpenTracingAppLayer) SetStatusDoNotDisturb(userId string)

func (*OpenTracingAppLayer) SetStatusLastActivityAt

func (a *OpenTracingAppLayer) SetStatusLastActivityAt(userId string, activityAt int64)

func (*OpenTracingAppLayer) SetStatusOffline

func (a *OpenTracingAppLayer) SetStatusOffline(userId string, manual bool)

func (*OpenTracingAppLayer) SetStatusOnline

func (a *OpenTracingAppLayer) SetStatusOnline(userId string, manual bool)

func (*OpenTracingAppLayer) SetStatusOutOfOffice

func (a *OpenTracingAppLayer) SetStatusOutOfOffice(userId string)

func (*OpenTracingAppLayer) SetT

func (*OpenTracingAppLayer) SetUserAgent

func (a *OpenTracingAppLayer) SetUserAgent(str string)

func (*OpenTracingAppLayer) SetupInviteEmailRateLimiting

func (a *OpenTracingAppLayer) SetupInviteEmailRateLimiting() error

func (*OpenTracingAppLayer) Shutdown

func (a *OpenTracingAppLayer) Shutdown()

func (*OpenTracingAppLayer) SlackAddBotUser

func (a *OpenTracingAppLayer) SlackAddBotUser(teamId string, log *bytes.Buffer) *model.User

func (*OpenTracingAppLayer) SlackAddChannels

func (a *OpenTracingAppLayer) SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User, importerLog *bytes.Buffer) map[string]*model.Channel

func (*OpenTracingAppLayer) SlackAddPosts

func (a *OpenTracingAppLayer) SlackAddPosts(teamId string, channel *model.Channel, posts []SlackPost, users map[string]*model.User, uploads map[string]*zip.File, botUser *model.User)

func (*OpenTracingAppLayer) SlackAddUsers

func (a *OpenTracingAppLayer) SlackAddUsers(teamId string, slackusers []SlackUser, importerLog *bytes.Buffer) map[string]*model.User

func (*OpenTracingAppLayer) SlackImport

func (a *OpenTracingAppLayer) SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)

func (*OpenTracingAppLayer) SlackUploadFile

func (a *OpenTracingAppLayer) SlackUploadFile(slackPostFile *SlackFile, uploads map[string]*zip.File, teamId string, channelId string, userId string, slackTimestamp string) (*model.FileInfo, bool)

func (*OpenTracingAppLayer) Srv

func (a *OpenTracingAppLayer) Srv() *Server

func (*OpenTracingAppLayer) StartPushNotificationsHubWorkers

func (a *OpenTracingAppLayer) StartPushNotificationsHubWorkers()

func (*OpenTracingAppLayer) StopPushNotificationsHubWorkers

func (a *OpenTracingAppLayer) StopPushNotificationsHubWorkers()

func (*OpenTracingAppLayer) SubmitInteractiveDialog

func (a *OpenTracingAppLayer) SubmitInteractiveDialog(request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError)

func (*OpenTracingAppLayer) SwitchEmailToLdap

func (a *OpenTracingAppLayer) SwitchEmailToLdap(email string, password string, code string, ldapLoginId string, ldapPassword string) (string, *model.AppError)

func (*OpenTracingAppLayer) SwitchEmailToOAuth

func (a *OpenTracingAppLayer) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email string, password string, code string, service string) (string, *model.AppError)

func (*OpenTracingAppLayer) SwitchLdapToEmail

func (a *OpenTracingAppLayer) SwitchLdapToEmail(ldapPassword string, code string, email string, newPassword string) (string, *model.AppError)

func (*OpenTracingAppLayer) SwitchOAuthToEmail

func (a *OpenTracingAppLayer) SwitchOAuthToEmail(email string, password string, requesterId string) (string, *model.AppError)

func (*OpenTracingAppLayer) SyncLdap

func (a *OpenTracingAppLayer) SyncLdap()

func (*OpenTracingAppLayer) SyncRolesAndMembership

func (a *OpenTracingAppLayer) SyncRolesAndMembership(syncableID string, syncableType model.GroupSyncableType)

func (*OpenTracingAppLayer) SyncSyncableRoles

func (a *OpenTracingAppLayer) SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError

func (*OpenTracingAppLayer) T

func (a *OpenTracingAppLayer) T(translationID string, args ...interface{}) string

func (*OpenTracingAppLayer) TestElasticsearch

func (a *OpenTracingAppLayer) TestElasticsearch(cfg *model.Config) *model.AppError

func (*OpenTracingAppLayer) TestEmail

func (a *OpenTracingAppLayer) TestEmail(userId string, cfg *model.Config) *model.AppError

func (*OpenTracingAppLayer) TestLdap

func (a *OpenTracingAppLayer) TestLdap() *model.AppError

func (*OpenTracingAppLayer) TestSiteURL

func (a *OpenTracingAppLayer) TestSiteURL(siteURL string) *model.AppError

func (*OpenTracingAppLayer) Timezones

func (a *OpenTracingAppLayer) Timezones() *timezones.Timezones

func (*OpenTracingAppLayer) TotalWebsocketConnections

func (a *OpenTracingAppLayer) TotalWebsocketConnections() int

func (*OpenTracingAppLayer) TriggerWebhook

func (a *OpenTracingAppLayer) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, post *model.Post, channel *model.Channel)

func (*OpenTracingAppLayer) UpdateActive

func (a *OpenTracingAppLayer) UpdateActive(user *model.User, active bool) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) UpdateCommand

func (a *OpenTracingAppLayer) UpdateCommand(oldCmd *model.Command, updatedCmd *model.Command) (*model.Command, *model.AppError)

func (*OpenTracingAppLayer) UpdateConfig

func (a *OpenTracingAppLayer) UpdateConfig(f func(*model.Config))

func (*OpenTracingAppLayer) UpdateIncomingWebhook

func (a *OpenTracingAppLayer) UpdateIncomingWebhook(oldHook *model.IncomingWebhook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)

func (*OpenTracingAppLayer) UpdateLastActivityAtIfNeeded

func (a *OpenTracingAppLayer) UpdateLastActivityAtIfNeeded(session model.Session)

func (*OpenTracingAppLayer) UpdateMfa

func (a *OpenTracingAppLayer) UpdateMfa(activate bool, userId string, token string) *model.AppError

func (*OpenTracingAppLayer) UpdateMobileAppBadge

func (a *OpenTracingAppLayer) UpdateMobileAppBadge(userId string)

func (*OpenTracingAppLayer) UpdateOAuthUserAttrs

func (a *OpenTracingAppLayer) UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, service string) *model.AppError

func (*OpenTracingAppLayer) UpdateOauthApp

func (a *OpenTracingAppLayer) UpdateOauthApp(oldApp *model.OAuthApp, updatedApp *model.OAuthApp) (*model.OAuthApp, *model.AppError)

func (*OpenTracingAppLayer) UpdateOutgoingWebhook

func (a *OpenTracingAppLayer) UpdateOutgoingWebhook(oldHook *model.OutgoingWebhook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)

func (*OpenTracingAppLayer) UpdatePassword

func (a *OpenTracingAppLayer) UpdatePassword(user *model.User, newPassword string) *model.AppError

func (*OpenTracingAppLayer) UpdatePasswordAsUser

func (a *OpenTracingAppLayer) UpdatePasswordAsUser(userId string, currentPassword string, newPassword string) *model.AppError

func (*OpenTracingAppLayer) UpdatePasswordByUserIdSendEmail

func (a *OpenTracingAppLayer) UpdatePasswordByUserIdSendEmail(userId string, newPassword string, method string) *model.AppError

func (*OpenTracingAppLayer) UpdatePasswordSendEmail

func (a *OpenTracingAppLayer) UpdatePasswordSendEmail(user *model.User, newPassword string, method string) *model.AppError

func (*OpenTracingAppLayer) UpdatePreferences

func (a *OpenTracingAppLayer) UpdatePreferences(userId string, preferences model.Preferences) *model.AppError

func (*OpenTracingAppLayer) UpdateRole

func (a *OpenTracingAppLayer) UpdateRole(role *model.Role) (*model.Role, *model.AppError)

func (*OpenTracingAppLayer) UpdateScheme

func (a *OpenTracingAppLayer) UpdateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)

func (*OpenTracingAppLayer) UpdateSessionsIsGuest

func (a *OpenTracingAppLayer) UpdateSessionsIsGuest(userId string, isGuest bool)

func (*OpenTracingAppLayer) UpdateUser

func (a *OpenTracingAppLayer) UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) UpdateUserActive

func (a *OpenTracingAppLayer) UpdateUserActive(userId string, active bool) *model.AppError

func (*OpenTracingAppLayer) UpdateUserAsUser

func (a *OpenTracingAppLayer) UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) UpdateUserAuth

func (a *OpenTracingAppLayer) UpdateUserAuth(userId string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError)

func (*OpenTracingAppLayer) UpdateUserNotifyProps

func (a *OpenTracingAppLayer) UpdateUserNotifyProps(userId string, props map[string]string) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) UpdateUserRoles

func (a *OpenTracingAppLayer) UpdateUserRoles(userId string, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError)

func (*OpenTracingAppLayer) UpdateWebConnUserActivity

func (a *OpenTracingAppLayer) UpdateWebConnUserActivity(session model.Session, activityAt int64)

func (*OpenTracingAppLayer) UploadEmojiImage

func (a *OpenTracingAppLayer) UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError

func (*OpenTracingAppLayer) UploadFile

func (a *OpenTracingAppLayer) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError)

func (*OpenTracingAppLayer) UploadFileX

func (a *OpenTracingAppLayer) UploadFileX(channelId string, name string, input io.Reader, opts ...func(*UploadFileTask)) (*model.FileInfo, *model.AppError)

func (*OpenTracingAppLayer) UploadFiles

func (a *OpenTracingAppLayer) UploadFiles(teamId string, channelId string, userId string, files []io.ReadCloser, filenames []string, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)

func (*OpenTracingAppLayer) UploadMultipartFiles

func (a *OpenTracingAppLayer) UploadMultipartFiles(teamId string, channelId string, userId string, fileHeaders []*multipart.FileHeader, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)

func (*OpenTracingAppLayer) UserAgent

func (a *OpenTracingAppLayer) UserAgent() string

func (*OpenTracingAppLayer) UserCanSeeOtherUser

func (a *OpenTracingAppLayer) UserCanSeeOtherUser(userId string, otherUserId string) (bool, *model.AppError)

func (*OpenTracingAppLayer) ValidateAndSetLicenseBytes

func (a *OpenTracingAppLayer) ValidateAndSetLicenseBytes(b []byte)

func (*OpenTracingAppLayer) VerifyEmailFromToken

func (a *OpenTracingAppLayer) VerifyEmailFromToken(userSuppliedTokenString string) *model.AppError

func (*OpenTracingAppLayer) VerifyUserEmail

func (a *OpenTracingAppLayer) VerifyUserEmail(userId string, email string) *model.AppError

func (*OpenTracingAppLayer) WriteFile

func (a *OpenTracingAppLayer) WriteFile(fr io.Reader, path string) (int64, *model.AppError)

type Option

type Option func(s *Server) error

func Config

func Config(dsn string, watch bool) Option

Config applies the given config dsn, whether a path to config.json or a database connection string.

func ConfigStore

func ConfigStore(configStore config.Store) Option

ConfigStore applies the given config store, typically to replace the traditional sources with a memory store for testing.

func SetLogger

func SetLogger(logger *mlog.Logger) Option

func StoreOverride

func StoreOverride(override interface{}) Option

By default, the app will use the store specified by the configuration. This allows you to construct an app with a different store.

The override parameter must be either a store.Store or func(App) store.Store().

type PluginResponseWriter

type PluginResponseWriter struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

func (*PluginResponseWriter) GenerateResponse

func (rt *PluginResponseWriter) GenerateResponse() *http.Response

func (*PluginResponseWriter) Header

func (rt *PluginResponseWriter) Header() http.Header

func (*PluginResponseWriter) WriteHeader

func (rt *PluginResponseWriter) WriteHeader(statusCode int)

type PostImportData

type PostImportData struct {
	Team    *string `json:"team"`
	Channel *string `json:"channel"`
	User    *string `json:"user"`

	Message  *string                `json:"message"`
	Props    *model.StringInterface `json:"props"`
	CreateAt *int64                 `json:"create_at"`

	FlaggedBy   *[]string               `json:"flagged_by,omitempty"`
	Reactions   *[]ReactionImportData   `json:"reactions,omitempty"`
	Replies     *[]ReplyImportData      `json:"replies,omitempty"`
	Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
}

type PostNotification

type PostNotification struct {
	Channel    *model.Channel
	Post       *model.Post
	ProfileMap map[string]*model.User
	Sender     *model.User
}

Represents either an email or push notification and contains the fields required to send it to any user.

func (*PostNotification) GetChannelName

func (n *PostNotification) GetChannelName(userNameFormat, excludeId string) string

Returns the name of the channel for this notification. For direct messages, this is the sender's name preceded by an at sign. For group messages, this is a comma-separated list of the members of the channel, with an option to exclude the recipient of the message from that list.

func (*PostNotification) GetSenderName

func (n *PostNotification) GetSenderName(userNameFormat string, overridesAllowed bool) string

Returns the name of the sender of this notification, accounting for things like system messages and whether or not the username has been overridden by an integration.

type PushNotification

type PushNotification struct {
	// contains filtered or unexported fields
}

type PushNotificationsHub

type PushNotificationsHub struct {
	Channels []chan PushNotification
}

func (*PushNotificationsHub) GetGoChannelFromUserId

func (hub *PushNotificationsHub) GetGoChannelFromUserId(userId string) chan PushNotification

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

func NewRateLimiter

func NewRateLimiter(settings *model.RateLimitSettings, trustedProxyIPHeader []string) (*RateLimiter, error)

func (*RateLimiter) GenerateKey

func (rl *RateLimiter) GenerateKey(r *http.Request) string

func (*RateLimiter) RateLimitHandler

func (rl *RateLimiter) RateLimitHandler(wrappedHandler http.Handler) http.Handler

func (*RateLimiter) RateLimitWriter

func (rl *RateLimiter) RateLimitWriter(key string, w http.ResponseWriter) bool

func (*RateLimiter) UserIdRateLimit

func (rl *RateLimiter) UserIdRateLimit(userId string, w http.ResponseWriter) bool

type ReactionImportData

type ReactionImportData struct {
	User      *string `json:"user"`
	CreateAt  *int64  `json:"create_at"`
	EmojiName *string `json:"emoji_name"`
}

func ImportReactionFromPost

func ImportReactionFromPost(user *model.User, reaction *model.Reaction) *ReactionImportData

type RemoveProvider

type RemoveProvider struct {
}

func (*RemoveProvider) DoCommand

func (me *RemoveProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*RemoveProvider) GetCommand

func (me *RemoveProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*RemoveProvider) GetTrigger

func (me *RemoveProvider) GetTrigger() string

type ReplyImportData

type ReplyImportData struct {
	User *string `json:"user"`

	Message  *string `json:"message"`
	CreateAt *int64  `json:"create_at"`

	FlaggedBy   *[]string               `json:"flagged_by,omitempty"`
	Reactions   *[]ReactionImportData   `json:"reactions,omitempty"`
	Attachments *[]AttachmentImportData `json:"attachments,omitempty"`
}

func ImportReplyFromPost

func ImportReplyFromPost(post *model.ReplyForExport) *ReplyImportData

type RoleImportData

type RoleImportData struct {
	Name        *string   `json:"name"`
	DisplayName *string   `json:"display_name"`
	Description *string   `json:"description"`
	Permissions *[]string `json:"permissions"`
}

type SVGInfo

type SVGInfo struct {
	Width  int
	Height int
}

type SchemeImportData

type SchemeImportData struct {
	Name                    *string         `json:"name"`
	DisplayName             *string         `json:"display_name"`
	Description             *string         `json:"description"`
	Scope                   *string         `json:"scope"`
	DefaultTeamAdminRole    *RoleImportData `json:"default_team_admin_role"`
	DefaultTeamUserRole     *RoleImportData `json:"default_team_user_role"`
	DefaultChannelAdminRole *RoleImportData `json:"default_channel_admin_role"`
	DefaultChannelUserRole  *RoleImportData `json:"default_channel_user_role"`
	DefaultTeamGuestRole    *RoleImportData `json:"default_team_guest_role"`
	DefaultChannelGuestRole *RoleImportData `json:"default_channel_guest_role"`
}

type SearchProvider

type SearchProvider struct {
}

func (*SearchProvider) DoCommand

func (search *SearchProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*SearchProvider) GetCommand

func (search *SearchProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command

func (*SearchProvider) GetTrigger

func (search *SearchProvider) GetTrigger() string

type Server

type Server struct {
	Store           store.Store
	WebSocketRouter *WebSocketRouter

	// RootRouter is the starting point for all HTTP requests to the server.
	RootRouter *mux.Router

	// Router is the starting point for all web, api4 and ws requests to the server. It differs
	// from RootRouter only if the SiteURL contains a /subpath.
	Router *mux.Router

	Server      *http.Server
	ListenAddr  *net.TCPAddr
	RateLimiter *RateLimiter
	Busy        *Busy

	EmailBatching    *EmailBatchingJob
	EmailRateLimiter *throttled.GCRARateLimiter

	HubsStopCheckingForDeadlock chan bool

	PushNotificationsHub PushNotificationsHub

	Jobs *jobs.JobServer

	HTTPService httpservice.HTTPService

	ImageProxy *imageproxy.ImageProxy

	Audit            *audit.Audit
	Log              *mlog.Logger
	NotificationsLog *mlog.Logger

	SearchEngine *searchengine.Broker

	AccountMigration einterfaces.AccountMigrationInterface
	Cluster          einterfaces.ClusterInterface
	Compliance       einterfaces.ComplianceInterface
	DataRetention    einterfaces.DataRetentionInterface
	Ldap             einterfaces.LdapInterface
	MessageExport    einterfaces.MessageExportInterface
	Metrics          einterfaces.MetricsInterface
	Notification     einterfaces.NotificationInterface
	Saml             einterfaces.SamlInterface

	CacheProvider cache.Provider
	// contains filtered or unexported fields
}

func NewServer

func NewServer(options ...Option) (*Server, error)

func (*Server) AddClusterLeaderChangedListener

func (s *Server) AddClusterLeaderChangedListener(listener func()) string

Registers a given function to be called when the cluster leader may have changed. Returns a unique ID for the listener which can later be used to remove it. If clustering is not enabled in this build, the callback will never be called.

func (*Server) AddConfigListener

func (s *Server) AddConfigListener(listener func(*model.Config, *model.Config)) string

Registers a function with a given listener to be called when the config is reloaded and may have changed. The function will be called with two arguments: the old config and the new config. AddConfigListener returns a unique ID for the listener that can later be used to remove it.

func (*Server) AddLicenseListener

func (s *Server) AddLicenseListener(listener func(oldLicense, newLicense *model.License)) string

func (*Server) AppOptions

func (s *Server) AppOptions() []AppOption

Global app options that should be applied to apps created by this server

func (*Server) AsymmetricSigningKey

func (s *Server) AsymmetricSigningKey() *ecdsa.PrivateKey

AsymmetricSigningKey will return a private key that can be used for asymmetric signing.

func (*Server) Config

func (s *Server) Config() *model.Config

func (*Server) DoSecurityUpdateCheck

func (s *Server) DoSecurityUpdateCheck()

func (*Server) EnvironmentConfig

func (s *Server) EnvironmentConfig() map[string]interface{}

func (*Server) FakeApp

func (s *Server) FakeApp() *App

A temporary bridge to deal with cases where the code is so tighly coupled that this is easier as a temporary solution

func (*Server) FileBackend

func (s *Server) FileBackend() (filesstore.FileBackend, *model.AppError)

func (*Server) GetHub

func (s *Server) GetHub(index int) (*Hub, error)

getHub gets the element at the given index in the hubs list. This method is safe for concurrent use by multiple goroutines.

func (*Server) GetHubs

func (s *Server) GetHubs() []*Hub

GetHubs returns the list of hubs. This method is safe for concurrent use by multiple goroutines.

func (*Server) Go

func (s *Server) Go(f func())

Go creates a goroutine, but maintains a record of it to ensure that execution completes before the server is shutdown.

func (*Server) InitEmailBatching

func (s *Server) InitEmailBatching()

func (*Server) InvokeClusterLeaderChangedListeners

func (s *Server) InvokeClusterLeaderChangedListeners()

func (*Server) License

func (s *Server) License() *model.License

func (*Server) PostActionCookieSecret

func (s *Server) PostActionCookieSecret() []byte

func (*Server) ReloadConfig

func (s *Server) ReloadConfig() error

func (*Server) RemoveClusterLeaderChangedListener

func (s *Server) RemoveClusterLeaderChangedListener(id string)

Removes a listener function by the unique ID returned when AddConfigListener was called

func (*Server) RemoveConfigListener

func (s *Server) RemoveConfigListener(id string)

Removes a listener function by the unique ID returned when AddConfigListener was called

func (*Server) RemoveLicenseListener

func (s *Server) RemoveLicenseListener(id string)

func (*Server) RunOldAppInitialization

func (s *Server) RunOldAppInitialization() error

This is a bridge between the old and new initialization for the context refactor. It calls app layer initialization code that then turns around and acts on the server. Don't add anything new here, new initialization should be done in the server and performed in the NewServer function.

func (*Server) RunOldAppShutdown

func (s *Server) RunOldAppShutdown()

func (*Server) SetHub

func (s *Server) SetHub(index int, hub *Hub) error

SetHub sets the element at the given index in the hubs list. This method is safe for concurrent use by multiple goroutines.

func (*Server) SetHubs

func (s *Server) SetHubs(hubs []*Hub)

SetHubs sets a new list of hubs. This method is safe for concurrent use by multiple goroutines.

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) Start

func (s *Server) Start() error

func (*Server) StartSearchEngine

func (s *Server) StartSearchEngine() (string, string)

func (*Server) StopHTTPServer

func (s *Server) StopHTTPServer()

func (*Server) TotalWebsocketConnections

func (s *Server) TotalWebsocketConnections() int

func (*Server) UpdateConfig

func (s *Server) UpdateConfig(f func(*model.Config))

func (*Server) WaitForGoroutines

func (s *Server) WaitForGoroutines()

WaitForGoroutines blocks until all goroutines created by App.Go exit.

type SettingsProvider

type SettingsProvider struct {
}

func (*SettingsProvider) DoCommand

func (settings *SettingsProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*SettingsProvider) GetCommand

func (settings *SettingsProvider) GetCommand(a *App, 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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*ShortcutsProvider) GetCommand

func (me *ShortcutsProvider) GetCommand(a *App, 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(a *App, args *model.CommandArgs, message string) *model.CommandResponse

func (*ShrugProvider) GetCommand

func (me *ShrugProvider) GetCommand(a *App, 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"`
	Creator string          `json:"creator"`
	Members []string        `json:"members"`
	Purpose SlackChannelSub `json:"purpose"`
	Topic   SlackChannelSub `json:"topic"`
	Type    string
}

func SlackParseChannels

func SlackParseChannels(data io.Reader, channelType string) ([]SlackChannel, error)

type SlackChannelSub

type SlackChannelSub struct {
	Value string `json:"value"`
}

type SlackComment

type SlackComment struct {
	User    string `json:"user"`
	Comment string `json:"comment"`
}

type SlackFile

type SlackFile struct {
	Id    string `json:"id"`
	Title string `json:"title"`
}

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"`
	ThreadTS    string                   `json:"thread_ts"`
	Type        string                   `json:"type"`
	SubType     string                   `json:"subtype"`
	Comment     *SlackComment            `json:"comment"`
	Upload      bool                     `json:"upload"`
	File        *SlackFile               `json:"file"`
	Files       []*SlackFile             `json:"files"`
	Attachments []*model.SlackAttachment `json:"attachments"`
}

func SlackParsePosts

func SlackParsePosts(data io.Reader) ([]SlackPost, error)

type SlackProfile

type SlackProfile struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
}

type SlackUser

type SlackUser struct {
	Id       string       `json:"id"`
	Username string       `json:"name"`
	Profile  SlackProfile `json:"profile"`
}

func SlackParseUsers

func SlackParseUsers(data io.Reader) ([]SlackUser, error)

type TeamImportData

type TeamImportData struct {
	Name            *string `json:"name"`
	DisplayName     *string `json:"display_name"`
	Type            *string `json:"type"`
	Description     *string `json:"description,omitempty"`
	AllowOpenInvite *bool   `json:"allow_open_invite,omitempty"`
	Scheme          *string `json:"scheme,omitempty"`
}

type TestEnvironment

type TestEnvironment struct {
	Teams        []*model.Team
	Environments []TeamEnvironment
}

func CreateTestEnvironmentWithTeams

func CreateTestEnvironmentWithTeams(a *App, client *model.Client4, rangeTeams utils.Range, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TestEnvironment, bool)

type TokenLocation

type TokenLocation int
const (
	TokenLocationNotFound TokenLocation = iota
	TokenLocationHeader
	TokenLocationCookie
	TokenLocationQueryString
)

func ParseAuthTokenFromRequest

func ParseAuthTokenFromRequest(r *http.Request) (string, TokenLocation)

func (TokenLocation) String

func (tl TokenLocation) String() string

type UploadFileTask

type UploadFileTask struct {
	// File name.
	Name string

	ChannelId string
	TeamId    string
	UserId    string

	// Time stamp to use when creating the file.
	Timestamp time.Time

	// The value of the Content-Length http header, when available.
	ContentLength int64

	// The file data stream.
	Input io.Reader

	// An optional, client-assigned Id field.
	ClientId string

	// If Raw, do not execute special processing for images, just upload
	// the file.
	Raw bool
	// contains filtered or unexported fields
}

type UserChannelImportData

type UserChannelImportData struct {
	Name        *string                           `json:"name"`
	Roles       *string                           `json:"roles"`
	NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props,omitempty"`
	Favorite    *bool                             `json:"favorite,omitempty"`
}

func ImportUserChannelDataFromChannelMemberAndPreferences

func ImportUserChannelDataFromChannelMemberAndPreferences(member *model.ChannelMemberForExport, preferences *model.Preferences) *UserChannelImportData

type UserChannelNotifyPropsImportData

type UserChannelNotifyPropsImportData struct {
	Desktop    *string `json:"desktop"`
	Mobile     *string `json:"mobile"`
	MarkUnread *string `json:"mark_unread"`
}

type UserImportData

type UserImportData struct {
	ProfileImage       *string `json:"profile_image,omitempty"`
	Username           *string `json:"username"`
	Email              *string `json:"email"`
	AuthService        *string `json:"auth_service"`
	AuthData           *string `json:"auth_data,omitempty"`
	Password           *string `json:"password,omitempty"`
	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"`
	UseMarkdownPreview *string `json:"feature_enabled_markdown_preview,omitempty"`
	UseFormatting      *string `json:"formatting,omitempty"`
	ShowUnreadSection  *string `json:"show_unread_section,omitempty"`
	DeleteAt           *int64  `json:"delete_at,omitempty"`

	Teams *[]UserTeamImportData `json:"teams,omitempty"`

	Theme              *string `json:"theme,omitempty"`
	UseMilitaryTime    *string `json:"military_time,omitempty"`
	CollapsePreviews   *string `json:"link_previews,omitempty"`
	MessageDisplay     *string `json:"message_display,omitempty"`
	ChannelDisplayMode *string `json:"channel_display_mode,omitempty"`
	TutorialStep       *string `json:"tutorial_step,omitempty"`
	EmailInterval      *string `json:"email_interval,omitempty"`

	NotifyProps *UserNotifyPropsImportData `json:"notify_props,omitempty"`
}

type UserNotifyPropsImportData

type UserNotifyPropsImportData struct {
	Desktop      *string `json:"desktop"`
	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"`
	Theme    *string                  `json:"theme,omitempty"`
	Channels *[]UserChannelImportData `json:"channels,omitempty"`
}

func ImportUserTeamDataFromTeamMember

func ImportUserTeamDataFromTeamMember(member *model.TeamMemberForExport) *UserTeamImportData

type WebConn

type WebConn struct {
	App       *App
	WebSocket *websocket.Conn
	Send      chan model.WebSocketMessage

	LastUserActivityAt        int64
	UserId                    string
	T                         goi18n.TranslateFunc
	Locale                    string
	AllChannelMembers         map[string]string
	LastAllChannelMembersTime int64
	Sequence                  int64
	// contains filtered or unexported fields
}

func (*WebConn) Close

func (wc *WebConn) Close()

func (*WebConn) GetSession

func (wc *WebConn) GetSession() *model.Session

func (*WebConn) GetSessionExpiresAt

func (wc *WebConn) GetSessionExpiresAt() int64

func (*WebConn) GetSessionToken

func (wc *WebConn) GetSessionToken() string

func (*WebConn) InvalidateCache

func (wc *WebConn) InvalidateCache()

func (*WebConn) IsAuthenticated

func (wc *WebConn) IsAuthenticated() bool

func (*WebConn) IsMemberOfTeam

func (wc *WebConn) IsMemberOfTeam(teamId string) bool

func (*WebConn) Pump

func (wc *WebConn) Pump()

func (*WebConn) SetSession

func (wc *WebConn) SetSession(v *model.Session)

func (*WebConn) SetSessionExpiresAt

func (wc *WebConn) SetSessionExpiresAt(v int64)

func (*WebConn) SetSessionToken

func (wc *WebConn) SetSessionToken(v string)

func (*WebConn) ShouldSendEvent

func (wc *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool

type WebConnActivityMessage

type WebConnActivityMessage struct {
	UserId       string
	SessionToken string
	ActivityAt   int64
}

type WebSocketRouter

type WebSocketRouter struct {
	// contains filtered or unexported fields
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL