Documentation

Index

Constants

View Source
const (
	ACCESS_TOKEN_GRANT_TYPE  = "authorization_code"
	ACCESS_TOKEN_TYPE        = "bearer"
	REFRESH_TOKEN_GRANT_TYPE = "refresh_token"
)
View Source
const (
	AUTHCODE_EXPIRE_TIME   = 60 * 10 // 10 minutes
	AUTHCODE_RESPONSE_TYPE = "code"
	IMPLICIT_RESPONSE_TYPE = "token"
	DEFAULT_SCOPE          = "user"
)
View Source
const (
	BOT_DISPLAY_NAME_MAX_RUNES = USER_FIRST_NAME_MAX_RUNES
	BOT_DESCRIPTION_MAX_RUNES  = 1024
	BOT_CREATOR_ID_MAX_RUNES   = KEY_VALUE_PLUGIN_ID_MAX_RUNES // UserId or PluginId
)
View Source
const (
	CHANNEL_OPEN                   = "O"
	CHANNEL_PRIVATE                = "P"
	CHANNEL_DIRECT                 = "D"
	CHANNEL_GROUP                  = "G"
	CHANNEL_GROUP_MAX_USERS        = 8
	CHANNEL_GROUP_MIN_USERS        = 3
	DEFAULT_CHANNEL                = "town-square"
	CHANNEL_DISPLAY_NAME_MAX_RUNES = 64
	CHANNEL_NAME_MIN_LENGTH        = 2
	CHANNEL_NAME_MAX_LENGTH        = 64
	CHANNEL_NAME_UI_MAX_LENGTH     = 22
	CHANNEL_HEADER_MAX_RUNES       = 1024
	CHANNEL_PURPOSE_MAX_RUNES      = 250
	CHANNEL_CACHE_SIZE             = 25000

	CHANNEL_SORT_BY_USERNAME = "username"
	CHANNEL_SORT_BY_STATUS   = "status"
)
View Source
const (
	CHANNEL_NOTIFY_DEFAULT              = "default"
	CHANNEL_NOTIFY_ALL                  = "all"
	CHANNEL_NOTIFY_MENTION              = "mention"
	CHANNEL_NOTIFY_NONE                 = "none"
	CHANNEL_MARK_UNREAD_ALL             = "all"
	CHANNEL_MARK_UNREAD_MENTION         = "mention"
	IGNORE_CHANNEL_MENTIONS_DEFAULT     = "default"
	IGNORE_CHANNEL_MENTIONS_OFF         = "off"
	IGNORE_CHANNEL_MENTIONS_ON          = "on"
	IGNORE_CHANNEL_MENTIONS_NOTIFY_PROP = "ignore_channel_mentions"
)
View Source
const (
	HEADER_REQUEST_ID         = "X-Request-ID"
	HEADER_VERSION_ID         = "X-Version-ID"
	HEADER_CLUSTER_ID         = "X-Cluster-ID"
	HEADER_ETAG_SERVER        = "ETag"
	HEADER_ETAG_CLIENT        = "If-None-Match"
	HEADER_FORWARDED          = "X-Forwarded-For"
	HEADER_REAL_IP            = "X-Real-IP"
	HEADER_FORWARDED_PROTO    = "X-Forwarded-Proto"
	HEADER_TOKEN              = "token"
	HEADER_CSRF_TOKEN         = "X-CSRF-Token"
	HEADER_BEARER             = "BEARER"
	HEADER_AUTH               = "Authorization"
	HEADER_REQUESTED_WITH     = "X-Requested-With"
	HEADER_REQUESTED_WITH_XML = "XMLHttpRequest"
	STATUS                    = "status"
	STATUS_OK                 = "OK"
	STATUS_FAIL               = "FAIL"
	STATUS_REMOVE             = "REMOVE"

	CLIENT_DIR = "client"

	API_URL_SUFFIX_V1 = "/api/v1"
	API_URL_SUFFIX_V4 = "/api/v4"
	API_URL_SUFFIX    = API_URL_SUFFIX_V4
)
View Source
const (
	CDS_OFFLINE_AFTER_MILLIS = 1000 * 60 * 30 // 30 minutes
	CDS_TYPE_APP             = "mattermost_app"
)
View Source
const (
	CLUSTER_EVENT_PUBLISH                                           = "publish"
	CLUSTER_EVENT_UPDATE_STATUS                                     = "update_status"
	CLUSTER_EVENT_INVALIDATE_ALL_CACHES                             = "inv_all_caches"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_REACTIONS                    = "inv_reactions"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_WEBHOOK                      = "inv_webhook"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_POSTS                = "inv_channel_posts"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_MEMBERS_NOTIFY_PROPS = "inv_channel_members_notify_props"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_MEMBERS              = "inv_channel_members"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_BY_NAME              = "inv_channel_name"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL                      = "inv_channel"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_USER                         = "inv_user"
	CLUSTER_EVENT_CLEAR_SESSION_CACHE_FOR_USER                      = "clear_session_user"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_ROLES                        = "inv_roles"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_SCHEMES                      = "inv_schemes"
	CLUSTER_EVENT_INVALIDATE_CACHE_FOR_GROUPS                       = "inv_groups"

	CLUSTER_SEND_BEST_EFFORT = "best_effort"
	CLUSTER_SEND_RELIABLE    = "reliable"
)
View Source
const (
	COMMAND_METHOD_POST = "P"
	COMMAND_METHOD_GET  = "G"
	MIN_TRIGGER_LENGTH  = 1
	MAX_TRIGGER_LENGTH  = 128
)
View Source
const (
	COMMAND_RESPONSE_TYPE_IN_CHANNEL = "in_channel"
	COMMAND_RESPONSE_TYPE_EPHEMERAL  = "ephemeral"
)
View Source
const (
	COMPLIANCE_STATUS_CREATED  = "created"
	COMPLIANCE_STATUS_RUNNING  = "running"
	COMPLIANCE_STATUS_FINISHED = "finished"
	COMPLIANCE_STATUS_FAILED   = "failed"
	COMPLIANCE_STATUS_REMOVED  = "removed"

	COMPLIANCE_TYPE_DAILY = "daily"
	COMPLIANCE_TYPE_ADHOC = "adhoc"
)
View Source
const (
	CONN_SECURITY_NONE     = ""
	CONN_SECURITY_PLAIN    = "PLAIN"
	CONN_SECURITY_TLS      = "TLS"
	CONN_SECURITY_STARTTLS = "STARTTLS"

	IMAGE_DRIVER_LOCAL = "local"
	IMAGE_DRIVER_S3    = "amazons3"

	DATABASE_DRIVER_SQLITE   = "sqlite3"
	DATABASE_DRIVER_MYSQL    = "mysql"
	DATABASE_DRIVER_POSTGRES = "postgres"

	MINIO_ACCESS_KEY = "minioaccesskey"
	MINIO_SECRET_KEY = "miniosecretkey"
	MINIO_BUCKET     = "mattermost-test"

	PASSWORD_MAXIMUM_LENGTH = 64
	PASSWORD_MINIMUM_LENGTH = 5

	SERVICE_GITLAB    = "gitlab"
	SERVICE_GOOGLE    = "google"
	SERVICE_OFFICE365 = "office365"

	GENERIC_NO_CHANNEL_NOTIFICATION = "generic_no_channel"
	GENERIC_NOTIFICATION            = "generic"
	FULL_NOTIFICATION               = "full"

	DIRECT_MESSAGE_ANY  = "any"
	DIRECT_MESSAGE_TEAM = "team"

	SHOW_USERNAME          = "username"
	SHOW_NICKNAME_FULLNAME = "nickname_full_name"
	SHOW_FULLNAME          = "full_name"

	PERMISSIONS_ALL           = "all"
	PERMISSIONS_CHANNEL_ADMIN = "channel_admin"
	PERMISSIONS_TEAM_ADMIN    = "team_admin"
	PERMISSIONS_SYSTEM_ADMIN  = "system_admin"

	FAKE_SETTING = "********************************"

	RESTRICT_EMOJI_CREATION_ALL          = "all"
	RESTRICT_EMOJI_CREATION_ADMIN        = "admin"
	RESTRICT_EMOJI_CREATION_SYSTEM_ADMIN = "system_admin"

	PERMISSIONS_DELETE_POST_ALL          = "all"
	PERMISSIONS_DELETE_POST_TEAM_ADMIN   = "team_admin"
	PERMISSIONS_DELETE_POST_SYSTEM_ADMIN = "system_admin"

	ALLOW_EDIT_POST_ALWAYS     = "always"
	ALLOW_EDIT_POST_NEVER      = "never"
	ALLOW_EDIT_POST_TIME_LIMIT = "time_limit"

	GROUP_UNREAD_CHANNELS_DISABLED    = "disabled"
	GROUP_UNREAD_CHANNELS_DEFAULT_ON  = "default_on"
	GROUP_UNREAD_CHANNELS_DEFAULT_OFF = "default_off"

	EMAIL_BATCHING_BUFFER_SIZE = 256
	EMAIL_BATCHING_INTERVAL    = 30

	EMAIL_NOTIFICATION_CONTENTS_FULL    = "full"
	EMAIL_NOTIFICATION_CONTENTS_GENERIC = "generic"

	SITENAME_MAX_LENGTH = 30

	SERVICE_SETTINGS_DEFAULT_SITE_URL           = "http://localhost:8065"
	SERVICE_SETTINGS_DEFAULT_TLS_CERT_FILE      = ""
	SERVICE_SETTINGS_DEFAULT_TLS_KEY_FILE       = ""
	SERVICE_SETTINGS_DEFAULT_READ_TIMEOUT       = 300
	SERVICE_SETTINGS_DEFAULT_WRITE_TIMEOUT      = 300
	SERVICE_SETTINGS_DEFAULT_MAX_LOGIN_ATTEMPTS = 10
	SERVICE_SETTINGS_DEFAULT_ALLOW_CORS_FROM    = ""
	SERVICE_SETTINGS_DEFAULT_LISTEN_AND_ADDRESS = ":8065"
	SERVICE_SETTINGS_DEFAULT_GFYCAT_API_KEY     = "2_KtH_W5"
	SERVICE_SETTINGS_DEFAULT_GFYCAT_API_SECRET  = "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof"

	TEAM_SETTINGS_DEFAULT_SITE_NAME                = "Mattermost"
	TEAM_SETTINGS_DEFAULT_MAX_USERS_PER_TEAM       = 50
	TEAM_SETTINGS_DEFAULT_CUSTOM_BRAND_TEXT        = ""
	TEAM_SETTINGS_DEFAULT_CUSTOM_DESCRIPTION_TEXT  = ""
	TEAM_SETTINGS_DEFAULT_USER_STATUS_AWAY_TIMEOUT = 300

	SQL_SETTINGS_DEFAULT_DATA_SOURCE = "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s"

	FILE_SETTINGS_DEFAULT_DIRECTORY = "./data/"

	EMAIL_SETTINGS_DEFAULT_FEEDBACK_ORGANIZATION = ""

	SUPPORT_SETTINGS_DEFAULT_TERMS_OF_SERVICE_LINK = "https://about.mattermost.com/default-terms/"
	SUPPORT_SETTINGS_DEFAULT_PRIVACY_POLICY_LINK   = "https://about.mattermost.com/default-privacy-policy/"
	SUPPORT_SETTINGS_DEFAULT_ABOUT_LINK            = "https://about.mattermost.com/default-about/"
	SUPPORT_SETTINGS_DEFAULT_HELP_LINK             = "https://about.mattermost.com/default-help/"
	SUPPORT_SETTINGS_DEFAULT_REPORT_A_PROBLEM_LINK = "https://about.mattermost.com/default-report-a-problem/"
	SUPPORT_SETTINGS_DEFAULT_SUPPORT_EMAIL         = "feedback@mattermost.com"
	SUPPORT_SETTINGS_DEFAULT_RE_ACCEPTANCE_PERIOD  = 365

	LDAP_SETTINGS_DEFAULT_FIRST_NAME_ATTRIBUTE         = ""
	LDAP_SETTINGS_DEFAULT_LAST_NAME_ATTRIBUTE          = ""
	LDAP_SETTINGS_DEFAULT_EMAIL_ATTRIBUTE              = ""
	LDAP_SETTINGS_DEFAULT_USERNAME_ATTRIBUTE           = ""
	LDAP_SETTINGS_DEFAULT_NICKNAME_ATTRIBUTE           = ""
	LDAP_SETTINGS_DEFAULT_ID_ATTRIBUTE                 = ""
	LDAP_SETTINGS_DEFAULT_POSITION_ATTRIBUTE           = ""
	LDAP_SETTINGS_DEFAULT_LOGIN_FIELD_NAME             = ""
	LDAP_SETTINGS_DEFAULT_GROUP_DISPLAY_NAME_ATTRIBUTE = ""
	LDAP_SETTINGS_DEFAULT_GROUP_ID_ATTRIBUTE           = ""

	SAML_SETTINGS_DEFAULT_ID_ATTRIBUTE         = ""
	SAML_SETTINGS_DEFAULT_FIRST_NAME_ATTRIBUTE = ""
	SAML_SETTINGS_DEFAULT_LAST_NAME_ATTRIBUTE  = ""
	SAML_SETTINGS_DEFAULT_EMAIL_ATTRIBUTE      = ""
	SAML_SETTINGS_DEFAULT_USERNAME_ATTRIBUTE   = ""
	SAML_SETTINGS_DEFAULT_NICKNAME_ATTRIBUTE   = ""
	SAML_SETTINGS_DEFAULT_LOCALE_ATTRIBUTE     = ""
	SAML_SETTINGS_DEFAULT_POSITION_ATTRIBUTE   = ""

	NATIVEAPP_SETTINGS_DEFAULT_APP_DOWNLOAD_LINK         = "https://about.mattermost.com/downloads/"
	NATIVEAPP_SETTINGS_DEFAULT_ANDROID_APP_DOWNLOAD_LINK = "https://about.mattermost.com/mattermost-android-app/"
	NATIVEAPP_SETTINGS_DEFAULT_IOS_APP_DOWNLOAD_LINK     = "https://about.mattermost.com/mattermost-ios-app/"

	EXPERIMENTAL_SETTINGS_DEFAULT_LINK_METADATA_TIMEOUT_MILLISECONDS = 5000

	ANALYTICS_SETTINGS_DEFAULT_MAX_USERS_FOR_STATISTICS = 2500

	ANNOUNCEMENT_SETTINGS_DEFAULT_BANNER_COLOR      = "#f2a93b"
	ANNOUNCEMENT_SETTINGS_DEFAULT_BANNER_TEXT_COLOR = "#333333"

	TEAM_SETTINGS_DEFAULT_TEAM_TEXT = "default"

	ELASTICSEARCH_SETTINGS_DEFAULT_CONNECTION_URL                    = "http://dockerhost:9200"
	ELASTICSEARCH_SETTINGS_DEFAULT_USERNAME                          = "elastic"
	ELASTICSEARCH_SETTINGS_DEFAULT_PASSWORD                          = "changeme"
	ELASTICSEARCH_SETTINGS_DEFAULT_POST_INDEX_REPLICAS               = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_POST_INDEX_SHARDS                 = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_CHANNEL_INDEX_REPLICAS            = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_CHANNEL_INDEX_SHARDS              = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_USER_INDEX_REPLICAS               = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_USER_INDEX_SHARDS                 = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_AGGREGATE_POSTS_AFTER_DAYS        = 365
	ELASTICSEARCH_SETTINGS_DEFAULT_POSTS_AGGREGATOR_JOB_START_TIME   = "03:00"
	ELASTICSEARCH_SETTINGS_DEFAULT_INDEX_PREFIX                      = ""
	ELASTICSEARCH_SETTINGS_DEFAULT_LIVE_INDEXING_BATCH_SIZE          = 1
	ELASTICSEARCH_SETTINGS_DEFAULT_BULK_INDEXING_TIME_WINDOW_SECONDS = 3600
	ELASTICSEARCH_SETTINGS_DEFAULT_REQUEST_TIMEOUT_SECONDS           = 30

	DATA_RETENTION_SETTINGS_DEFAULT_MESSAGE_RETENTION_DAYS  = 365
	DATA_RETENTION_SETTINGS_DEFAULT_FILE_RETENTION_DAYS     = 365
	DATA_RETENTION_SETTINGS_DEFAULT_DELETION_JOB_START_TIME = "02:00"

	PLUGIN_SETTINGS_DEFAULT_DIRECTORY        = "./plugins"
	PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY = "./client/plugins"

	COMPLIANCE_EXPORT_TYPE_CSV         = "csv"
	COMPLIANCE_EXPORT_TYPE_ACTIANCE    = "actiance"
	COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay"
	GLOBALRELAY_CUSTOMER_TYPE_A9       = "A9"
	GLOBALRELAY_CUSTOMER_TYPE_A10      = "A10"

	CLIENT_SIDE_CERT_CHECK_PRIMARY_AUTH   = "primary"
	CLIENT_SIDE_CERT_CHECK_SECONDARY_AUTH = "secondary"

	IMAGE_PROXY_TYPE_LOCAL      = "local"
	IMAGE_PROXY_TYPE_ATMOS_CAMO = "atmos/camo"
)
View Source
const (
	EMOJI_NAME_MAX_LENGTH = 64
	EMOJI_SORT_BY_NAME    = "name"
)
View Source
const (
	GroupSourceLdap GroupSource = "ldap"

	GroupNameMaxLength        = 64
	GroupSourceMaxLength      = 64
	GroupDisplayNameMaxLength = 128
	GroupDescriptionMaxLength = 1024
	GroupRemoteIDMaxLength    = 48
)
View Source
const (
	POST_ACTION_TYPE_BUTTON                         = "button"
	POST_ACTION_TYPE_SELECT                         = "select"
	INTERACTIVE_DIALOG_TRIGGER_TIMEOUT_MILLISECONDS = 3000
)
View Source
const (
	JOB_TYPE_DATA_RETENTION                 = "data_retention"
	JOB_TYPE_MESSAGE_EXPORT                 = "message_export"
	JOB_TYPE_ELASTICSEARCH_POST_INDEXING    = "elasticsearch_post_indexing"
	JOB_TYPE_ELASTICSEARCH_POST_AGGREGATION = "elasticsearch_post_aggregation"
	JOB_TYPE_LDAP_SYNC                      = "ldap_sync"
	JOB_TYPE_MIGRATIONS                     = "migrations"
	JOB_TYPE_PLUGINS                        = "plugins"

	JOB_STATUS_PENDING          = "pending"
	JOB_STATUS_IN_PROGRESS      = "in_progress"
	JOB_STATUS_SUCCESS          = "success"
	JOB_STATUS_ERROR            = "error"
	JOB_STATUS_CANCEL_REQUESTED = "cancel_requested"
	JOB_STATUS_CANCELED         = "canceled"
)
View Source
const (
	EXPIRED_LICENSE_ERROR = "api.license.add_license.expired.app_error"
	INVALID_LICENSE_ERROR = "api.license.add_license.invalid.app_error"
)
View Source
const (
	OAUTH_ACTION_SIGNUP       = "signup"
	OAUTH_ACTION_LOGIN        = "login"
	OAUTH_ACTION_EMAIL_TO_SSO = "email_to_sso"
	OAUTH_ACTION_SSO_TO_EMAIL = "sso_to_email"
	OAUTH_ACTION_MOBILE       = "mobile"
)
View Source
const (
	PERMISSION_SCOPE_SYSTEM  = "system_scope"
	PERMISSION_SCOPE_TEAM    = "team_scope"
	PERMISSION_SCOPE_CHANNEL = "channel_scope"
)
View Source
const (
	KEY_VALUE_PLUGIN_ID_MAX_RUNES = 190
	KEY_VALUE_KEY_MAX_RUNES       = 50
)
View Source
const (
	PluginStateNotRunning          = 0
	PluginStateStarting            = 1 // unused by server
	PluginStateRunning             = 2
	PluginStateFailedToStart       = 3
	PluginStateFailedToStayRunning = 4 // unused by server
	PluginStateStopping            = 5 // unused by server
)
View Source
const (
	POST_SYSTEM_MESSAGE_PREFIX  = "system_"
	POST_DEFAULT                = ""
	POST_SLACK_ATTACHMENT       = "slack_attachment"
	POST_SYSTEM_GENERIC         = "system_generic"
	POST_JOIN_LEAVE             = "system_join_leave" // Deprecated, use POST_JOIN_CHANNEL or POST_LEAVE_CHANNEL instead
	POST_JOIN_CHANNEL           = "system_join_channel"
	POST_LEAVE_CHANNEL          = "system_leave_channel"
	POST_JOIN_TEAM              = "system_join_team"
	POST_LEAVE_TEAM             = "system_leave_team"
	POST_AUTO_RESPONDER         = "system_auto_responder"
	POST_ADD_REMOVE             = "system_add_remove" // Deprecated, use POST_ADD_TO_CHANNEL or POST_REMOVE_FROM_CHANNEL instead
	POST_ADD_TO_CHANNEL         = "system_add_to_channel"
	POST_REMOVE_FROM_CHANNEL    = "system_remove_from_channel"
	POST_MOVE_CHANNEL           = "system_move_channel"
	POST_ADD_TO_TEAM            = "system_add_to_team"
	POST_REMOVE_FROM_TEAM       = "system_remove_from_team"
	POST_HEADER_CHANGE          = "system_header_change"
	POST_DISPLAYNAME_CHANGE     = "system_displayname_change"
	POST_CONVERT_CHANNEL        = "system_convert_channel"
	POST_PURPOSE_CHANGE         = "system_purpose_change"
	POST_CHANNEL_DELETED        = "system_channel_deleted"
	POST_EPHEMERAL              = "system_ephemeral"
	POST_CHANGE_CHANNEL_PRIVACY = "system_change_chan_privacy"
	POST_FILEIDS_MAX_RUNES      = 150
	POST_FILENAMES_MAX_RUNES    = 4000
	POST_HASHTAGS_MAX_RUNES     = 1000
	POST_MESSAGE_MAX_RUNES_V1   = 4000
	POST_MESSAGE_MAX_BYTES_V2   = 65535                         // Maximum size of a TEXT column in MySQL
	POST_MESSAGE_MAX_RUNES_V2   = POST_MESSAGE_MAX_BYTES_V2 / 4 // Assume a worst-case representation
	POST_PROPS_MAX_RUNES        = 8000
	POST_PROPS_MAX_USER_RUNES   = POST_PROPS_MAX_RUNES - 400 // Leave some room for system / pre-save modifications
	POST_CUSTOM_TYPE_PREFIX     = "custom_"
	PROPS_ADD_CHANNEL_MEMBER    = "add_channel_member"
	POST_PROPS_ADDED_USER_ID    = "addedUserId"
	POST_PROPS_DELETE_BY        = "deleteBy"
)
View Source
const (
	PREFERENCE_CATEGORY_DIRECT_CHANNEL_SHOW = "direct_channel_show"
	PREFERENCE_CATEGORY_TUTORIAL_STEPS      = "tutorial_step"
	PREFERENCE_CATEGORY_ADVANCED_SETTINGS   = "advanced_settings"
	PREFERENCE_CATEGORY_FLAGGED_POST        = "flagged_post"
	PREFERENCE_CATEGORY_FAVORITE_CHANNEL    = "favorite_channel"
	PREFERENCE_CATEGORY_SIDEBAR_SETTINGS    = "sidebar_settings"

	PREFERENCE_CATEGORY_DISPLAY_SETTINGS = "display_settings"
	PREFERENCE_NAME_CHANNEL_DISPLAY_MODE = "channel_display_mode"
	PREFERENCE_NAME_COLLAPSE_SETTING     = "collapse_previews"
	PREFERENCE_NAME_MESSAGE_DISPLAY      = "message_display"
	PREFERENCE_NAME_NAME_FORMAT          = "name_format"
	PREFERENCE_NAME_USE_MILITARY_TIME    = "use_military_time"

	PREFERENCE_CATEGORY_THEME = "theme"

	PREFERENCE_CATEGORY_AUTHORIZED_OAUTH_APP = "oauth_app"

	PREFERENCE_CATEGORY_LAST     = "last"
	PREFERENCE_NAME_LAST_CHANNEL = "channel"
	PREFERENCE_NAME_LAST_TEAM    = "team"

	PREFERENCE_CATEGORY_NOTIFICATIONS = "notifications"
	PREFERENCE_NAME_EMAIL_INTERVAL    = "email_interval"

	PREFERENCE_EMAIL_INTERVAL_NO_BATCHING_SECONDS = "30"  // the "immediate" setting is actually 30s
	PREFERENCE_EMAIL_INTERVAL_BATCHING_SECONDS    = "900" // fifteen minutes is 900 seconds
	PREFERENCE_EMAIL_INTERVAL_IMMEDIATELY         = "immediately"
	PREFERENCE_EMAIL_INTERVAL_FIFTEEN             = "fifteen"
	PREFERENCE_EMAIL_INTERVAL_FIFTEEN_AS_SECONDS  = "900"
	PREFERENCE_EMAIL_INTERVAL_HOUR                = "hour"
	PREFERENCE_EMAIL_INTERVAL_HOUR_AS_SECONDS     = "3600"
)
View Source
const (
	PUSH_NOTIFY_APPLE                = "apple"
	PUSH_NOTIFY_ANDROID              = "android"
	PUSH_NOTIFY_APPLE_REACT_NATIVE   = "apple_rn"
	PUSH_NOTIFY_ANDROID_REACT_NATIVE = "android_rn"

	PUSH_TYPE_MESSAGE = "message"
	PUSH_TYPE_CLEAR   = "clear"
	PUSH_MESSAGE_V2   = "v2"

	// The category is set to handle a set of interactive Actions
	// with the push notifications
	CATEGORY_CAN_REPLY = "CAN_REPLY"

	MHPNS = "https://push.mattermost.com"
)
View Source
const (
	PUSH_STATUS           = "status"
	PUSH_STATUS_OK        = "OK"
	PUSH_STATUS_FAIL      = "FAIL"
	PUSH_STATUS_REMOVE    = "REMOVE"
	PUSH_STATUS_ERROR_MSG = "error"
)
View Source
const (
	SYSTEM_USER_ROLE_ID              = "system_user"
	SYSTEM_ADMIN_ROLE_ID             = "system_admin"
	SYSTEM_POST_ALL_ROLE_ID          = "system_post_all"
	SYSTEM_POST_ALL_PUBLIC_ROLE_ID   = "system_post_all_public"
	SYSTEM_USER_ACCESS_TOKEN_ROLE_ID = "system_user_access_token"

	TEAM_USER_ROLE_ID            = "team_user"
	TEAM_ADMIN_ROLE_ID           = "team_admin"
	TEAM_POST_ALL_ROLE_ID        = "team_post_all"
	TEAM_POST_ALL_PUBLIC_ROLE_ID = "team_post_all_public"

	CHANNEL_USER_ROLE_ID  = "channel_user"
	CHANNEL_ADMIN_ROLE_ID = "channel_admin"

	ROLE_NAME_MAX_LENGTH         = 64
	ROLE_DISPLAY_NAME_MAX_LENGTH = 128
	ROLE_DESCRIPTION_MAX_LENGTH  = 1024
)
View Source
const (
	USER_AUTH_SERVICE_SAML      = "saml"
	USER_AUTH_SERVICE_SAML_TEXT = "SAML"
)
View Source
const (
	SCHEME_DISPLAY_NAME_MAX_LENGTH = 128
	SCHEME_NAME_MAX_LENGTH         = 64
	SCHEME_DESCRIPTION_MAX_LENGTH  = 1024
	SCHEME_SCOPE_TEAM              = "team"
	SCHEME_SCOPE_CHANNEL           = "channel"
)
View Source
const (
	SESSION_COOKIE_TOKEN              = "MMAUTHTOKEN"
	SESSION_COOKIE_USER               = "MMUSERID"
	SESSION_COOKIE_CSRF               = "MMCSRF"
	SESSION_CACHE_SIZE                = 35000
	SESSION_PROP_PLATFORM             = "platform"
	SESSION_PROP_OS                   = "os"
	SESSION_PROP_BROWSER              = "browser"
	SESSION_PROP_TYPE                 = "type"
	SESSION_PROP_USER_ACCESS_TOKEN_ID = "user_access_token_id"
	SESSION_TYPE_USER_ACCESS_TOKEN    = "UserAccessToken"
	SESSION_ACTIVITY_TIMEOUT          = 1000 * 60 * 5 // 5 minutes
	SESSION_USER_ACCESS_TOKEN_EXPIRY  = 100 * 365     // 100 years
)
View Source
const (
	STATUS_OUT_OF_OFFICE   = "ooo"
	STATUS_OFFLINE         = "offline"
	STATUS_AWAY            = "away"
	STATUS_DND             = "dnd"
	STATUS_ONLINE          = "online"
	STATUS_CACHE_SIZE      = SESSION_CACHE_SIZE
	STATUS_CHANNEL_TIMEOUT = 20000  // 20 seconds
	STATUS_MIN_UPDATE_TIME = 120000 // 2 minutes
)
View Source
const (
	SYSTEM_DIAGNOSTIC_ID             = "DiagnosticId"
	SYSTEM_RAN_UNIT_TESTS            = "RanUnitTests"
	SYSTEM_LAST_SECURITY_TIME        = "LastSecurityTime"
	SYSTEM_ACTIVE_LICENSE_ID         = "ActiveLicenseId"
	SYSTEM_LAST_COMPLIANCE_TIME      = "LastComplianceTime"
	SYSTEM_ASYMMETRIC_SIGNING_KEY    = "AsymmetricSigningKey"
	SYSTEM_POST_ACTION_COOKIE_SECRET = "PostActionCookieSecret"
	SYSTEM_INSTALLATION_DATE_KEY     = "InstallationDate"
)
View Source
const (
	TEAM_OPEN                       = "O"
	TEAM_INVITE                     = "I"
	TEAM_ALLOWED_DOMAINS_MAX_LENGTH = 500
	TEAM_COMPANY_NAME_MAX_LENGTH    = 64
	TEAM_DESCRIPTION_MAX_LENGTH     = 255
	TEAM_DISPLAY_NAME_MAX_RUNES     = 64
	TEAM_EMAIL_MAX_LENGTH           = 128
	TEAM_NAME_MAX_LENGTH            = 64
	TEAM_NAME_MIN_LENGTH            = 2
)
View Source
const (
	TOKEN_SIZE            = 64
	MAX_TOKEN_EXIPRY_TIME = 1000 * 60 * 60 * 48 // 48 hour
	TOKEN_TYPE_OAUTH      = "oauth"
)
View Source
const (
	ME                                 = "me"
	USER_NOTIFY_ALL                    = "all"
	USER_NOTIFY_MENTION                = "mention"
	USER_NOTIFY_NONE                   = "none"
	DESKTOP_NOTIFY_PROP                = "desktop"
	DESKTOP_SOUND_NOTIFY_PROP          = "desktop_sound"
	MARK_UNREAD_NOTIFY_PROP            = "mark_unread"
	PUSH_NOTIFY_PROP                   = "push"
	PUSH_STATUS_NOTIFY_PROP            = "push_status"
	EMAIL_NOTIFY_PROP                  = "email"
	CHANNEL_MENTIONS_NOTIFY_PROP       = "channel"
	COMMENTS_NOTIFY_PROP               = "comments"
	MENTION_KEYS_NOTIFY_PROP           = "mention_keys"
	COMMENTS_NOTIFY_NEVER              = "never"
	COMMENTS_NOTIFY_ROOT               = "root"
	COMMENTS_NOTIFY_ANY                = "any"
	FIRST_NAME_NOTIFY_PROP             = "first_name"
	AUTO_RESPONDER_ACTIVE_NOTIFY_PROP  = "auto_responder_active"
	AUTO_RESPONDER_MESSAGE_NOTIFY_PROP = "auto_responder_message"

	DEFAULT_LOCALE          = "en"
	USER_AUTH_SERVICE_EMAIL = "email"

	USER_EMAIL_MAX_LENGTH     = 128
	USER_NICKNAME_MAX_RUNES   = 64
	USER_POSITION_MAX_RUNES   = 128
	USER_FIRST_NAME_MAX_RUNES = 64
	USER_LAST_NAME_MAX_RUNES  = 64
	USER_AUTH_DATA_MAX_LENGTH = 128
	USER_NAME_MAX_LENGTH      = 64
	USER_NAME_MIN_LENGTH      = 1
	USER_PASSWORD_MAX_LENGTH  = 72
	USER_LOCALE_MAX_LENGTH    = 5
)
View Source
const (
	LOWERCASE_LETTERS = "abcdefghijklmnopqrstuvwxyz"
	UPPERCASE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	NUMBERS           = "0123456789"
	SYMBOLS           = " !\"\\#$%&'()*+,-./:;<=>?@[]^_`|~"
)
View Source
const (
	SOCKET_MAX_MESSAGE_SIZE_KB  = 8 * 1024 // 8KB
	PING_TIMEOUT_BUFFER_SECONDS = 5
)
View Source
const (
	WEBSOCKET_EVENT_TYPING                  = "typing"
	WEBSOCKET_EVENT_POSTED                  = "posted"
	WEBSOCKET_EVENT_POST_EDITED             = "post_edited"
	WEBSOCKET_EVENT_POST_DELETED            = "post_deleted"
	WEBSOCKET_EVENT_CHANNEL_CONVERTED       = "channel_converted"
	WEBSOCKET_EVENT_CHANNEL_CREATED         = "channel_created"
	WEBSOCKET_EVENT_CHANNEL_DELETED         = "channel_deleted"
	WEBSOCKET_EVENT_CHANNEL_UPDATED         = "channel_updated"
	WEBSOCKET_EVENT_CHANNEL_MEMBER_UPDATED  = "channel_member_updated"
	WEBSOCKET_EVENT_DIRECT_ADDED            = "direct_added"
	WEBSOCKET_EVENT_GROUP_ADDED             = "group_added"
	WEBSOCKET_EVENT_NEW_USER                = "new_user"
	WEBSOCKET_EVENT_ADDED_TO_TEAM           = "added_to_team"
	WEBSOCKET_EVENT_LEAVE_TEAM              = "leave_team"
	WEBSOCKET_EVENT_UPDATE_TEAM             = "update_team"
	WEBSOCKET_EVENT_DELETE_TEAM             = "delete_team"
	WEBSOCKET_EVENT_RESTORE_TEAM            = "restore_team"
	WEBSOCKET_EVENT_USER_ADDED              = "user_added"
	WEBSOCKET_EVENT_USER_UPDATED            = "user_updated"
	WEBSOCKET_EVENT_USER_ROLE_UPDATED       = "user_role_updated"
	WEBSOCKET_EVENT_MEMBERROLE_UPDATED      = "memberrole_updated"
	WEBSOCKET_EVENT_USER_REMOVED            = "user_removed"
	WEBSOCKET_EVENT_PREFERENCE_CHANGED      = "preference_changed"
	WEBSOCKET_EVENT_PREFERENCES_CHANGED     = "preferences_changed"
	WEBSOCKET_EVENT_PREFERENCES_DELETED     = "preferences_deleted"
	WEBSOCKET_EVENT_EPHEMERAL_MESSAGE       = "ephemeral_message"
	WEBSOCKET_EVENT_STATUS_CHANGE           = "status_change"
	WEBSOCKET_EVENT_HELLO                   = "hello"
	WEBSOCKET_AUTHENTICATION_CHALLENGE      = "authentication_challenge"
	WEBSOCKET_EVENT_REACTION_ADDED          = "reaction_added"
	WEBSOCKET_EVENT_REACTION_REMOVED        = "reaction_removed"
	WEBSOCKET_EVENT_RESPONSE                = "response"
	WEBSOCKET_EVENT_EMOJI_ADDED             = "emoji_added"
	WEBSOCKET_EVENT_CHANNEL_VIEWED          = "channel_viewed"
	WEBSOCKET_EVENT_PLUGIN_STATUSES_CHANGED = "plugin_statuses_changed"
	WEBSOCKET_EVENT_PLUGIN_ENABLED          = "plugin_enabled"
	WEBSOCKET_EVENT_PLUGIN_DISABLED         = "plugin_disabled"
	WEBSOCKET_EVENT_ROLE_UPDATED            = "role_updated"
	WEBSOCKET_EVENT_LICENSE_CHANGED         = "license_changed"
	WEBSOCKET_EVENT_CONFIG_CHANGED          = "config_changed"
	WEBSOCKET_EVENT_OPEN_DIALOG             = "open_dialog"
)
View Source
const CHANNEL_SEARCH_DEFAULT_LIMIT = 50
View Source
const (
	COMMAND_WEBHOOK_LIFETIME = 1000 * 60 * 30
)
View Source
const (
	DEFAULT_WEBHOOK_USERNAME = "webhook"
)
View Source
const (
	MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2 = "migration_advanced_permissions_phase_2"
)
View Source
const (
	MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image
)
View Source
const OUTGOING_HOOK_RESPONSE_TYPE_COMMENT = "comment"
View Source
const TERMS_OF_SERVICE_CACHE_SIZE = 1
View Source
const (
	USER_AUTH_SERVICE_GITLAB = "gitlab"
)
View Source
const (
	USER_AUTH_SERVICE_LDAP = "ldap"
)
View Source
const USER_SEARCH_DEFAULT_LIMIT = 100
View Source
const USER_SEARCH_MAX_LIMIT = 1000

Variables

View Source
var (
	IMAGE_EXTENSIONS = [7]string{".jpg", ".jpeg", ".gif", ".bmp", ".png", ".tiff", "tif"}
	IMAGE_MIME_TYPES = map[string]string{".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".gif": "image/gif", ".bmp": "image/bmp", ".png": "image/png", ".tiff": "image/tiff", ".tif": "image/tif"}
)
View Source
var ALL_PERMISSIONS []*Permission
View Source
var BotDefaultImage = []byte{}/* 3372 elements not displayed */
View Source
var BuildDate string
View Source
var BuildEnterpriseReady string
View Source
var BuildHash string
View Source
var BuildHashEnterprise string
View Source
var BuildNumber string
View Source
var CurrentVersion string = versions[0]
View Source
var EMOJI_PATTERN = regexp.MustCompile(`:[a-zA-Z0-9_-]+:`)
View Source
var PostActionRetainPropKeys = []string{"from_webhook", "override_username", "override_icon_url"}
View Source
var ServerTLSSupportedCiphers = map[string]uint16{
	"TLS_RSA_WITH_RC4_128_SHA":                tls.TLS_RSA_WITH_RC4_128_SHA,
	"TLS_RSA_WITH_3DES_EDE_CBC_SHA":           tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA,
	"TLS_RSA_WITH_AES_128_CBC_SHA":            tls.TLS_RSA_WITH_AES_128_CBC_SHA,
	"TLS_RSA_WITH_AES_256_CBC_SHA":            tls.TLS_RSA_WITH_AES_256_CBC_SHA,
	"TLS_RSA_WITH_AES_128_CBC_SHA256":         tls.TLS_RSA_WITH_AES_128_CBC_SHA256,
	"TLS_RSA_WITH_AES_128_GCM_SHA256":         tls.TLS_RSA_WITH_AES_128_GCM_SHA256,
	"TLS_RSA_WITH_AES_256_GCM_SHA384":         tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
	"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA":        tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
	"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA":    tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
	"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA":    tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
	"TLS_ECDHE_RSA_WITH_RC4_128_SHA":          tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA,
	"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA":     tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
	"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA":      tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
	"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA":      tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
	"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
	"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256":   tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
	"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256":   tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
	"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
	"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384":   tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
	"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
	"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305":    tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
	"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305":  tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
}
View Source
var SystemEmojis = map[string]string{} /* 2383 elements not displayed */

Functions

func AppErrorInit

func AppErrorInit(t goi18n.TranslateFunc)

func ArrayFromInterface

func ArrayFromInterface(data interface{}) []string

func ArrayFromJson

func ArrayFromJson(data io.Reader) []string

func ArrayToJson

func ArrayToJson(objmap []string) string

func ChannelMentions

func ChannelMentions(message string) []string

func CheckStatusOK

func CheckStatusOK(r *http.Response) bool

    CheckStatusOK is a convenience function for checking the standard OK response from the web service.

    func CleanTeamName

    func CleanTeamName(s string) string

    func CleanUsername

    func CleanUsername(s string) string

    func ClearMentionTags

    func ClearMentionTags(post string) string

    func ClusterInfosToJson

    func ClusterInfosToJson(objmap []*ClusterInfo) string

    func CommandListToJson

    func CommandListToJson(l []*Command) string

    func ComparePassword

    func ComparePassword(hash string, password string) bool

      ComparePassword compares the hash

      func CompliancePostHeader

      func CompliancePostHeader() []string

      func CopyStringMap

      func CopyStringMap(originalMap map[string]string) map[string]string

      func DecryptPostActionCookie

      func DecryptPostActionCookie(encoded string, secret []byte) (string, error)

      func EmojiListToJson

      func EmojiListToJson(emojiList []*Emoji) string

      func Etag

      func Etag(parts ...interface{}) string

      func FileInfosToJson

      func FileInfosToJson(infos []*FileInfo) string

      func FloorToNearestHour

      func FloorToNearestHour(ms int64) int64

        FloorToNearestHour takes a timestamp (in milliseconds) and returns it rounded to the previous hour in UTC.

        func GenerateLinkMetadataHash

        func GenerateLinkMetadataHash(url string, timestamp int64) int64

          GenerateLinkMetadataHash generates a unique hash for a given URL and timestamp for use as a database key.

          func GetDMNameFromIds

          func GetDMNameFromIds(userId1, userId2 string) string

          func GetEndOfDayMillis

          func GetEndOfDayMillis(thisTime time.Time, timeZoneOffset int) int64

            GetEndOfDayMillis is a convenience method to get milliseconds since epoch for provided date's end of day

            func GetEtagForFileInfos

            func GetEtagForFileInfos(infos []*FileInfo) string

            func GetGroupDisplayNameFromUsers

            func GetGroupDisplayNameFromUsers(users []*User, truncate bool) string

            func GetGroupNameFromUserIds

            func GetGroupNameFromUserIds(userIds []string) string

            func GetImageMimeType

            func GetImageMimeType(ext string) string

            func GetInfoForBytes

            func GetInfoForBytes(name string, data []byte) (*FileInfo, *AppError)

            func GetMillis

            func GetMillis() int64

              GetMillis is a convenience method to get milliseconds since epoch.

              func GetMillisForTime

              func GetMillisForTime(thisTime time.Time) int64

                GetMillisForTime is a convenience method to get milliseconds since epoch for provided Time.

                func GetPreferredTimezone

                func GetPreferredTimezone(timezone StringMap) string

                func GetPreviousVersion

                func GetPreviousVersion(version string) string

                func GetServerIpAddress

                func GetServerIpAddress() string

                func GetStartOfDayMillis

                func GetStartOfDayMillis(thisTime time.Time, timeZoneOffset int) int64

                  GetStartOfDayMillis is a convenience method to get milliseconds since epoch for provided date's start of day

                  func HashPassword

                  func HashPassword(password string) string

                    HashPassword generates a hash using the bcrypt.GenerateFromPassword

                    func IncomingWebhookListToJson

                    func IncomingWebhookListToJson(l []*IncomingWebhook) string

                    func IncomingWebhookRequestFromJson

                    func IncomingWebhookRequestFromJson(data io.Reader) (*IncomingWebhookRequest, *AppError)

                    func IsChannelMarkUnreadLevelValid

                    func IsChannelMarkUnreadLevelValid(markUnreadLevel string) bool

                    func IsChannelNotifyLevelValid

                    func IsChannelNotifyLevelValid(notifyLevel string) bool

                    func IsCurrentVersion

                    func IsCurrentVersion(versionToCheck string) bool

                    func IsFileExtImage

                    func IsFileExtImage(ext string) bool

                    func IsIgnoreChannelMentionsValid

                    func IsIgnoreChannelMentionsValid(ignoreChannelMentions string) bool

                    func IsInRole

                    func IsInRole(userRoles string, inRole string) bool

                      Make sure you acually want to use this function. In context.go there are functions to check permissions This function should not be used to check permissions.

                      func IsLower

                      func IsLower(s string) bool

                      func IsPreviousVersionsSupported

                      func IsPreviousVersionsSupported(versionToCheck string) bool

                      func IsReservedTeamName

                      func IsReservedTeamName(s string) bool
                      func IsSafeLink(link *string) bool

                      func IsSendEmailValid

                      func IsSendEmailValid(sendEmail string) bool

                      func IsValidAlphaNum

                      func IsValidAlphaNum(s string) bool

                      func IsValidAlphaNumHyphenUnderscore

                      func IsValidAlphaNumHyphenUnderscore(s string, withFormat bool) bool

                      func IsValidChannelIdentifier

                      func IsValidChannelIdentifier(s string) bool

                      func IsValidCommentsNotifyLevel

                      func IsValidCommentsNotifyLevel(notifyLevel string) bool

                      func IsValidEmail

                      func IsValidEmail(email string) bool

                      func IsValidEmailBatchingInterval

                      func IsValidEmailBatchingInterval(emailInterval string) bool

                      func IsValidHttpUrl

                      func IsValidHttpUrl(rawUrl string) bool

                      func IsValidId

                      func IsValidId(value string) bool

                      func IsValidLocale

                      func IsValidLocale(locale string) bool

                      func IsValidNumberString

                      func IsValidNumberString(value string) bool

                      func IsValidPushStatusNotifyLevel

                      func IsValidPushStatusNotifyLevel(notifyLevel string) bool

                      func IsValidRoleName

                      func IsValidRoleName(roleName string) bool

                      func IsValidSchemeName

                      func IsValidSchemeName(name string) bool

                      func IsValidTeamName

                      func IsValidTeamName(s string) bool

                      func IsValidTrueOrFalseString

                      func IsValidTrueOrFalseString(value string) bool

                      func IsValidTurnOrStunServer

                      func IsValidTurnOrStunServer(rawUri string) bool

                      func IsValidUserNotifyLevel

                      func IsValidUserNotifyLevel(notifyLevel string) bool

                      func IsValidUserRoles

                      func IsValidUserRoles(userRoles string) bool

                      func IsValidUsername

                      func IsValidUsername(s string) bool

                      func IsValidWebsocketUrl

                      func IsValidWebsocketUrl(rawUrl string) bool

                      func JobsToJson

                      func JobsToJson(jobs []*Job) string

                      func MakeDefaultRoles

                      func MakeDefaultRoles() map[string]*Role

                      func ManifestListToJson

                      func ManifestListToJson(m []*Manifest) string

                      func MapBoolFromJson

                      func MapBoolFromJson(data io.Reader) map[string]bool

                        MapFromJson will decode the key/value pair map

                        func MapBoolToJson

                        func MapBoolToJson(objmap map[string]bool) string

                          MapToJson converts a map to a json string

                          func MapFromJson

                          func MapFromJson(data io.Reader) map[string]string

                            MapFromJson will decode the key/value pair map

                            func MapPostIdToReactionsFromJson

                            func MapPostIdToReactionsFromJson(data io.Reader) map[string][]*Reaction

                            func MapPostIdToReactionsToJson

                            func MapPostIdToReactionsToJson(o map[string][]*Reaction) string

                            func MapToJson

                            func MapToJson(objmap map[string]string) string

                              MapToJson converts a map to a json string

                              func NewBool

                              func NewBool(b bool) *bool

                              func NewId

                              func NewId() string

                                NewId is a globally unique identifier. It is a [A-Z0-9] string 26 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off.

                                func NewInt

                                func NewInt(n int) *int

                                func NewInt64

                                func NewInt64(n int64) *int64

                                func NewRandomString

                                func NewRandomString(length int) string

                                func NewString

                                func NewString(s string) *string

                                func NewWebSocketClient

                                func NewWebSocketClient(url, authToken string) (*WebSocketClient, *AppError)

                                  NewWebSocketClient constructs a new WebSocket client with convenience methods for talking to the server.

                                  func NewWebSocketClient4

                                  func NewWebSocketClient4(url, authToken string) (*WebSocketClient, *AppError)

                                    NewWebSocketClient4 constructs a new WebSocket client with convenience methods for talking to the server. Uses the v4 endpoint.

                                    func NewWebSocketClient4WithDialer

                                    func NewWebSocketClient4WithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)

                                      NewWebSocketClient4WithDialer constructs a new WebSocket client with convenience methods for talking to the server using a custom dialer. Uses the v4 endpoint.

                                      func NewWebSocketClientWithDialer

                                      func NewWebSocketClientWithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)

                                        NewWebSocketClientWithDialer constructs a new WebSocket client with convenience methods for talking to the server using a custom dialer.

                                        func NormalizeEmail

                                        func NormalizeEmail(email string) string

                                        func NormalizeUsername

                                        func NormalizeUsername(username string) string

                                        func OAuthAppListToJson

                                        func OAuthAppListToJson(l []*OAuthApp) string

                                        func OutgoingWebhookListToJson

                                        func OutgoingWebhookListToJson(l []*OutgoingWebhook) string

                                        func PadDateStringZeros

                                        func PadDateStringZeros(dateString string) string

                                          PadDateStringZeros is a convenience method to pad 2 digit date parts with zeros to meet ISO 8601 format

                                          func ParseHashtags

                                          func ParseHashtags(text string) (string, string)

                                          func ParseSlackAttachment

                                          func ParseSlackAttachment(post *Post, attachments []*SlackAttachment)

                                            This method only parses and processes the attachments, all else should be set in the post which is passed

                                            func ParseSlackLinksToMarkdown

                                            func ParseSlackLinksToMarkdown(text string) string

                                            func PermissionsChangedByPatch

                                            func PermissionsChangedByPatch(role *Role, patch *RolePatch) []string

                                              Returns an array of permissions that are in either role.Permissions or patch.Permissions, but not both.

                                              func ReactionsToJson

                                              func ReactionsToJson(o []*Reaction) string

                                              func RemoveDuplicateStrings

                                              func RemoveDuplicateStrings(in []string) []string

                                              func RewriteImageURLs

                                              func RewriteImageURLs(message string, f func(string) string) string

                                                RewriteImageURLs takes a message and returns a copy that has all of the image URLs replaced according to the function f. For each image URL, f will be invoked, and the resulting markdown will contain the URL returned by that invocation instead.

                                                Image URLs are destination URLs used in inline images or reference definitions that are used anywhere in the input markdown as an image.

                                                func RoleListToJson

                                                func RoleListToJson(r []*Role) string

                                                func SchemeIDFromJson

                                                func SchemeIDFromJson(data io.Reader) *string

                                                func SchemesToJson

                                                func SchemesToJson(schemes []*Scheme) string

                                                func SessionsToJson

                                                func SessionsToJson(o []*Session) string

                                                func SplitVersion

                                                func SplitVersion(version string) (int64, int64, int64)

                                                func StatusListToJson

                                                func StatusListToJson(u []*Status) string

                                                func StatusMapToInterfaceMap

                                                func StatusMapToInterfaceMap(statusMap map[string]*Status) map[string]interface{}

                                                func StringFromJson

                                                func StringFromJson(data io.Reader) string

                                                func StringInterfaceFromJson

                                                func StringInterfaceFromJson(data io.Reader) map[string]interface{}

                                                func StringInterfaceToJson

                                                func StringInterfaceToJson(objmap map[string]interface{}) string

                                                func StringToJson

                                                func StringToJson(s string) string

                                                func TeamListToJson

                                                func TeamListToJson(t []*Team) string

                                                func TeamMapFromJson

                                                func TeamMapFromJson(data io.Reader) map[string]*Team

                                                func TeamMapToJson

                                                func TeamMapToJson(u map[string]*Team) string

                                                func TeamMembersToJson

                                                func TeamMembersToJson(o []*TeamMember) string

                                                func TeamsUnreadToJson

                                                func TeamsUnreadToJson(o []*TeamUnread) string

                                                func UserAccessTokenListToJson

                                                func UserAccessTokenListToJson(t []*UserAccessToken) string

                                                func UserListToJson

                                                func UserListToJson(u []*User) string

                                                func UserMapFromJson

                                                func UserMapFromJson(data io.Reader) map[string]*User

                                                func UserMapToJson

                                                func UserMapToJson(u map[string]*User) string

                                                Types

                                                type AccessData

                                                type AccessData struct {
                                                	ClientId     string `json:"client_id"`
                                                	UserId       string `json:"user_id"`
                                                	Token        string `json:"token"`
                                                	RefreshToken string `json:"refresh_token"`
                                                	RedirectUri  string `json:"redirect_uri"`
                                                	ExpiresAt    int64  `json:"expires_at"`
                                                	Scope        string `json:"scope"`
                                                }

                                                func AccessDataFromJson

                                                func AccessDataFromJson(data io.Reader) *AccessData

                                                func (*AccessData) IsExpired

                                                func (me *AccessData) IsExpired() bool

                                                func (*AccessData) IsValid

                                                func (ad *AccessData) IsValid() *AppError

                                                  IsValid validates the AccessData and returns an error if it isn't configured correctly.

                                                  func (*AccessData) ToJson

                                                  func (ad *AccessData) ToJson() string

                                                  type AccessResponse

                                                  type AccessResponse struct {
                                                  	AccessToken  string `json:"access_token"`
                                                  	TokenType    string `json:"token_type"`
                                                  	ExpiresIn    int32  `json:"expires_in"`
                                                  	Scope        string `json:"scope"`
                                                  	RefreshToken string `json:"refresh_token"`
                                                  }

                                                  func AccessResponseFromJson

                                                  func AccessResponseFromJson(data io.Reader) *AccessResponse

                                                  func (*AccessResponse) ToJson

                                                  func (ar *AccessResponse) ToJson() string

                                                  type AnalyticsRow

                                                  type AnalyticsRow struct {
                                                  	Name  string  `json:"name"`
                                                  	Value float64 `json:"value"`
                                                  }

                                                  func AnalyticsRowFromJson

                                                  func AnalyticsRowFromJson(data io.Reader) *AnalyticsRow

                                                  func (*AnalyticsRow) ToJson

                                                  func (me *AnalyticsRow) ToJson() string

                                                  type AnalyticsRows

                                                  type AnalyticsRows []*AnalyticsRow

                                                  func AnalyticsRowsFromJson

                                                  func AnalyticsRowsFromJson(data io.Reader) AnalyticsRows

                                                  func (AnalyticsRows) ToJson

                                                  func (me AnalyticsRows) ToJson() string

                                                  type AnalyticsSettings

                                                  type AnalyticsSettings struct {
                                                  	MaxUsersForStatistics *int `restricted:"true"`
                                                  }

                                                  func (*AnalyticsSettings) SetDefaults

                                                  func (s *AnalyticsSettings) SetDefaults()

                                                  type AnnouncementSettings

                                                  type AnnouncementSettings struct {
                                                  	EnableBanner         *bool
                                                  	BannerText           *string
                                                  	BannerColor          *string
                                                  	BannerTextColor      *string
                                                  	AllowBannerDismissal *bool
                                                  }

                                                  func (*AnnouncementSettings) SetDefaults

                                                  func (s *AnnouncementSettings) SetDefaults()

                                                  type AppError

                                                  type AppError struct {
                                                  	Id            string `json:"id"`
                                                  	Message       string `json:"message"`               // Message to be display to the end user without debugging information
                                                  	DetailedError string `json:"detailed_error"`        // Internal error string to help the developer
                                                  	RequestId     string `json:"request_id,omitempty"`  // The RequestId that's also set in the header
                                                  	StatusCode    int    `json:"status_code,omitempty"` // The http status code
                                                  	Where         string `json:"-"`                     // The function where it happened in the form of Struct.Func
                                                  	IsOAuth       bool   `json:"is_oauth,omitempty"`    // Whether the error is OAuth specific
                                                  	// contains filtered or unexported fields
                                                  }

                                                  func AppErrorFromJson

                                                  func AppErrorFromJson(data io.Reader) *AppError

                                                    AppErrorFromJson will decode the input and return an AppError

                                                    func DecodeAndVerifyTriggerId

                                                    func DecodeAndVerifyTriggerId(triggerId string, s *ecdsa.PrivateKey) (string, string, *AppError)

                                                    func GenerateTriggerId

                                                    func GenerateTriggerId(userId string, s crypto.Signer) (string, string, *AppError)

                                                    func InvalidTermsOfServiceError

                                                    func InvalidTermsOfServiceError(fieldName string, termsOfServiceId string) *AppError

                                                    func InvalidUserError

                                                    func InvalidUserError(fieldName string, userId string) *AppError

                                                    func InvalidUserTermsOfServiceError

                                                    func InvalidUserTermsOfServiceError(fieldName string, userTermsOfServiceId string) *AppError

                                                    func IsValidEmojiName

                                                    func IsValidEmojiName(name string) *AppError

                                                    func MakeBotNotFoundError

                                                    func MakeBotNotFoundError(userId string) *AppError

                                                      MakeBotNotFoundError creates the error returned when a bot does not exist, or when the user isn't allowed to query the bot. The errors must the same in both cases to avoid leaking that a user is a bot.

                                                      func NewAppError

                                                      func NewAppError(where string, id string, params map[string]interface{}, details string, status int) *AppError

                                                      func (*AppError) Error

                                                      func (er *AppError) Error() string

                                                      func (*AppError) SystemMessage

                                                      func (er *AppError) SystemMessage(T goi18n.TranslateFunc) string

                                                      func (*AppError) ToJson

                                                      func (er *AppError) ToJson() string

                                                      func (*AppError) Translate

                                                      func (er *AppError) Translate(T goi18n.TranslateFunc)

                                                      type Audit

                                                      type Audit struct {
                                                      	Id        string `json:"id"`
                                                      	CreateAt  int64  `json:"create_at"`
                                                      	UserId    string `json:"user_id"`
                                                      	Action    string `json:"action"`
                                                      	ExtraInfo string `json:"extra_info"`
                                                      	IpAddress string `json:"ip_address"`
                                                      	SessionId string `json:"session_id"`
                                                      }

                                                      func AuditFromJson

                                                      func AuditFromJson(data io.Reader) *Audit

                                                      func (*Audit) ToJson

                                                      func (o *Audit) ToJson() string

                                                      type Audits

                                                      type Audits []Audit

                                                      func AuditsFromJson

                                                      func AuditsFromJson(data io.Reader) Audits

                                                      func (Audits) Etag

                                                      func (o Audits) Etag() string

                                                      func (Audits) ToJson

                                                      func (o Audits) ToJson() string

                                                      type AuthData

                                                      type AuthData struct {
                                                      	ClientId    string `json:"client_id"`
                                                      	UserId      string `json:"user_id"`
                                                      	Code        string `json:"code"`
                                                      	ExpiresIn   int32  `json:"expires_in"`
                                                      	CreateAt    int64  `json:"create_at"`
                                                      	RedirectUri string `json:"redirect_uri"`
                                                      	State       string `json:"state"`
                                                      	Scope       string `json:"scope"`
                                                      }

                                                      func AuthDataFromJson

                                                      func AuthDataFromJson(data io.Reader) *AuthData

                                                      func (*AuthData) IsExpired

                                                      func (ad *AuthData) IsExpired() bool

                                                      func (*AuthData) IsValid

                                                      func (ad *AuthData) IsValid() *AppError

                                                        IsValid validates the AuthData and returns an error if it isn't configured correctly.

                                                        func (*AuthData) PreSave

                                                        func (ad *AuthData) PreSave()

                                                        func (*AuthData) ToJson

                                                        func (ad *AuthData) ToJson() string

                                                        type AuthorizeRequest

                                                        type AuthorizeRequest struct {
                                                        	ResponseType string `json:"response_type"`
                                                        	ClientId     string `json:"client_id"`
                                                        	RedirectUri  string `json:"redirect_uri"`
                                                        	Scope        string `json:"scope"`
                                                        	State        string `json:"state"`
                                                        }

                                                        func AuthorizeRequestFromJson

                                                        func AuthorizeRequestFromJson(data io.Reader) *AuthorizeRequest

                                                        func (*AuthorizeRequest) IsValid

                                                        func (ar *AuthorizeRequest) IsValid() *AppError

                                                          IsValid validates the AuthorizeRequest and returns an error if it isn't configured correctly.

                                                          func (*AuthorizeRequest) ToJson

                                                          func (ar *AuthorizeRequest) ToJson() string

                                                          type Bot

                                                          type Bot struct {
                                                          	UserId      string `json:"user_id"`
                                                          	Username    string `json:"username"`
                                                          	DisplayName string `json:"display_name,omitempty"`
                                                          	Description string `json:"description,omitempty"`
                                                          	OwnerId     string `json:"owner_id"`
                                                          	CreateAt    int64  `json:"create_at"`
                                                          	UpdateAt    int64  `json:"update_at"`
                                                          	DeleteAt    int64  `json:"delete_at"`
                                                          }

                                                            Bot is a special type of User meant for programmatic interactions. Note that the primary key of a bot is the UserId, and matches the primary key of the corresponding user.

                                                            func BotFromJson

                                                            func BotFromJson(data io.Reader) *Bot

                                                              BotFromJson deserializes a bot from json.

                                                              func (*Bot) Clone

                                                              func (b *Bot) Clone() *Bot

                                                                Clone returns a shallow copy of the bot.

                                                                func (*Bot) Etag

                                                                func (b *Bot) Etag() string

                                                                  Etag generates an etag for caching.

                                                                  func (*Bot) IsValid

                                                                  func (b *Bot) IsValid() *AppError

                                                                    IsValid validates the bot and returns an error if it isn't configured correctly.

                                                                    func (*Bot) Patch

                                                                    func (b *Bot) Patch(patch *BotPatch)

                                                                      Patch modifies an existing bot with optional fields from the given patch.

                                                                      func (*Bot) PreSave

                                                                      func (b *Bot) PreSave()

                                                                        PreSave should be run before saving a new bot to the database.

                                                                        func (*Bot) PreUpdate

                                                                        func (b *Bot) PreUpdate()

                                                                          PreUpdate should be run before saving an updated bot to the database.

                                                                          func (*Bot) ToJson

                                                                          func (b *Bot) ToJson() []byte

                                                                            ToJson serializes the bot to json.

                                                                            func (*Bot) Trace

                                                                            func (b *Bot) Trace() map[string]interface{}

                                                                              Trace describes the minimum information required to identify a bot for the purpose of logging.

                                                                              type BotGetOptions

                                                                              type BotGetOptions struct {
                                                                              	OwnerId        string
                                                                              	IncludeDeleted bool
                                                                              	OnlyOrphaned   bool
                                                                              	Page           int
                                                                              	PerPage        int
                                                                              }

                                                                                BotGetOptions acts as a filter on bulk bot fetching queries.

                                                                                type BotList

                                                                                type BotList []*Bot

                                                                                  BotList is a list of bots.

                                                                                  func BotListFromJson

                                                                                  func BotListFromJson(data io.Reader) BotList

                                                                                    BotListFromJson deserializes a list of bots from json.

                                                                                    func (*BotList) Etag

                                                                                    func (l *BotList) Etag() string

                                                                                      Etag computes the etag for a list of bots.

                                                                                      func (*BotList) ToJson

                                                                                      func (l *BotList) ToJson() []byte

                                                                                        ToJson serializes a list of bots to json.

                                                                                        type BotPatch

                                                                                        type BotPatch struct {
                                                                                        	Username    *string `json:"username"`
                                                                                        	DisplayName *string `json:"display_name"`
                                                                                        	Description *string `json:"description"`
                                                                                        }

                                                                                          BotPatch is a description of what fields to update on an existing bot.

                                                                                          func BotPatchFromJson

                                                                                          func BotPatchFromJson(data io.Reader) *BotPatch

                                                                                            BotPatchFromJson deserializes a bot patch from json.

                                                                                            func (*BotPatch) ToJson

                                                                                            func (b *BotPatch) ToJson() []byte

                                                                                              ToJson serializes the bot patch to json.

                                                                                              type BundleInfo

                                                                                              type BundleInfo struct {
                                                                                              	Path string
                                                                                              
                                                                                              	Manifest      *Manifest
                                                                                              	ManifestPath  string
                                                                                              	ManifestError error
                                                                                              }

                                                                                              func BundleInfoForPath

                                                                                              func BundleInfoForPath(path string) *BundleInfo

                                                                                                Returns bundle info for the given path. The return value is never nil.

                                                                                                func (*BundleInfo) WrapLogger

                                                                                                func (b *BundleInfo) WrapLogger(logger *mlog.Logger) *mlog.Logger

                                                                                                type Channel

                                                                                                type Channel struct {
                                                                                                	Id               string                 `json:"id"`
                                                                                                	CreateAt         int64                  `json:"create_at"`
                                                                                                	UpdateAt         int64                  `json:"update_at"`
                                                                                                	DeleteAt         int64                  `json:"delete_at"`
                                                                                                	TeamId           string                 `json:"team_id"`
                                                                                                	Type             string                 `json:"type"`
                                                                                                	DisplayName      string                 `json:"display_name"`
                                                                                                	Name             string                 `json:"name"`
                                                                                                	Header           string                 `json:"header"`
                                                                                                	Purpose          string                 `json:"purpose"`
                                                                                                	LastPostAt       int64                  `json:"last_post_at"`
                                                                                                	TotalMsgCount    int64                  `json:"total_msg_count"`
                                                                                                	ExtraUpdateAt    int64                  `json:"extra_update_at"`
                                                                                                	CreatorId        string                 `json:"creator_id"`
                                                                                                	SchemeId         *string                `json:"scheme_id"`
                                                                                                	Props            map[string]interface{} `json:"props" db:"-"`
                                                                                                	GroupConstrained *bool                  `json:"group_constrained"`
                                                                                                }

                                                                                                func ChannelFromJson

                                                                                                func ChannelFromJson(data io.Reader) *Channel

                                                                                                func ChannelSliceFromJson

                                                                                                func ChannelSliceFromJson(data io.Reader) []*Channel

                                                                                                func (*Channel) AddProp

                                                                                                func (o *Channel) AddProp(key string, value interface{})

                                                                                                func (*Channel) DeepCopy

                                                                                                func (o *Channel) DeepCopy() *Channel

                                                                                                func (*Channel) Etag

                                                                                                func (o *Channel) Etag() string

                                                                                                func (*Channel) IsGroupOrDirect

                                                                                                func (o *Channel) IsGroupOrDirect() bool

                                                                                                func (*Channel) IsValid

                                                                                                func (o *Channel) IsValid() *AppError

                                                                                                func (*Channel) MakeNonNil

                                                                                                func (o *Channel) MakeNonNil()

                                                                                                func (*Channel) Patch

                                                                                                func (o *Channel) Patch(patch *ChannelPatch)

                                                                                                func (*Channel) PreSave

                                                                                                func (o *Channel) PreSave()

                                                                                                func (*Channel) PreUpdate

                                                                                                func (o *Channel) PreUpdate()

                                                                                                func (*Channel) ToJson

                                                                                                func (o *Channel) ToJson() string

                                                                                                type ChannelCounts

                                                                                                type ChannelCounts struct {
                                                                                                	Counts      map[string]int64 `json:"counts"`
                                                                                                	UpdateTimes map[string]int64 `json:"update_times"`
                                                                                                }

                                                                                                func ChannelCountsFromJson

                                                                                                func ChannelCountsFromJson(data io.Reader) *ChannelCounts

                                                                                                func (*ChannelCounts) Etag

                                                                                                func (o *ChannelCounts) Etag() string

                                                                                                func (*ChannelCounts) ToJson

                                                                                                func (o *ChannelCounts) ToJson() string

                                                                                                type ChannelData

                                                                                                type ChannelData struct {
                                                                                                	Channel *Channel       `json:"channel"`
                                                                                                	Member  *ChannelMember `json:"member"`
                                                                                                }

                                                                                                func ChannelDataFromJson

                                                                                                func ChannelDataFromJson(data io.Reader) *ChannelData

                                                                                                func (*ChannelData) Etag

                                                                                                func (o *ChannelData) Etag() string

                                                                                                func (*ChannelData) ToJson

                                                                                                func (o *ChannelData) ToJson() string

                                                                                                type ChannelForExport

                                                                                                type ChannelForExport struct {
                                                                                                	Channel
                                                                                                	TeamName   string
                                                                                                	SchemeName *string
                                                                                                }

                                                                                                type ChannelList

                                                                                                type ChannelList []*Channel

                                                                                                func ChannelListFromJson

                                                                                                func ChannelListFromJson(data io.Reader) *ChannelList

                                                                                                func (*ChannelList) Etag

                                                                                                func (o *ChannelList) Etag() string

                                                                                                func (*ChannelList) ToJson

                                                                                                func (o *ChannelList) ToJson() string

                                                                                                type ChannelListWithTeamData

                                                                                                type ChannelListWithTeamData []*ChannelWithTeamData

                                                                                                func ChannelListWithTeamDataFromJson

                                                                                                func ChannelListWithTeamDataFromJson(data io.Reader) *ChannelListWithTeamData

                                                                                                func (*ChannelListWithTeamData) Etag

                                                                                                func (o *ChannelListWithTeamData) Etag() string

                                                                                                func (*ChannelListWithTeamData) ToJson

                                                                                                func (o *ChannelListWithTeamData) ToJson() string

                                                                                                type ChannelMember

                                                                                                type ChannelMember struct {
                                                                                                	ChannelId     string    `json:"channel_id"`
                                                                                                	UserId        string    `json:"user_id"`
                                                                                                	Roles         string    `json:"roles"`
                                                                                                	LastViewedAt  int64     `json:"last_viewed_at"`
                                                                                                	MsgCount      int64     `json:"msg_count"`
                                                                                                	MentionCount  int64     `json:"mention_count"`
                                                                                                	NotifyProps   StringMap `json:"notify_props"`
                                                                                                	LastUpdateAt  int64     `json:"last_update_at"`
                                                                                                	SchemeUser    bool      `json:"scheme_user"`
                                                                                                	SchemeAdmin   bool      `json:"scheme_admin"`
                                                                                                	ExplicitRoles string    `json:"explicit_roles"`
                                                                                                }

                                                                                                func ChannelMemberFromJson

                                                                                                func ChannelMemberFromJson(data io.Reader) *ChannelMember

                                                                                                func (*ChannelMember) GetRoles

                                                                                                func (o *ChannelMember) GetRoles() []string

                                                                                                func (*ChannelMember) IsValid

                                                                                                func (o *ChannelMember) IsValid() *AppError

                                                                                                func (*ChannelMember) PreSave

                                                                                                func (o *ChannelMember) PreSave()

                                                                                                func (*ChannelMember) PreUpdate

                                                                                                func (o *ChannelMember) PreUpdate()

                                                                                                func (*ChannelMember) ToJson

                                                                                                func (o *ChannelMember) ToJson() string

                                                                                                type ChannelMemberForExport

                                                                                                type ChannelMemberForExport struct {
                                                                                                	ChannelMember
                                                                                                	ChannelName string
                                                                                                	Username    string
                                                                                                }

                                                                                                type ChannelMemberHistory

                                                                                                type ChannelMemberHistory struct {
                                                                                                	ChannelId string
                                                                                                	UserId    string
                                                                                                	JoinTime  int64
                                                                                                	LeaveTime *int64
                                                                                                }

                                                                                                type ChannelMemberHistoryResult

                                                                                                type ChannelMemberHistoryResult struct {
                                                                                                	ChannelId string
                                                                                                	UserId    string
                                                                                                	JoinTime  int64
                                                                                                	LeaveTime *int64
                                                                                                
                                                                                                	// these two fields are never set in the database - when we SELECT, we join on Users to get them
                                                                                                	UserEmail string `db:"Email"`
                                                                                                	Username  string
                                                                                                }

                                                                                                type ChannelMembers

                                                                                                type ChannelMembers []ChannelMember

                                                                                                func ChannelMembersFromJson

                                                                                                func ChannelMembersFromJson(data io.Reader) *ChannelMembers

                                                                                                func (*ChannelMembers) ToJson

                                                                                                func (o *ChannelMembers) ToJson() string

                                                                                                type ChannelPatch

                                                                                                type ChannelPatch struct {
                                                                                                	DisplayName      *string `json:"display_name"`
                                                                                                	Name             *string `json:"name"`
                                                                                                	Header           *string `json:"header"`
                                                                                                	Purpose          *string `json:"purpose"`
                                                                                                	GroupConstrained *bool   `json:"group_constrained"`
                                                                                                }

                                                                                                func ChannelPatchFromJson

                                                                                                func ChannelPatchFromJson(data io.Reader) *ChannelPatch

                                                                                                func (*ChannelPatch) ToJson

                                                                                                func (o *ChannelPatch) ToJson() string

                                                                                                type ChannelSearch

                                                                                                type ChannelSearch struct {
                                                                                                	Term string `json:"term"`
                                                                                                }

                                                                                                func ChannelSearchFromJson

                                                                                                func ChannelSearchFromJson(data io.Reader) *ChannelSearch

                                                                                                  ChannelSearchFromJson will decode the input and return a Channel

                                                                                                  func (*ChannelSearch) ToJson

                                                                                                  func (c *ChannelSearch) ToJson() string

                                                                                                    ToJson convert a Channel to a json string

                                                                                                    type ChannelStats

                                                                                                    type ChannelStats struct {
                                                                                                    	ChannelId   string `json:"channel_id"`
                                                                                                    	MemberCount int64  `json:"member_count"`
                                                                                                    }

                                                                                                    func ChannelStatsFromJson

                                                                                                    func ChannelStatsFromJson(data io.Reader) *ChannelStats

                                                                                                    func (*ChannelStats) ToJson

                                                                                                    func (o *ChannelStats) ToJson() string

                                                                                                    type ChannelUnread

                                                                                                    type ChannelUnread struct {
                                                                                                    	TeamId       string    `json:"team_id"`
                                                                                                    	ChannelId    string    `json:"channel_id"`
                                                                                                    	MsgCount     int64     `json:"msg_count"`
                                                                                                    	MentionCount int64     `json:"mention_count"`
                                                                                                    	NotifyProps  StringMap `json:"-"`
                                                                                                    }

                                                                                                    func ChannelUnreadFromJson

                                                                                                    func ChannelUnreadFromJson(data io.Reader) *ChannelUnread

                                                                                                    func (*ChannelUnread) ToJson

                                                                                                    func (o *ChannelUnread) ToJson() string

                                                                                                    type ChannelView

                                                                                                    type ChannelView struct {
                                                                                                    	ChannelId     string `json:"channel_id"`
                                                                                                    	PrevChannelId string `json:"prev_channel_id"`
                                                                                                    }

                                                                                                    func ChannelViewFromJson

                                                                                                    func ChannelViewFromJson(data io.Reader) *ChannelView

                                                                                                    func (*ChannelView) ToJson

                                                                                                    func (o *ChannelView) ToJson() string

                                                                                                    type ChannelViewResponse

                                                                                                    type ChannelViewResponse struct {
                                                                                                    	Status            string           `json:"status"`
                                                                                                    	LastViewedAtTimes map[string]int64 `json:"last_viewed_at_times"`
                                                                                                    }

                                                                                                    func ChannelViewResponseFromJson

                                                                                                    func ChannelViewResponseFromJson(data io.Reader) *ChannelViewResponse

                                                                                                    func (*ChannelViewResponse) ToJson

                                                                                                    func (o *ChannelViewResponse) ToJson() string

                                                                                                    type ChannelWithTeamData

                                                                                                    type ChannelWithTeamData struct {
                                                                                                    	Channel
                                                                                                    	TeamDisplayName string `json:"team_display_name"`
                                                                                                    	TeamName        string `json:"team_name"`
                                                                                                    	TeamUpdateAt    int64  `json:"team_update_at"`
                                                                                                    }

                                                                                                    type Client4

                                                                                                    type Client4 struct {
                                                                                                    	Url        string       // The location of the server, for example  "http://localhost:8065"
                                                                                                    	ApiUrl     string       // The api location of the server, for example "http://localhost:8065/api/v4"
                                                                                                    	HttpClient *http.Client // The http client
                                                                                                    	AuthToken  string
                                                                                                    	AuthType   string
                                                                                                    	HttpHeader map[string]string // Headers to be copied over for each request
                                                                                                    }

                                                                                                    func NewAPIv4Client

                                                                                                    func NewAPIv4Client(url string) *Client4

                                                                                                    func (*Client4) AddChannelMember

                                                                                                    func (c *Client4) AddChannelMember(channelId, userId string) (*ChannelMember, *Response)

                                                                                                      AddChannelMember adds user to channel and return a channel member.

                                                                                                      func (*Client4) AddChannelMemberWithRootId

                                                                                                      func (c *Client4) AddChannelMemberWithRootId(channelId, userId, postRootId string) (*ChannelMember, *Response)

                                                                                                        AddChannelMemberWithRootId adds user to channel and return a channel member. Post add to channel message has the postRootId.

                                                                                                        func (*Client4) AddTeamMember

                                                                                                        func (c *Client4) AddTeamMember(teamId, userId string) (*TeamMember, *Response)

                                                                                                          AddTeamMember adds user to a team and return a team member.

                                                                                                          func (*Client4) AddTeamMemberFromInvite

                                                                                                          func (c *Client4) AddTeamMemberFromInvite(token, inviteId string) (*TeamMember, *Response)

                                                                                                            AddTeamMemberFromInvite adds a user to a team and return a team member using an invite id or an invite token/data pair.

                                                                                                            func (*Client4) AddTeamMembers

                                                                                                            func (c *Client4) AddTeamMembers(teamId string, userIds []string) ([]*TeamMember, *Response)

                                                                                                              AddTeamMembers adds a number of users to a team and returns the team members.

                                                                                                              func (*Client4) AssignBot

                                                                                                              func (c *Client4) AssignBot(botUserId, newOwnerId string) (*Bot, *Response)

                                                                                                                AssignBot assigns the given bot to the given user

                                                                                                                func (*Client4) AttachDeviceId

                                                                                                                func (c *Client4) AttachDeviceId(deviceId string) (bool, *Response)

                                                                                                                  AttachDeviceId attaches a mobile device ID to the current session.

                                                                                                                  func (*Client4) AuthorizeOAuthApp

                                                                                                                  func (c *Client4) AuthorizeOAuthApp(authRequest *AuthorizeRequest) (string, *Response)

                                                                                                                    AuthorizeOAuthApp will authorize an OAuth 2.0 client application to access a user's account and provide a redirect link to follow.

                                                                                                                    func (*Client4) AutocompleteChannelsForTeam

                                                                                                                    func (c *Client4) AutocompleteChannelsForTeam(teamId, name string) (*ChannelList, *Response)

                                                                                                                      AutocompleteChannelsForTeam will return an ordered list of channels autocomplete suggestions.

                                                                                                                      func (*Client4) AutocompleteChannelsForTeamForSearch

                                                                                                                      func (c *Client4) AutocompleteChannelsForTeamForSearch(teamId, name string) (*ChannelList, *Response)

                                                                                                                        AutocompleteChannelsForTeamForSearch will return an ordered list of your channels autocomplete suggestions.

                                                                                                                        func (*Client4) AutocompleteEmoji

                                                                                                                        func (c *Client4) AutocompleteEmoji(name string, etag string) ([]*Emoji, *Response)

                                                                                                                          AutocompleteEmoji returns a list of emoji starting with or matching name.

                                                                                                                          func (*Client4) AutocompleteUsers

                                                                                                                          func (c *Client4) AutocompleteUsers(username string, limit int, etag string) (*UserAutocomplete, *Response)

                                                                                                                            AutocompleteUsers returns the users in the system based on search term.

                                                                                                                            func (*Client4) AutocompleteUsersInChannel

                                                                                                                            func (c *Client4) AutocompleteUsersInChannel(teamId string, channelId string, username string, limit int, etag string) (*UserAutocomplete, *Response)

                                                                                                                              AutocompleteUsersInChannel returns the users in a channel based on search term.

                                                                                                                              func (*Client4) AutocompleteUsersInTeam

                                                                                                                              func (c *Client4) AutocompleteUsersInTeam(teamId string, username string, limit int, etag string) (*UserAutocomplete, *Response)

                                                                                                                                AutocompleteUsersInTeam returns the users on a team based on search term.

                                                                                                                                func (*Client4) CancelJob

                                                                                                                                func (c *Client4) CancelJob(jobId string) (bool, *Response)

                                                                                                                                  CancelJob requests the cancellation of the job with the provided Id.

                                                                                                                                  func (*Client4) CheckUserMfa

                                                                                                                                  func (c *Client4) CheckUserMfa(loginId string) (bool, *Response)

                                                                                                                                    CheckUserMfa checks whether a user has MFA active on their account or not based on the provided login id. Deprecated: Clients should use Login method and check for MFA Error

                                                                                                                                    func (*Client4) ClearOAuthToken

                                                                                                                                    func (c *Client4) ClearOAuthToken()

                                                                                                                                    func (*Client4) ConvertChannelToPrivate

                                                                                                                                    func (c *Client4) ConvertChannelToPrivate(channelId string) (*Channel, *Response)

                                                                                                                                      ConvertChannelToPrivate converts public to private channel.

                                                                                                                                      func (*Client4) CreateBot

                                                                                                                                      func (c *Client4) CreateBot(bot *Bot) (*Bot, *Response)

                                                                                                                                        CreateBot creates a bot in the system based on the provided bot struct.

                                                                                                                                        func (*Client4) CreateChannel

                                                                                                                                        func (c *Client4) CreateChannel(channel *Channel) (*Channel, *Response)

                                                                                                                                          CreateChannel creates a channel based on the provided channel struct.

                                                                                                                                          func (*Client4) CreateCommand

                                                                                                                                          func (c *Client4) CreateCommand(cmd *Command) (*Command, *Response)

                                                                                                                                            CreateCommand will create a new command if the user have the right permissions.

                                                                                                                                            func (*Client4) CreateComplianceReport

                                                                                                                                            func (c *Client4) CreateComplianceReport(report *Compliance) (*Compliance, *Response)

                                                                                                                                              CreateComplianceReport creates an incoming webhook for a channel.

                                                                                                                                              func (*Client4) CreateDirectChannel

                                                                                                                                              func (c *Client4) CreateDirectChannel(userId1, userId2 string) (*Channel, *Response)

                                                                                                                                                CreateDirectChannel creates a direct message channel based on the two user ids provided.

                                                                                                                                                func (*Client4) CreateEmoji

                                                                                                                                                func (c *Client4) CreateEmoji(emoji *Emoji, image []byte, filename string) (*Emoji, *Response)

                                                                                                                                                  CreateEmoji will save an emoji to the server if the current user has permission to do so. If successful, the provided emoji will be returned with its Id field filled in. Otherwise, an error will be returned.

                                                                                                                                                  func (*Client4) CreateGroupChannel

                                                                                                                                                  func (c *Client4) CreateGroupChannel(userIds []string) (*Channel, *Response)

                                                                                                                                                    CreateGroupChannel creates a group message channel based on userIds provided.

                                                                                                                                                    func (*Client4) CreateIncomingWebhook

                                                                                                                                                    func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)

                                                                                                                                                      CreateIncomingWebhook creates an incoming webhook for a channel.

                                                                                                                                                      func (*Client4) CreateJob

                                                                                                                                                      func (c *Client4) CreateJob(job *Job) (*Job, *Response)

                                                                                                                                                        CreateJob creates a job based on the provided job struct.

                                                                                                                                                        func (*Client4) CreateOAuthApp

                                                                                                                                                        func (c *Client4) CreateOAuthApp(app *OAuthApp) (*OAuthApp, *Response)

                                                                                                                                                          CreateOAuthApp will register a new OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service provider.

                                                                                                                                                          func (*Client4) CreateOutgoingWebhook

                                                                                                                                                          func (c *Client4) CreateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)

                                                                                                                                                            CreateOutgoingWebhook creates an outgoing webhook for a team or channel.

                                                                                                                                                            func (*Client4) CreatePost

                                                                                                                                                            func (c *Client4) CreatePost(post *Post) (*Post, *Response)

                                                                                                                                                              CreatePost creates a post based on the provided post struct.

                                                                                                                                                              func (*Client4) CreatePostEphemeral

                                                                                                                                                              func (c *Client4) CreatePostEphemeral(post *PostEphemeral) (*Post, *Response)

                                                                                                                                                                CreatePostEphemeral creates a ephemeral post based on the provided post struct which is send to the given user id.

                                                                                                                                                                func (*Client4) CreateScheme

                                                                                                                                                                func (c *Client4) CreateScheme(scheme *Scheme) (*Scheme, *Response)

                                                                                                                                                                  CreateScheme creates a new Scheme.

                                                                                                                                                                  func (*Client4) CreateTeam

                                                                                                                                                                  func (c *Client4) CreateTeam(team *Team) (*Team, *Response)

                                                                                                                                                                    CreateTeam creates a team in the system based on the provided team struct.

                                                                                                                                                                    func (*Client4) CreateTermsOfService

                                                                                                                                                                    func (c *Client4) CreateTermsOfService(text, userId string) (*TermsOfService, *Response)

                                                                                                                                                                      CreateTermsOfService creates new terms of service.

                                                                                                                                                                      func (*Client4) CreateUser

                                                                                                                                                                      func (c *Client4) CreateUser(user *User) (*User, *Response)

                                                                                                                                                                        CreateUser creates a user in the system based on the provided user struct.

                                                                                                                                                                        func (*Client4) CreateUserAccessToken

                                                                                                                                                                        func (c *Client4) CreateUserAccessToken(userId, description string) (*UserAccessToken, *Response)

                                                                                                                                                                          CreateUserAccessToken will generate a user access token that can be used in place of a session token to access the REST API. Must have the 'create_user_access_token' permission and if generating for another user, must have the 'edit_other_users' permission. A non-blank description is required.

                                                                                                                                                                          func (*Client4) CreateUserWithInviteId

                                                                                                                                                                          func (c *Client4) CreateUserWithInviteId(user *User, inviteId string) (*User, *Response)

                                                                                                                                                                            CreateUserWithInviteId creates a user in the system based on the provided invited id.

                                                                                                                                                                            func (*Client4) CreateUserWithToken

                                                                                                                                                                            func (c *Client4) CreateUserWithToken(user *User, tokenId string) (*User, *Response)

                                                                                                                                                                              CreateUserWithToken creates a user in the system based on the provided tokenId.

                                                                                                                                                                              func (*Client4) DatabaseRecycle

                                                                                                                                                                              func (c *Client4) DatabaseRecycle() (bool, *Response)

                                                                                                                                                                                DatabaseRecycle will recycle the connections. Discard current connection and get new one.

                                                                                                                                                                                func (*Client4) DeauthorizeOAuthApp

                                                                                                                                                                                func (c *Client4) DeauthorizeOAuthApp(appId string) (bool, *Response)

                                                                                                                                                                                  DeauthorizeOAuthApp will deauthorize an OAuth 2.0 client application from accessing a user's account.

                                                                                                                                                                                  func (*Client4) DeleteBrandImage

                                                                                                                                                                                  func (c *Client4) DeleteBrandImage() *Response

                                                                                                                                                                                    DeleteBrandImage delets the brand image for the system.

                                                                                                                                                                                    func (*Client4) DeleteChannel

                                                                                                                                                                                    func (c *Client4) DeleteChannel(channelId string) (bool, *Response)

                                                                                                                                                                                      DeleteChannel deletes channel based on the provided channel id string.

                                                                                                                                                                                      func (*Client4) DeleteCommand

                                                                                                                                                                                      func (c *Client4) DeleteCommand(commandId string) (bool, *Response)

                                                                                                                                                                                        DeleteCommand deletes a command based on the provided command id string.

                                                                                                                                                                                        func (*Client4) DeleteEmoji

                                                                                                                                                                                        func (c *Client4) DeleteEmoji(emojiId string) (bool, *Response)

                                                                                                                                                                                          DeleteEmoji delete an custom emoji on the provided emoji id string.

                                                                                                                                                                                          func (*Client4) DeleteIncomingWebhook

                                                                                                                                                                                          func (c *Client4) DeleteIncomingWebhook(hookID string) (bool, *Response)

                                                                                                                                                                                            DeleteIncomingWebhook deletes and Incoming Webhook given the hook ID.

                                                                                                                                                                                            func (*Client4) DeleteOAuthApp

                                                                                                                                                                                            func (c *Client4) DeleteOAuthApp(appId string) (bool, *Response)

                                                                                                                                                                                              DeleteOAuthApp deletes a registered OAuth 2.0 client application.

                                                                                                                                                                                              func (*Client4) DeleteOutgoingWebhook

                                                                                                                                                                                              func (c *Client4) DeleteOutgoingWebhook(hookId string) (bool, *Response)

                                                                                                                                                                                                DeleteOutgoingWebhook delete the outgoing webhook on the system requested by Hook Id.

                                                                                                                                                                                                func (*Client4) DeletePost

                                                                                                                                                                                                func (c *Client4) DeletePost(postId string) (bool, *Response)

                                                                                                                                                                                                  DeletePost deletes a post from the provided post id string.

                                                                                                                                                                                                  func (*Client4) DeletePreferences

                                                                                                                                                                                                  func (c *Client4) DeletePreferences(userId string, preferences *Preferences) (bool, *Response)

                                                                                                                                                                                                    DeletePreferences deletes the user's preferences.

                                                                                                                                                                                                    func (*Client4) DeleteReaction

                                                                                                                                                                                                    func (c *Client4) DeleteReaction(reaction *Reaction) (bool, *Response)

                                                                                                                                                                                                      DeleteReaction deletes reaction of a user in a post.

                                                                                                                                                                                                      func (*Client4) DeleteSamlIdpCertificate

                                                                                                                                                                                                      func (c *Client4) DeleteSamlIdpCertificate() (bool, *Response)

                                                                                                                                                                                                        DeleteSamlIdpCertificate deletes the SAML IDP certificate from the server and updates the config to not use it and disable SAML.

                                                                                                                                                                                                        func (*Client4) DeleteSamlPrivateCertificate

                                                                                                                                                                                                        func (c *Client4) DeleteSamlPrivateCertificate() (bool, *Response)

                                                                                                                                                                                                          DeleteSamlPrivateCertificate deletes the SAML IDP certificate from the server and updates the config to not use it and disable SAML.

                                                                                                                                                                                                          func (*Client4) DeleteSamlPublicCertificate

                                                                                                                                                                                                          func (c *Client4) DeleteSamlPublicCertificate() (bool, *Response)

                                                                                                                                                                                                            DeleteSamlPublicCertificate deletes the SAML IDP certificate from the server and updates the config to not use it and disable SAML.

                                                                                                                                                                                                            func (*Client4) DeleteScheme

                                                                                                                                                                                                            func (c *Client4) DeleteScheme(id string) (bool, *Response)

                                                                                                                                                                                                              DeleteScheme deletes a single scheme by ID.

                                                                                                                                                                                                              func (*Client4) DeleteUser

                                                                                                                                                                                                              func (c *Client4) DeleteUser(userId string) (bool, *Response)

                                                                                                                                                                                                                DeleteUser deactivates a user in the system based on the provided user id string.

                                                                                                                                                                                                                func (*Client4) DisableBot

                                                                                                                                                                                                                func (c *Client4) DisableBot(botUserId string) (*Bot, *Response)

                                                                                                                                                                                                                  DisableBot disables the given bot in the system.

                                                                                                                                                                                                                  func (*Client4) DisablePlugin

                                                                                                                                                                                                                  func (c *Client4) DisablePlugin(id string) (bool, *Response)

                                                                                                                                                                                                                    DisablePlugin will disable an enabled plugin. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.

                                                                                                                                                                                                                    func (*Client4) DisableUserAccessToken

                                                                                                                                                                                                                    func (c *Client4) DisableUserAccessToken(tokenId string) (bool, *Response)

                                                                                                                                                                                                                      DisableUserAccessToken will disable a user access token by id. Must have the 'revoke_user_access_token' permission and if disabling for another user, must have the 'edit_other_users' permission.

                                                                                                                                                                                                                      func (*Client4) DoApiDelete

                                                                                                                                                                                                                      func (c *Client4) DoApiDelete(url string) (*http.Response, *AppError)

                                                                                                                                                                                                                      func (*Client4) DoApiGet

                                                                                                                                                                                                                      func (c *Client4) DoApiGet(url string, etag string) (*http.Response, *AppError)

                                                                                                                                                                                                                      func (*Client4) DoApiPost

                                                                                                                                                                                                                      func (c *Client4) DoApiPost(url string, data string) (*http.Response, *AppError)

                                                                                                                                                                                                                      func (*Client4) DoApiPut

                                                                                                                                                                                                                      func (c *Client4) DoApiPut(url string, data string) (*http.Response, *AppError)

                                                                                                                                                                                                                      func (*Client4) DoApiRequest

                                                                                                                                                                                                                      func (c *Client4) DoApiRequest(method, url, data, etag string) (*http.Response, *AppError)

                                                                                                                                                                                                                      func (*Client4) DoEmojiUploadFile

                                                                                                                                                                                                                      func (c *Client4) DoEmojiUploadFile(url string, data []byte, contentType string) (*Emoji, *Response)

                                                                                                                                                                                                                      func (*Client4) DoPostAction

                                                                                                                                                                                                                      func (c *Client4) DoPostAction(postId, actionId string) (bool, *Response)

                                                                                                                                                                                                                        DoPostAction performs a post action.

                                                                                                                                                                                                                        func (*Client4) DoPostActionWithCookie

                                                                                                                                                                                                                        func (c *Client4) DoPostActionWithCookie(postId, actionId, selected, cookieStr string) (bool, *Response)

                                                                                                                                                                                                                          DoPostActionWithCookie performs a post action with extra arguments

                                                                                                                                                                                                                          func (*Client4) DoUploadFile

                                                                                                                                                                                                                          func (c *Client4) DoUploadFile(url string, data []byte, contentType string) (*FileUploadResponse, *Response)

                                                                                                                                                                                                                          func (*Client4) DoUploadImportTeam

                                                                                                                                                                                                                          func (c *Client4) DoUploadImportTeam(url string, data []byte, contentType string) (map[string]string, *Response)

                                                                                                                                                                                                                          func (*Client4) DownloadComplianceReport

                                                                                                                                                                                                                          func (c *Client4) DownloadComplianceReport(reportId string) ([]byte, *Response)

                                                                                                                                                                                                                            DownloadComplianceReport returns a full compliance report as a file.

                                                                                                                                                                                                                            func (*Client4) DownloadFile

                                                                                                                                                                                                                            func (c *Client4) DownloadFile(fileId string, download bool) ([]byte, *Response)

                                                                                                                                                                                                                              DownloadFile gets the bytes for a file by id, optionally adding headers to force the browser to download it.

                                                                                                                                                                                                                              func (*Client4) DownloadFilePreview

                                                                                                                                                                                                                              func (c *Client4) DownloadFilePreview(fileId string, download bool) ([]byte, *Response)

                                                                                                                                                                                                                                DownloadFilePreview gets the bytes for a file by id.

                                                                                                                                                                                                                                func (*Client4) DownloadFileThumbnail

                                                                                                                                                                                                                                func (c *Client4) DownloadFileThumbnail(fileId string, download bool) ([]byte, *Response)

                                                                                                                                                                                                                                  DownloadFileThumbnail gets the bytes for a file by id, optionally adding headers to force the browser to download it.

                                                                                                                                                                                                                                  func (*Client4) EnableBot

                                                                                                                                                                                                                                  func (c *Client4) EnableBot(botUserId string) (*Bot, *Response)

                                                                                                                                                                                                                                    EnableBot disables the given bot in the system.

                                                                                                                                                                                                                                    func (*Client4) EnablePlugin

                                                                                                                                                                                                                                    func (c *Client4) EnablePlugin(id string) (bool, *Response)

                                                                                                                                                                                                                                      EnablePlugin will enable an plugin installed. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.

                                                                                                                                                                                                                                      func (*Client4) EnableUserAccessToken

                                                                                                                                                                                                                                      func (c *Client4) EnableUserAccessToken(tokenId string) (bool, *Response)

                                                                                                                                                                                                                                        EnableUserAccessToken will enable a user access token by id. Must have the 'create_user_access_token' permission and if enabling for another user, must have the 'edit_other_users' permission.

                                                                                                                                                                                                                                        func (*Client4) ExecuteCommand

                                                                                                                                                                                                                                        func (c *Client4) ExecuteCommand(channelId, command string) (*CommandResponse, *Response)

                                                                                                                                                                                                                                          ExecuteCommand executes a given slash command.

                                                                                                                                                                                                                                          func (*Client4) ExecuteCommandWithTeam

                                                                                                                                                                                                                                          func (c *Client4) ExecuteCommandWithTeam(channelId, teamId, command string) (*CommandResponse, *Response)

                                                                                                                                                                                                                                            ExecuteCommandWithTeam executes a given slash command against the specified team. Use this when executing slash commands in a DM/GM, since the team id cannot be inferred in that case.

                                                                                                                                                                                                                                            func (*Client4) GenerateMfaSecret

                                                                                                                                                                                                                                            func (c *Client4) GenerateMfaSecret(userId string) (*MfaSecret, *Response)

                                                                                                                                                                                                                                              GenerateMfaSecret will generate a new MFA secret for a user and return it as a string and as a base64 encoded image QR code.

                                                                                                                                                                                                                                              func (*Client4) GetAllChannels

                                                                                                                                                                                                                                              func (c *Client4) GetAllChannels(page int, perPage int, etag string) (*ChannelListWithTeamData, *Response)

                                                                                                                                                                                                                                                GetAllChannels get all the channels. Must be a system administrator.

                                                                                                                                                                                                                                                func (*Client4) GetAllTeams

                                                                                                                                                                                                                                                func (c *Client4) GetAllTeams(etag string, page int, perPage int) ([]*Team, *Response)

                                                                                                                                                                                                                                                  GetAllTeams returns all teams based on permissions.

                                                                                                                                                                                                                                                  func (*Client4) GetAnalyticsOld

                                                                                                                                                                                                                                                  func (c *Client4) GetAnalyticsOld(name, teamId string) (AnalyticsRows, *Response)

                                                                                                                                                                                                                                                    GetAnalyticsOld will retrieve analytics using the old format. New format is not available but the "/analytics" endpoint is reserved for it. The "name" argument is optional and defaults to "standard". The "teamId" argument is optional and will limit results to a specific team.

                                                                                                                                                                                                                                                    func (*Client4) GetAnalyticsRoute

                                                                                                                                                                                                                                                    func (c *Client4) GetAnalyticsRoute() string

                                                                                                                                                                                                                                                    func (*Client4) GetAudits

                                                                                                                                                                                                                                                    func (c *Client4) GetAudits(page int, perPage int, etag string) (Audits, *Response)

                                                                                                                                                                                                                                                      GetAudits returns a list of audits for the whole system.

                                                                                                                                                                                                                                                      func (*Client4) GetAuthorizedOAuthAppsForUser

                                                                                                                                                                                                                                                      func (c *Client4) GetAuthorizedOAuthAppsForUser(userId string, page, perPage int) ([]*OAuthApp, *Response)

                                                                                                                                                                                                                                                        GetAuthorizedOAuthAppsForUser gets a page of OAuth 2.0 client applications the user has authorized to use access their account.

                                                                                                                                                                                                                                                        func (*Client4) GetBot

                                                                                                                                                                                                                                                        func (c *Client4) GetBot(userId string, etag string) (*Bot, *Response)

                                                                                                                                                                                                                                                          GetBot fetches the given, undeleted bot.

                                                                                                                                                                                                                                                          func (*Client4) GetBotIncludeDeleted

                                                                                                                                                                                                                                                          func (c *Client4) GetBotIncludeDeleted(userId string, etag string) (*Bot, *Response)

                                                                                                                                                                                                                                                            GetBot fetches the given bot, even if it is deleted.

                                                                                                                                                                                                                                                            func (*Client4) GetBotRoute

                                                                                                                                                                                                                                                            func (c *Client4) GetBotRoute(botUserId string) string

                                                                                                                                                                                                                                                            func (*Client4) GetBots

                                                                                                                                                                                                                                                            func (c *Client4) GetBots(page, perPage int, etag string) ([]*Bot, *Response)

                                                                                                                                                                                                                                                              GetBots fetches the given page of bots, excluding deleted.

                                                                                                                                                                                                                                                              func (*Client4) GetBotsIncludeDeleted

                                                                                                                                                                                                                                                              func (c *Client4) GetBotsIncludeDeleted(page, perPage int, etag string) ([]*Bot, *Response)

                                                                                                                                                                                                                                                                GetBotsIncludeDeleted fetches the given page of bots, including deleted.

                                                                                                                                                                                                                                                                func (*Client4) GetBotsOrphaned

                                                                                                                                                                                                                                                                func (c *Client4) GetBotsOrphaned(page, perPage int, etag string) ([]*Bot, *Response)

                                                                                                                                                                                                                                                                  GetBotsOrphaned fetches the given page of bots, only including orphanded bots.

                                                                                                                                                                                                                                                                  func (*Client4) GetBotsRoute

                                                                                                                                                                                                                                                                  func (c *Client4) GetBotsRoute() string

                                                                                                                                                                                                                                                                  func (*Client4) GetBrandImage

                                                                                                                                                                                                                                                                  func (c *Client4) GetBrandImage() ([]byte, *Response)

                                                                                                                                                                                                                                                                    GetBrandImage retrieves the previously uploaded brand image.

                                                                                                                                                                                                                                                                    func (*Client4) GetBrandRoute

                                                                                                                                                                                                                                                                    func (c *Client4) GetBrandRoute() string

                                                                                                                                                                                                                                                                    func (*Client4) GetBulkReactions

                                                                                                                                                                                                                                                                    func (c *Client4) GetBulkReactions(postIds []string) (map[string][]*Reaction, *Response)

                                                                                                                                                                                                                                                                      FetchBulkReactions returns a map of postIds and corresponding reactions

                                                                                                                                                                                                                                                                      func (*Client4) GetCacheRoute

                                                                                                                                                                                                                                                                      func (c *Client4) GetCacheRoute() string

                                                                                                                                                                                                                                                                      func (*Client4) GetChannel

                                                                                                                                                                                                                                                                      func (c *Client4) GetChannel(channelId, etag string) (*Channel, *Response)

                                                                                                                                                                                                                                                                        GetChannel returns a channel based on the provided channel id string.

                                                                                                                                                                                                                                                                        func (*Client4) GetChannelByName

                                                                                                                                                                                                                                                                        func (c *Client4) GetChannelByName(channelName, teamId string, etag string) (*Channel, *Response)

                                                                                                                                                                                                                                                                          GetChannelByName returns a channel based on the provided channel name and team id strings.

                                                                                                                                                                                                                                                                          func (*Client4) GetChannelByNameForTeamName

                                                                                                                                                                                                                                                                          func (c *Client4) GetChannelByNameForTeamName(channelName, teamName string, etag string) (*Channel, *Response)

                                                                                                                                                                                                                                                                            GetChannelByNameForTeamName returns a channel based on the provided channel name and team name strings.

                                                                                                                                                                                                                                                                            func (*Client4) GetChannelByNameForTeamNameIncludeDeleted

                                                                                                                                                                                                                                                                            func (c *Client4) GetChannelByNameForTeamNameIncludeDeleted(channelName, teamName string, etag string) (*Channel, *Response)

                                                                                                                                                                                                                                                                              GetChannelByNameForTeamNameIncludeDeleted returns a channel based on the provided channel name and team name strings. Other then GetChannelByNameForTeamName it will also return deleted channels.

                                                                                                                                                                                                                                                                              func (*Client4) GetChannelByNameForTeamNameRoute

                                                                                                                                                                                                                                                                              func (c *Client4) GetChannelByNameForTeamNameRoute(channelName, teamName string) string

                                                                                                                                                                                                                                                                              func (*Client4) GetChannelByNameIncludeDeleted

                                                                                                                                                                                                                                                                              func (c *Client4) GetChannelByNameIncludeDeleted(channelName, teamId string, etag string) (*Channel, *Response)

                                                                                                                                                                                                                                                                                GetChannelByNameIncludeDeleted returns a channel based on the provided channel name and team id strings. Other then GetChannelByName it will also return deleted channels.

                                                                                                                                                                                                                                                                                func (*Client4) GetChannelByNameRoute

                                                                                                                                                                                                                                                                                func (c *Client4) GetChannelByNameRoute(channelName, teamId string) string

                                                                                                                                                                                                                                                                                func (*Client4) GetChannelMember

                                                                                                                                                                                                                                                                                func (c *Client4) GetChannelMember(channelId, userId, etag string) (*ChannelMember, *Response)

                                                                                                                                                                                                                                                                                  GetChannelMember gets a channel member.

                                                                                                                                                                                                                                                                                  func (*Client4) GetChannelMemberRoute

                                                                                                                                                                                                                                                                                  func (c *Client4) GetChannelMemberRoute(channelId, userId string) string