Documentation ¶
Index ¶
- Constants
- Variables
- func AppErrorInit(t goi18n.TranslateFunc)
- func ArrayFromInterface(data interface{}) []string
- func ArrayFromJson(data io.Reader) []string
- func ArrayToJson(objmap []string) string
- func AsStringBoolMap(list []string) map[string]bool
- func BranchListToJson(t []*Branch) string
- func BranchMapFromJson(data io.Reader) map[string]*Branch
- func BranchMapToJson(u map[string]*Branch) string
- func BranchMemberWithErrorToString(o *BranchMemberWithError) string
- func BranchMembersToJson(o []*BranchMember) string
- func BranchMembersWithErrorToJson(o []*BranchMemberWithError) string
- func BranchesWithCountToJson(tlc *BranchesWithCount) []byte
- func CheckStatusOK(r *http.Response) bool
- func CleanBranchName(s string) string
- func CleanUsername(s string) string
- func ClearMentionTags(post string) string
- func ClusterInfosToJson(objmap []*ClusterInfo) string
- func CommandListToJson(l []*Command) string
- func ComparePassword(hash string, password string) bool
- func CompliancePostHeader() []string
- func CopyStringMap(originalMap map[string]string) map[string]string
- func EmojiListToJson(emojiList []*Emoji) string
- func Etag(parts ...interface{}) string
- func FileInfosToJson(infos []*FileInfo) string
- func FloorToNearestHour(ms int64) int64
- func GenerateLinkMetadataHash(url string, timestamp int64) int64
- func GeneratePassword(minimumLength int) string
- func GetDMNameFromIds(userId1, userId2 string) string
- func GetEndOfDayMillis(thisTime time.Time, timeZoneOffset int) int64
- func GetEtagForFileInfos(infos []*FileInfo) string
- func GetGroupDisplayNameFromUsers(users []*User, truncate bool) string
- func GetGroupNameFromUserIds(userIds []string) string
- func GetImageMimeType(ext string) string
- func GetInfoForBytes(name string, data []byte) (*FileInfo, *AppError)
- func GetMillis() int64
- func GetMillisForTime(thisTime time.Time) int64
- func GetPreferredTimezone(timezone StringMap) string
- func GetPreviousVersion(version string) string
- func GetServerIpAddress(iface string) string
- func GetStartOfDayMillis(thisTime time.Time, timeZoneOffset int) int64
- func GetSystemEmojiId(emojiName string) (string, bool)
- func HashPassword(password string) string
- func IncomingWebhookListToJson(l []*IncomingWebhook) string
- func IncomingWebhookRequestFromJson(data io.Reader) (*IncomingWebhookRequest, *AppError)
- func IsClassNotifyLevelValid(notifyLevel string) bool
- func IsCurrentVersion(versionToCheck string) bool
- func IsDomainName(s string) bool
- func IsFileExtImage(ext string) bool
- func IsIgnoreClassMentionsValid(ignoreClassMentions string) bool
- func IsInRole(userRoles string, inRole string) bool
- func IsLower(s string) bool
- func IsPreviousVersionsSupported(versionToCheck string) bool
- func IsReservedBranchName(s string) bool
- func IsSafeLink(link *string) bool
- func IsSamlFile(saml *SamlSettings, filename string) bool
- func IsSendEmailValid(sendEmail string) bool
- func IsValidAlphaNum(s string) bool
- func IsValidAlphaNumHyphenUnderscore(s string, withFormat bool) bool
- func IsValidBranchName(s string) bool
- func IsValidClassIdentifier(s string) bool
- func IsValidCommentsNotifyLevel(notifyLevel string) bool
- func IsValidEmail(email string) bool
- func IsValidEmailBatchingInterval(emailInterval string) bool
- func IsValidHttpUrl(rawUrl string) bool
- func IsValidId(value string) bool
- func IsValidLocale(locale string) bool
- func IsValidNumberString(value string) bool
- func IsValidPushStatusNotifyLevel(notifyLevel string) bool
- func IsValidRoleName(roleName string) bool
- func IsValidSchemeName(name string) bool
- func IsValidTrueOrFalseString(value string) bool
- func IsValidTurnOrStunServer(rawUri string) bool
- func IsValidUserRoles(userRoles string) bool
- func IsValidUsername(s string) bool
- func IsValidWebsocketUrl(rawUrl string) bool
- func JobsToJson(jobs []*Job) string
- func MakeDefaultRoles() map[string]*Role
- func MapBoolFromJson(data io.Reader) map[string]bool
- func MapBoolToJson(objmap map[string]bool) string
- func MapFromJson(data io.Reader) map[string]string
- func MapPostIdToReactionsFromJson(data io.Reader) map[string][]*Reaction
- func MapPostIdToReactionsToJson(o map[string][]*Reaction) string
- func MapToJson(objmap map[string]string) string
- func NewBool(b bool) *bool
- func NewId() string
- func NewInt(n int) *int
- func NewInt64(n int64) *int64
- func NewRandomString(length int) string
- func NewString(s string) *string
- func NewWebSocketClient(url, authToken string) (*WebSocketClient, *AppError)
- func NewWebSocketClient4(url, authToken string) (*WebSocketClient, *AppError)
- func NewWebSocketClient4WithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)
- func NewWebSocketClientWithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)
- func NormalizeEmail(email string) string
- func NormalizeUsername(username string) string
- func OAuthAppListToJson(l []*OAuthApp) string
- func OutgoingWebhookListToJson(l []*OutgoingWebhook) string
- func PadDateStringZeros(dateString string) string
- func ParseHashtags(text string) (string, string)
- func PermissionsChangedByPatch(role *Role, patch *RolePatch) []string
- func PossibleAtMentions(message string) []string
- func ReactionsToJson(o []*Reaction) string
- func RemoveDuplicateStrings(in []string) []string
- func RoleListToJson(r []*Role) string
- func SchemeIDFromJson(data io.Reader) *string
- func SchemesToJson(schemes []*Scheme) string
- func SessionsToJson(o []*Session) string
- func SplitVersion(version string) (int64, int64, int64)
- func StatusListToJson(u []*Status) string
- func StatusMapToInterfaceMap(statusMap map[string]*Status) map[string]interface{}
- func StringFromJson(data io.Reader) string
- func StringInterfaceFromJson(data io.Reader) map[string]interface{}
- func StringInterfaceToJson(objmap map[string]interface{}) string
- func StringToJson(s string) string
- func TrimUsernameSpecialChar(word string) (string, bool)
- func TruncateOpenGraph(ogdata *opengraph.OpenGraph) *opengraph.OpenGraph
- func UserAccessTokenListToJson(t []*UserAccessToken) string
- func UserListToJson(u []*User) string
- func UserMapFromJson(data io.Reader) map[string]*User
- func UserMapToJson(u map[string]*User) string
- type AccessData
- type AccessResponse
- type AnalyticsRow
- type AnalyticsRows
- type AnalyticsSettings
- type AnnouncementSettings
- type AppError
- func AppErrorFromJson(data io.Reader) *AppError
- func InvalidTermsOfServiceError(fieldName string, termsOfServiceId string) *AppError
- func InvalidUserError(fieldName string, userId string) *AppError
- func InvalidUserTermsOfServiceError(fieldName string, userTermsOfServiceId string) *AppError
- func IsValidEmojiName(name string) *AppError
- func NewAppError(where string, id string, params map[string]interface{}, details string, ...) *AppError
- type Attribute
- type AttributeValue
- type Audit
- type Audits
- type AuthData
- type AuthorizeRequest
- type Branch
- type BranchForExport
- type BranchMember
- type BranchMemberForExport
- type BranchMemberWithError
- type BranchMembersGetOptions
- type BranchPatch
- type BranchSettings
- type BranchesWithCount
- type ChannelMentionMap
- type Class
- func (o *Class) AddProp(key string, value interface{})
- func (o *Class) DeepCopy() *Class
- func (o *Class) Etag() string
- func (o *Class) GetOtherUserIdForDM(userId string) string
- func (o *Class) IsValid() *AppError
- func (o *Class) MakeNonNil()
- func (o *Class) Patch(patch *ClassPatch)
- func (o *Class) PreSave()
- func (o *Class) PreUpdate()
- func (o *Class) ToJson() string
- type ClassForExport
- type ClassList
- type ClassListWithBranchData
- type ClassMember
- type ClassMemberForExport
- type ClassMembers
- type ClassModeratedRole
- type ClassModeratedRoles
- type ClassModeratedRolesPatch
- type ClassModeration
- type ClassModerationPatch
- type ClassPatch
- type ClassSearchOpts
- type ClassWithBranchData
- type ClassesWithCount
- type Client4
- func (c *Client4) AttachDeviceId(deviceId string) (bool, *Response)
- func (c *Client4) AuthorizeOAuthApp(authRequest *AuthorizeRequest) (string, *Response)
- func (c *Client4) AutocompleteEmoji(name string, etag string) ([]*Emoji, *Response)
- func (c *Client4) AutocompleteUsers(username string, limit int, etag string) (*UserAutocomplete, *Response)
- func (c *Client4) AutocompleteUsersInChannel(teamId string, channelId string, username string, limit int, etag string) (*UserAutocomplete, *Response)
- func (c *Client4) AutocompleteUsersInTeam(teamId string, username string, limit int, etag string) (*UserAutocomplete, *Response)
- func (c *Client4) CancelJob(jobId string) (bool, *Response)
- func (c *Client4) CheckUserMfa(loginId string) (bool, *Response)
- func (c *Client4) ClearOAuthToken()
- func (c *Client4) ClearServerBusy() (bool, *Response)
- func (c *Client4) CreateCommand(cmd *Command) (*Command, *Response)
- func (c *Client4) CreateComplianceReport(report *Compliance) (*Compliance, *Response)
- func (c *Client4) CreateEmoji(emoji *Emoji, image []byte, filename string) (*Emoji, *Response)
- func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
- func (c *Client4) CreateJob(job *Job) (*Job, *Response)
- func (c *Client4) CreateOAuthApp(app *OAuthApp) (*OAuthApp, *Response)
- func (c *Client4) CreateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
- func (c *Client4) CreateScheme(scheme *Scheme) (*Scheme, *Response)
- func (c *Client4) CreateTermsOfService(text, userId string) (*TermsOfService, *Response)
- func (c *Client4) CreateUser(user *User) (*User, *Response)
- func (c *Client4) CreateUserAccessToken(userId, description string) (*UserAccessToken, *Response)
- func (c *Client4) CreateUserWithInviteId(user *User, inviteId string) (*User, *Response)
- func (c *Client4) CreateUserWithToken(user *User, tokenId string) (*User, *Response)
- func (c *Client4) DatabaseRecycle() (bool, *Response)
- func (c *Client4) DeauthorizeOAuthApp(appId string) (bool, *Response)
- func (c *Client4) DeleteBrandImage() *Response
- func (c *Client4) DeleteCommand(commandId string) (bool, *Response)
- func (c *Client4) DeleteEmoji(emojiId string) (bool, *Response)
- func (c *Client4) DeleteIncomingWebhook(hookID string) (bool, *Response)
- func (c *Client4) DeleteOAuthApp(appId string) (bool, *Response)
- func (c *Client4) DeleteOutgoingWebhook(hookId string) (bool, *Response)
- func (c *Client4) DeletePreferences(userId string, preferences *Preferences) (bool, *Response)
- func (c *Client4) DeleteReaction(reaction *Reaction) (bool, *Response)
- func (c *Client4) DeleteSamlIdpCertificate() (bool, *Response)
- func (c *Client4) DeleteSamlPrivateCertificate() (bool, *Response)
- func (c *Client4) DeleteSamlPublicCertificate() (bool, *Response)
- func (c *Client4) DeleteScheme(id string) (bool, *Response)
- func (c *Client4) DeleteUser(userId string) (bool, *Response)
- func (c *Client4) DemoteUserToGuest(guestId string) (bool, *Response)
- func (c *Client4) DisableUserAccessToken(tokenId string) (bool, *Response)
- func (c *Client4) DoApiDelete(url string) (*http.Response, *AppError)
- func (c *Client4) DoApiGet(url string, etag string) (*http.Response, *AppError)
- func (c *Client4) DoApiPost(url string, data string) (*http.Response, *AppError)
- func (c *Client4) DoApiPut(url string, data string) (*http.Response, *AppError)
- func (c *Client4) DoApiRequest(method, url, data, etag string) (*http.Response, *AppError)
- func (c *Client4) DoEmojiUploadFile(url string, data []byte, contentType string) (*Emoji, *Response)
- func (c *Client4) DoUploadFile(url string, data []byte, contentType string) (*FileUploadResponse, *Response)
- func (c *Client4) DoUploadImportTeam(url string, data []byte, contentType string) (map[string]string, *Response)
- func (c *Client4) DownloadComplianceReport(reportId string) ([]byte, *Response)
- func (c *Client4) DownloadFile(fileId string, download bool) ([]byte, *Response)
- func (c *Client4) DownloadFilePreview(fileId string, download bool) ([]byte, *Response)
- func (c *Client4) DownloadFileThumbnail(fileId string, download bool) ([]byte, *Response)
- func (c *Client4) EnableUserAccessToken(tokenId string) (bool, *Response)
- func (c *Client4) GenerateMfaSecret(userId string) (*MfaSecret, *Response)
- func (c *Client4) GetAnalyticsOld(name, teamId string) (AnalyticsRows, *Response)
- func (c *Client4) GetAnalyticsRoute() string
- func (c *Client4) GetAudits(page int, perPage int, etag string) (Audits, *Response)
- func (c *Client4) GetAuthorizedOAuthAppsForUser(userId string, page, perPage int) ([]*OAuthApp, *Response)
- func (c *Client4) GetBotRoute(botUserId string) string
- func (c *Client4) GetBotsRoute() string
- func (c *Client4) GetBrandImage() ([]byte, *Response)
- func (c *Client4) GetBrandRoute() string
- func (c *Client4) GetBulkReactions(postIds []string) (map[string][]*Reaction, *Response)
- func (c *Client4) GetCacheRoute() string
- func (c *Client4) GetChannelByNameForTeamNameRoute(channelName, teamName string) string
- func (c *Client4) GetChannelByNameRoute(channelName, teamId string) string
- func (c *Client4) GetChannelMemberRoute(channelId, userId string) string
- func (c *Client4) GetChannelMembersRoute(channelId string) string
- func (c *Client4) GetChannelRoute(channelId string) string
- func (c *Client4) GetChannelSchemeRoute(channelId string) string
- func (c *Client4) GetChannelsForTeamForUserRoute(teamId, userId string, includeDeleted bool) string
- func (c *Client4) GetChannelsForTeamRoute(teamId string) string
- func (c *Client4) GetChannelsRoute() string
- func (c *Client4) GetClusterRoute() string
- func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response)
- func (c *Client4) GetCommandById(cmdId string) (*Command, *Response)
- func (c *Client4) GetCommandMoveRoute(commandId string) string
- func (c *Client4) GetCommandRoute(commandId string) string
- func (c *Client4) GetCommandsRoute() string
- func (c *Client4) GetComplianceReport(reportId string) (*Compliance, *Response)
- func (c *Client4) GetComplianceReportRoute(reportId string) string
- func (c *Client4) GetComplianceReports(page, perPage int) (Compliances, *Response)
- func (c *Client4) GetComplianceReportsRoute() string
- func (c *Client4) GetConfig() (*Config, *Response)
- func (c *Client4) GetConfigRoute() string
- func (c *Client4) GetDataRetentionPolicy() (*DataRetentionPolicy, *Response)
- func (c *Client4) GetDataRetentionRoute() string
- func (c *Client4) GetDatabaseRoute() string
- func (c *Client4) GetDefaultProfileImage(userId string) ([]byte, *Response)
- func (c *Client4) GetElasticsearchRoute() string
- func (c *Client4) GetEmoji(emojiId string) (*Emoji, *Response)
- func (c *Client4) GetEmojiByName(name string) (*Emoji, *Response)
- func (c *Client4) GetEmojiByNameRoute(name string) string
- func (c *Client4) GetEmojiImage(emojiId string) ([]byte, *Response)
- func (c *Client4) GetEmojiList(page, perPage int) ([]*Emoji, *Response)
- func (c *Client4) GetEmojiRoute(emojiId string) string
- func (c *Client4) GetEmojisRoute() string
- func (c *Client4) GetEnvironmentConfig() (map[string]interface{}, *Response)
- func (c *Client4) GetFile(fileId string) ([]byte, *Response)
- func (c *Client4) GetFileInfo(fileId string) (*FileInfo, *Response)
- func (c *Client4) GetFileInfosForPost(postId string, etag string) ([]*FileInfo, *Response)
- func (c *Client4) GetFileLink(fileId string) (string, *Response)
- func (c *Client4) GetFilePreview(fileId string) ([]byte, *Response)
- func (c *Client4) GetFileRoute(fileId string) string
- func (c *Client4) GetFileThumbnail(fileId string) ([]byte, *Response)
- func (c *Client4) GetFilesRoute() string
- func (c *Client4) GetIncomingWebhook(hookID string, etag string) (*IncomingWebhook, *Response)
- func (c *Client4) GetIncomingWebhookRoute(hookID string) string
- func (c *Client4) GetIncomingWebhooks(page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
- func (c *Client4) GetIncomingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
- func (c *Client4) GetIncomingWebhooksRoute() string
- func (c *Client4) GetJob(id string) (*Job, *Response)
- func (c *Client4) GetJobs(page int, perPage int) ([]*Job, *Response)
- func (c *Client4) GetJobsByType(jobType string, page int, perPage int) ([]*Job, *Response)
- func (c *Client4) GetJobsRoute() string
- func (c *Client4) GetLdapRoute() string
- func (c *Client4) GetLicenseRoute() string
- func (c *Client4) GetLogs(page, perPage int) ([]string, *Response)
- func (c *Client4) GetMe(etag string) (*User, *Response)
- func (c *Client4) GetNewUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetOAuthAccessToken(data url.Values) (*AccessResponse, *Response)
- func (c *Client4) GetOAuthApp(appId string) (*OAuthApp, *Response)
- func (c *Client4) GetOAuthAppInfo(appId string) (*OAuthApp, *Response)
- func (c *Client4) GetOAuthAppRoute(appId string) string
- func (c *Client4) GetOAuthApps(page, perPage int) ([]*OAuthApp, *Response)
- func (c *Client4) GetOAuthAppsRoute() string
- func (c *Client4) GetOldClientConfig(etag string) (map[string]string, *Response)
- func (c *Client4) GetOldClientLicense(etag string) (map[string]string, *Response)
- func (c *Client4) GetOpenGraphRoute() string
- func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhookRoute(hookID string) string
- func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhooksForChannel(channelId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhooksRoute() string
- func (c *Client4) GetPing() (string, *Response)
- func (c *Client4) GetPingWithServerStatus() (string, *Response)
- func (c *Client4) GetPluginRoute(pluginId string) string
- func (c *Client4) GetPluginsRoute() string
- func (c *Client4) GetPostRoute(postId string) string
- func (c *Client4) GetPostsEphemeralRoute() string
- func (c *Client4) GetPostsRoute() string
- func (c *Client4) GetPreferenceByCategoryAndName(userId string, category string, preferenceName string) (*Preference, *Response)
- func (c *Client4) GetPreferences(userId string) (Preferences, *Response)
- func (c *Client4) GetPreferencesByCategory(userId string, category string) (Preferences, *Response)
- func (c *Client4) GetPreferencesRoute(userId string) string
- func (c *Client4) GetProfileImage(userId, etag string) ([]byte, *Response)
- func (c *Client4) GetReactions(postId string) ([]*Reaction, *Response)
- func (c *Client4) GetReactionsRoute() string
- func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetRedirectLocation(urlParam, etag string) (string, *Response)
- func (c *Client4) GetRedirectLocationRoute() string
- func (c *Client4) GetRole(id string) (*Role, *Response)
- func (c *Client4) GetRoleByName(name string) (*Role, *Response)
- func (c *Client4) GetRolesByNames(roleNames []string) ([]*Role, *Response)
- func (c *Client4) GetRolesRoute() string
- func (c *Client4) GetSamlCertificateStatus() (*SamlCertificateStatus, *Response)
- func (c *Client4) GetSamlMetadata() (string, *Response)
- func (c *Client4) GetSamlMetadataFromIdp(samlMetadataURL string) (*SamlMetadataResponse, *Response)
- func (c *Client4) GetSamlRoute() string
- func (c *Client4) GetScheme(id string) (*Scheme, *Response)
- func (c *Client4) GetSchemeRoute(id string) string
- func (c *Client4) GetSchemes(scope string, page int, perPage int) ([]*Scheme, *Response)
- func (c *Client4) GetSchemesRoute() string
- func (c *Client4) GetServerBusy() (*ServerBusyState, *Response)
- func (c *Client4) GetServerBusyExpires() (*time.Time, *Response)deprecated
- func (c *Client4) GetServerBusyRoute() string
- func (c *Client4) GetSessions(userId, etag string) ([]*Session, *Response)
- func (c *Client4) GetSortedEmojiList(page, perPage int, sort string) ([]*Emoji, *Response)
- func (c *Client4) GetSupportedTimezone() ([]string, *Response)
- func (c *Client4) GetSystemRoute() string
- func (c *Client4) GetTeamAutoCompleteCommandsRoute(teamId string) string
- func (c *Client4) GetTeamByNameRoute(teamName string) string
- func (c *Client4) GetTeamImportRoute(teamId string) string
- func (c *Client4) GetTeamMemberRoute(teamId, userId string) string
- func (c *Client4) GetTeamMembersRoute(teamId string) string
- func (c *Client4) GetTeamRoute(teamId string) string
- func (c *Client4) GetTeamSchemeRoute(teamId string) string
- func (c *Client4) GetTeamStatsRoute(teamId string) string
- func (c *Client4) GetTeamsRoute() string
- func (c *Client4) GetTermsOfService(etag string) (*TermsOfService, *Response)
- func (c *Client4) GetTermsOfServiceRoute() string
- func (c *Client4) GetTestEmailRoute() string
- func (c *Client4) GetTestS3Route() string
- func (c *Client4) GetTestSiteURLRoute() string
- func (c *Client4) GetTimezonesRoute() string
- func (c *Client4) GetTotalUsersStatsRoute() string
- func (c *Client4) GetUser(userId, etag string) (*User, *Response)
- func (c *Client4) GetUserAccessToken(tokenId string) (*UserAccessToken, *Response)
- func (c *Client4) GetUserAccessTokenRoute(tokenId string) string
- func (c *Client4) GetUserAccessTokens(page int, perPage int) ([]*UserAccessToken, *Response)
- func (c *Client4) GetUserAccessTokensForUser(userId string, page, perPage int) ([]*UserAccessToken, *Response)
- func (c *Client4) GetUserAccessTokensRoute() string
- func (c *Client4) GetUserAudits(userId string, page int, perPage int, etag string) (Audits, *Response)
- func (c *Client4) GetUserByEmail(email, etag string) (*User, *Response)
- func (c *Client4) GetUserByEmailRoute(email string) string
- func (c *Client4) GetUserByUsername(userName, etag string) (*User, *Response)
- func (c *Client4) GetUserByUsernameRoute(userName string) string
- func (c *Client4) GetUserRoute(userId string) string
- func (c *Client4) GetUserStatus(userId, etag string) (*Status, *Response)
- func (c *Client4) GetUserStatusRoute(userId string) string
- func (c *Client4) GetUserStatusesRoute() string
- func (c *Client4) GetUserTermsOfService(userId, etag string) (*UserTermsOfService, *Response)
- func (c *Client4) GetUserTermsOfServiceRoute(userId string) string
- func (c *Client4) GetUsers(page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersByIds(userIds []string) ([]*User, *Response)
- func (c *Client4) GetUsersByIdsWithOptions(userIds []string, options *UserGetByIdsOptions) ([]*User, *Response)
- func (c *Client4) GetUsersByUsernames(usernames []string) ([]*User, *Response)
- func (c *Client4) GetUsersInChannel(channelId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersInChannelByStatus(channelId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersNotInChannel(teamId, channelId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersNotInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersRoute() string
- func (c *Client4) GetUsersStatusesByIds(userIds []string) ([]*Status, *Response)
- func (c *Client4) GetUsersWithoutTeam(page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) InvalidateCaches() (bool, *Response)
- func (c *Client4) ListAutocompleteCommands(teamId string) ([]*Command, *Response)
- func (c *Client4) ListCommands(teamId string, customOnly bool) ([]*Command, *Response)
- func (c *Client4) Login(loginId string, password string) (*User, *Response)
- func (c *Client4) LoginById(id string, password string) (*User, *Response)
- func (c *Client4) LoginByLdap(loginId string, password string) (*User, *Response)
- func (c *Client4) LoginWithDevice(loginId string, password string, deviceId string) (*User, *Response)
- func (c *Client4) LoginWithMFA(loginId, password, mfaToken string) (*User, *Response)
- func (c *Client4) Logout() (bool, *Response)
- func (c *Client4) MockSession(token string)
- func (c *Client4) MoveCommand(teamId string, commandId string) (bool, *Response)
- func (c *Client4) Must(result interface{}, resp *Response) interface{}
- func (c *Client4) OpenGraph(url string) (map[string]string, *Response)
- func (c *Client4) PatchConfig(config *Config) (*Config, *Response)
- func (c *Client4) PatchRole(roleId string, patch *RolePatch) (*Role, *Response)
- func (c *Client4) PatchScheme(id string, patch *SchemePatch) (*Scheme, *Response)
- func (c *Client4) PatchUser(userId string, patch *UserPatch) (*User, *Response)
- func (c *Client4) PostLog(message map[string]string) (map[string]string, *Response)
- func (c *Client4) PromoteGuestToUser(guestId string) (bool, *Response)
- func (c *Client4) PurgeElasticsearchIndexes() (bool, *Response)
- func (c *Client4) RegenCommandToken(commandId string) (string, *Response)
- func (c *Client4) RegenOutgoingHookToken(hookId string) (*OutgoingWebhook, *Response)
- func (c *Client4) RegenerateOAuthAppSecret(appId string) (*OAuthApp, *Response)
- func (c *Client4) RegisterTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) (*bool, *Response)
- func (c *Client4) ReloadConfig() (bool, *Response)
- func (c *Client4) RemoveLicenseFile() (bool, *Response)
- func (c *Client4) ResetPassword(token, newPassword string) (bool, *Response)
- func (c *Client4) RevokeAllSessions(userId string) (bool, *Response)
- func (c *Client4) RevokeSession(userId, sessionId string) (bool, *Response)
- func (c *Client4) RevokeSessionsFromAllUsers() (bool, *Response)
- func (c *Client4) RevokeUserAccessToken(tokenId string) (bool, *Response)
- func (c *Client4) SaveReaction(reaction *Reaction) (*Reaction, *Response)
- func (c *Client4) SearchEmoji(search *EmojiSearch) ([]*Emoji, *Response)
- func (c *Client4) SearchUserAccessTokens(search *UserAccessTokenSearch) ([]*UserAccessToken, *Response)
- func (c *Client4) SearchUsers(search *UserSearch) ([]*User, *Response)
- func (c *Client4) SendPasswordResetEmail(email string) (bool, *Response)
- func (c *Client4) SendVerificationEmail(email string) (bool, *Response)
- func (c *Client4) SetDefaultProfileImage(userId string) (bool, *Response)
- func (c *Client4) SetOAuthToken(token string)
- func (c *Client4) SetProfileImage(userId string, data []byte) (bool, *Response)
- func (c *Client4) SetServerBusy(secs int) (bool, *Response)
- func (c *Client4) SetToken(token string)
- func (c *Client4) SwitchAccountType(switchRequest *SwitchRequest) (string, *Response)
- func (c *Client4) SyncLdap() (bool, *Response)
- func (c *Client4) TestElasticsearch() (bool, *Response)
- func (c *Client4) TestEmail(config *Config) (bool, *Response)
- func (c *Client4) TestLdap() (bool, *Response)
- func (c *Client4) TestS3Connection(config *Config) (bool, *Response)
- func (c *Client4) TestSiteURL(siteURL string) (bool, *Response)
- func (c *Client4) UpdateCommand(cmd *Command) (*Command, *Response)
- func (c *Client4) UpdateConfig(config *Config) (*Config, *Response)
- func (c *Client4) UpdateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
- func (c *Client4) UpdateOAuthApp(app *OAuthApp) (*OAuthApp, *Response)
- func (c *Client4) UpdateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
- func (c *Client4) UpdatePreferences(userId string, preferences *Preferences) (bool, *Response)
- func (c *Client4) UpdateUser(user *User) (*User, *Response)
- func (c *Client4) UpdateUserActive(userId string, active bool) (bool, *Response)
- func (c *Client4) UpdateUserAuth(userId string, userAuth *UserAuth) (*UserAuth, *Response)
- func (c *Client4) UpdateUserMfa(userId, code string, activate bool) (bool, *Response)
- func (c *Client4) UpdateUserPassword(userId, currentPassword, newPassword string) (bool, *Response)
- func (c *Client4) UpdateUserRoles(userId, roles string) (bool, *Response)
- func (c *Client4) UpdateUserStatus(userId string, userStatus *Status) (*Status, *Response)
- func (c *Client4) UploadBrandImage(data []byte) (bool, *Response)
- func (c *Client4) UploadFile(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
- func (c *Client4) UploadFileAsRequestBody(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
- func (c *Client4) UploadLicenseFile(data []byte) (bool, *Response)
- func (c *Client4) UploadSamlIdpCertificate(data []byte, filename string) (bool, *Response)
- func (c *Client4) UploadSamlPrivateCertificate(data []byte, filename string) (bool, *Response)
- func (c *Client4) UploadSamlPublicCertificate(data []byte, filename string) (bool, *Response)
- func (c *Client4) VerifyUserEmail(token string) (bool, *Response)
- type ClientRequirements
- type ClusterDiscovery
- func (o *ClusterDiscovery) AutoFillHostname()
- func (o *ClusterDiscovery) AutoFillIpAddress(iface string, ipAddress string)
- func (o *ClusterDiscovery) IsEqual(in *ClusterDiscovery) bool
- func (o *ClusterDiscovery) IsValid() *AppError
- func (o *ClusterDiscovery) PreSave()
- func (o *ClusterDiscovery) ToJson() string
- type ClusterInfo
- type ClusterMessage
- type ClusterSettings
- type ClusterStats
- type Command
- type CommandArgs
- type CommandMoveRequest
- type CommandResponse
- type CommandWebhook
- type Compliance
- type CompliancePost
- type ComplianceSettings
- type Compliances
- type Config
- type ConfigFunc
- type ContactPerson
- type Customer
- type DataRetentionPolicy
- type DataRetentionSettings
- type DirectClassForExport
- type DisplaySettings
- type ElasticsearchSettings
- type EmailSettings
- type Emoji
- type EmojiSearch
- type EncryptionMethod
- type Endpoint
- type EntityDescriptor
- type ExperimentalAuditSettings
- type ExperimentalSettings
- type Features
- type FileInfo
- type FileSettings
- type FileUploadResponse
- type GetFileInfosOptions
- type GlobalRelayMessageExportSettings
- type GuestAccountsSettings
- type GuestsInvite
- type IDPSSODescriptor
- type ImageProxySettings
- type IncomingWebhook
- type IncomingWebhookRequest
- type IndexedEndpoint
- type InitialLoad
- type Job
- type JobSettings
- type KeyDescriptor
- type KeyInfo
- type LdapSettings
- type License
- type LicenseRecord
- type LinkMetadata
- type LinkMetadataType
- type LocalizationSettings
- type LocalizedName
- type LocalizedURI
- type LogSettings
- type MessageExport
- type MessageExportSettings
- type MetricsSettings
- type MfaSecret
- type NameID
- type NameIDFormat
- type NativeAppSettings
- type NotificationLogSettings
- type OAuthApp
- type Office365Settings
- type Organization
- type OutgoingWebhook
- func (o *OutgoingWebhook) GetTriggerWord(word string, isExactMatch bool) (triggerWord string)
- func (o *OutgoingWebhook) IsValid() *AppError
- func (o *OutgoingWebhook) PreSave()
- func (o *OutgoingWebhook) PreUpdate()
- func (o *OutgoingWebhook) ToJson() string
- func (o *OutgoingWebhook) TriggerWordExactMatch(word string) bool
- func (o *OutgoingWebhook) TriggerWordStartsWith(word string) bool
- type OutgoingWebhookPayload
- type OutgoingWebhookResponse
- type PasswordSettings
- type Permission
- type PluginSettings
- type PluginState
- type Preference
- type Preferences
- type PrivacySettings
- type PushNotification
- type PushNotificationAck
- type PushResponse
- type RateLimitSettings
- type Reaction
- type Response
- type Role
- type RoleDescriptor
- type RolePatch
- type RolePermissions
- type RoleScope
- type RoleType
- type SSODescriptor
- type SSOSettings
- type SamlAuthRequest
- type SamlCertificateStatus
- type SamlMetadataResponse
- type SamlSettings
- type ScheduledTask
- type Scheduler
- type Scheme
- type SchemeConveyor
- type SchemeIDPatch
- type SchemePatch
- type SchemeRoles
- type SearchParams
- func (p *SearchParams) GetAfterDateMillis() int64
- func (p *SearchParams) GetBeforeDateMillis() int64
- func (p *SearchParams) GetExcludedAfterDateMillis() int64
- func (p *SearchParams) GetExcludedBeforeDateMillis() int64
- func (p *SearchParams) GetExcludedDateMillis() (int64, int64)
- func (p *SearchParams) GetOnDateMillis() (int64, int64)
- type SecurityBulletin
- type SecurityBulletins
- type ServerBusyState
- type ServiceSettings
- type Session
- func (me *Session) AddProp(key string, value string)
- func (me *Session) DeepCopy() *Session
- func (me *Session) GenerateCSRF() string
- func (me *Session) GetBranchByBranchId(branchId string) *BranchMember
- func (me *Session) GetCSRF() string
- func (me *Session) GetUserRoles() []string
- func (me *Session) IsExpired() bool
- func (me *Session) IsMobileApp() bool
- func (me *Session) PreSave()
- func (me *Session) Sanitize()
- func (me *Session) SetExpireInDays(days int)
- func (me *Session) ToJson() string
- type SqlSettings
- type Status
- type StringArray
- type StringInterface
- type StringMap
- type SuggestCommand
- type SupportSettings
- type SwitchRequest
- type System
- type SystemAsymmetricSigningKey
- type SystemECDSAKey
- type SystemPostActionCookieSecret
- type TaskFunc
- type TermsOfService
- type ThemeSettings
- type Token
- type User
- func (u *User) AddNotifyProp(key string, value string)
- func (u *User) ClearNonProfileFields()
- func (u *User) DeepCopy() *User
- func (u *User) Etag(showFullName, showEmail bool) string
- func (u *User) GetDisplayName(nameFormat string) string
- func (u *User) GetDisplayNameWithPrefix(nameFormat, prefix string) string
- func (u *User) GetFullName() string
- func (u *User) GetMentionKeys() []string
- func (u *User) GetPreferredTimezone() string
- func (u *User) GetRawRoles() string
- func (u *User) GetRoles() []string
- func (u *User) IsGuest() bool
- func (u *User) IsInRole(inRole string) bool
- func (u *User) IsLDAPUser() bool
- func (u *User) IsOAuthUser() bool
- func (u *User) IsSAMLUser() bool
- func (u *User) IsSSOUser() bool
- func (u *User) IsSystemAdmin() bool
- func (u *User) IsValid() *AppError
- func (u *User) MakeNonNil()
- func (u *User) Patch(patch *UserPatch)
- func (u *User) PreSave()
- func (u *User) PreUpdate()
- func (u *User) Sanitize(options map[string]bool)
- func (u *User) SanitizeInput(isAdmin bool)
- func (u *User) SanitizeProfile(options map[string]bool)
- func (u *User) SetDefaultNotifications()
- func (u *User) ToJson() string
- func (u *User) UpdateMentionKeysFromUsername(oldUsername string)
- type UserAccessToken
- type UserAccessTokenSearch
- type UserAuth
- type UserAutocomplete
- type UserAutocompleteInChannel
- type UserAutocompleteInTeam
- type UserCountOptions
- type UserForIndexing
- type UserGetByIdsOptions
- type UserGetOptions
- type UserMentionMap
- type UserPatch
- type UserSearch
- type UserSearchOptions
- type UserSlice
- type UserTermsOfService
- type UserUpdate
- type UsersStats
- type ViewUsersRestrictions
- type WebSocketClient
- func (wsc *WebSocketClient) Close()
- func (wsc *WebSocketClient) Connect() *AppError
- func (wsc *WebSocketClient) ConnectWithDialer(dialer *websocket.Dialer) *AppError
- func (wsc *WebSocketClient) GetStatuses()
- func (wsc *WebSocketClient) GetStatusesByIds(userIds []string)
- func (wsc *WebSocketClient) Listen()
- func (wsc *WebSocketClient) SendMessage(action string, data map[string]interface{})
- func (wsc *WebSocketClient) UserTyping(channelId, parentId string)
- type WebSocketEvent
- func (ev *WebSocketEvent) Add(key string, value interface{})
- func (ev *WebSocketEvent) Copy() *WebSocketEvent
- func (ev *WebSocketEvent) EventType() string
- func (ev *WebSocketEvent) GetBroadcast() *WebsocketBroadcast
- func (ev *WebSocketEvent) GetData() map[string]interface{}
- func (ev *WebSocketEvent) GetSequence() int64
- func (ev *WebSocketEvent) IsValid() bool
- func (ev *WebSocketEvent) PrecomputeJSON() *WebSocketEvent
- func (ev *WebSocketEvent) SetBroadcast(broadcast *WebsocketBroadcast) *WebSocketEvent
- func (ev *WebSocketEvent) SetData(data map[string]interface{}) *WebSocketEvent
- func (ev *WebSocketEvent) SetEvent(event string) *WebSocketEvent
- func (ev *WebSocketEvent) SetSequence(seq int64) *WebSocketEvent
- func (ev *WebSocketEvent) ToJson() string
- type WebSocketMessage
- type WebSocketRequest
- type WebSocketResponse
- type WebsocketBroadcast
- type Worker
- type X509Certificate
- type X509Data
Constants ¶
const ( ACCESS_TOKEN_GRANT_TYPE = "authorization_code" ACCESS_TOKEN_TYPE = "bearer" REFRESH_TOKEN_GRANT_TYPE = "refresh_token" )
const ( AUTHCODE_EXPIRE_TIME = 60 * 10 // 10 minutes AUTHCODE_RESPONSE_TYPE = "code" IMPLICIT_RESPONSE_TYPE = "token" DEFAULT_SCOPE = "user" )
const ( BRANCH_OPEN = "O" BRANCH_INVITE = "I" BRANCH_ALLOWED_DOMAINS_MAX_LENGTH = 500 BRANCH_COMPANY_NAME_MAX_LENGTH = 64 BRANCH_DESCRIPTION_MAX_LENGTH = 255 BRANCH_DISPLAY_NAME_MAX_RUNES = 64 BRANCH_EMAIL_MAX_LENGTH = 128 BRANCH_NAME_MAX_LENGTH = 64 BRANCH_NAME_MIN_LENGTH = 2 )
const ( CLASS_DISPLAY_NAME_MAX_RUNES = 64 CLASS_NAME_MIN_LENGTH = 2 CLASS_NAME_MAX_LENGTH = 64 CLASS_HEADER_MAX_RUNES = 1024 CLASS_PURPOSE_MAX_RUNES = 250 CLASS_CACHE_SIZE = 25000 CLASS_SORT_BY_USERNAME = "username" CLASS_SORT_BY_STATUS = "status" )
const ( CLASS_NOTIFY_DEFAULT = "default" CLASS_NOTIFY_ALL = "all" CLASS_NOTIFY_MENTION = "mention" CLASS_NOTIFY_NONE = "none" CLASS_MARK_UNREAD_ALL = "all" CLASS_MARK_UNREAD_MENTION = "mention" IGNORE_CLASS_MENTIONS_DEFAULT = "default" IGNORE_CLASS_MENTIONS_OFF = "off" IGNORE_CLASS_MENTIONS_ON = "on" IGNORE_CLASS_MENTIONS_NOTIFY_PROP = "ignore_channel_mentions" )
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_UNHEALTHY = "UNHEALTHY" 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 )
const ( CDS_OFFLINE_AFTER_MILLIS = 1000 * 60 * 30 // 30 minutes CDS_TYPE_APP = "mattermost_app" )
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_CLASS_POSTS = "inv_class_posts" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS_MEMBERS_NOTIFY_PROPS = "inv_class_members_notify_props" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS_MEMBERS = "inv_class_members" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS_BY_NAME = "inv_class_name" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS = "inv_class" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS_GUEST_COUNT = "inv_class_guest_count" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_USER = "inv_user" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_USER_BRANCHES = "inv_user_branches" CLUSTER_EVENT_CLEAR_SESSION_CACHE_FOR_USER = "clear_session_user" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_ROLES = "inv_roles" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_ROLE_PERMISSIONS = "inv_role_permissions" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_PROFILE_BY_IDS = "inv_profile_ids" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_PROFILE_IN_CLASS = "inv_profile_in_class" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_SCHEMES = "inv_schemes" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_FILE_INFOS = "inv_file_infos" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_WEBHOOKS = "inv_webhooks" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_EMOJIS_BY_ID = "inv_emojis_by_id" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_EMOJIS_ID_BY_NAME = "inv_emojis_id_by_name" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS_PINNEDPOSTS_COUNTS = "inv_class_pinnedposts_counts" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CLASS_MEMBER_COUNTS = "inv_class_member_counts" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_LAST_POSTS = "inv_last_posts" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_LAST_POST_TIME = "inv_last_post_time" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_BRANCHES = "inv_branches" CLUSTER_EVENT_CLEAR_SESSION_CACHE_FOR_ALL_USERS = "inv_all_user_sessions" CLUSTER_EVENT_INSTALL_PLUGIN = "install_plugin" CLUSTER_EVENT_REMOVE_PLUGIN = "remove_plugin" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_TERMS_OF_SERVICE = "inv_terms_of_service" CLUSTER_EVENT_BUSY_STATE_CHANGED = "busy_state_change" // SendTypes for ClusterMessage. CLUSTER_SEND_BEST_EFFORT = "best_effort" CLUSTER_SEND_RELIABLE = "reliable" )
const ( COMMAND_METHOD_POST = "P" COMMAND_METHOD_GET = "G" MIN_TRIGGER_LENGTH = 1 MAX_TRIGGER_LENGTH = 128 )
const ( COMMAND_RESPONSE_TYPE_IN_CHANNEL = "in_class" COMMAND_RESPONSE_TYPE_EPHEMERAL = "ephemeral" )
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" )
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_CLASS_NOTIFICATION = "generic_no_class" GENERIC_NOTIFICATION = "generic" GENERIC_NOTIFICATION_SERVER = "https://push-test.mattermost.com" FULL_NOTIFICATION = "full" ID_LOADED_NOTIFICATION = "id_loaded" DIRECT_MESSAGE_ANY = "any" DIRECT_MESSAGE_BRANCH = "branch" SHOW_USERNAME = "username" SHOW_NICKNAME_FULLNAME = "nickname_full_name" SHOW_FULLNAME = "full_name" PERMISSIONS_ALL = "all" PERMISSIONS_CLASS_ADMIN = "class_admin" PERMISSIONS_BRANCH_ADMIN = "branch_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_BRANCH_ADMIN = "branch_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_CLASSES_DISABLED = "disabled" GROUP_UNREAD_CLASSES_DEFAULT_ON = "default_on" GROUP_UNREAD_CLASSES_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_IDLE_TIMEOUT = 60 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" BRANCH_SETTINGS_DEFAULT_SITE_NAME = "Mattermost" BRANCH_SETTINGS_DEFAULT_MAX_USERS_PER_BRANCH = 50 BRANCH_SETTINGS_DEFAULT_CUSTOM_BRAND_TEXT = "" BRANCH_SETTINGS_DEFAULT_CUSTOM_DESCRIPTION_TEXT = "" BRANCH_SETTINGS_DEFAULT_USER_STATUS_AWAY_TIMEOUT = 300 SQL_SETTINGS_DEFAULT_DATA_SOURCE = "mmuser:mostest@tcp(localhost: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_GUEST_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_ADMIN_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 = "" SAML_SETTINGS_SIGNATURE_ALGORITHM_SHA1 = "RSAwithSHA1" SAML_SETTINGS_SIGNATURE_ALGORITHM_SHA256 = "RSAwithSHA256" SAML_SETTINGS_SIGNATURE_ALGORITHM_SHA512 = "RSAwithSHA512" SAML_SETTINGS_DEFAULT_SIGNATURE_ALGORITHM = SAML_SETTINGS_SIGNATURE_ALGORITHM_SHA1 SAML_SETTINGS_CANONICAL_ALGORITHM_C14N = "Canonical1.0" SAML_SETTINGS_CANONICAL_ALGORITHM_C14N11 = "Canonical1.1" SAML_SETTINGS_DEFAULT_CANONICAL_ALGORITHM = SAML_SETTINGS_CANONICAL_ALGORITHM_C14N NATIVEAPP_SETTINGS_DEFAULT_APP_DOWNLOAD_LINK = "https://mattermost.com/download/#mattermostApps" 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" BRANCH_SETTINGS_DEFAULT_BRANCH_TEXT = "default" ELASTICSEARCH_SETTINGS_DEFAULT_CONNECTION_URL = "http://localhost: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_CLASS_INDEX_REPLICAS = 1 ELASTICSEARCH_SETTINGS_DEFAULT_CLASS_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" PLUGIN_SETTINGS_DEFAULT_ENABLE_MARKETPLACE = true PLUGIN_SETTINGS_DEFAULT_MARKETPLACE_URL = "https://api.integrations.mattermost.com" PLUGIN_SETTINGS_OLD_MARKETPLACE_URL = "https://marketplace.integrations.mattermost.com" COMPLIANCE_EXPORT_TYPE_CSV = "csv" COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance" COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay" COMPLIANCE_EXPORT_TYPE_GLOBALRELAY_ZIP = "globalrelay-zip" 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" GOOGLE_SETTINGS_DEFAULT_SCOPE = "profile email" GOOGLE_SETTINGS_DEFAULT_AUTH_ENDPOINT = "https://accounts.google.com/o/oauth2/v2/auth" GOOGLE_SETTINGS_DEFAULT_TOKEN_ENDPOINT = "https://www.googleapis.com/oauth2/v4/token" GOOGLE_SETTINGS_DEFAULT_USER_API_ENDPOINT = "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata" OFFICE365_SETTINGS_DEFAULT_SCOPE = "User.Read" OFFICE365_SETTINGS_DEFAULT_AUTH_ENDPOINT = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize" OFFICE365_SETTINGS_DEFAULT_TOKEN_ENDPOINT = "https://login.microsoftonline.com/common/oauth2/v2.0/token" OFFICE365_SETTINGS_DEFAULT_USER_API_ENDPOINT = "https://graph.microsoft.com/v1.0/me" )
const ( EMOJI_NAME_MAX_LENGTH = 64 EMOJI_SORT_BY_NAME = "name" )
const ( FILEINFO_SORT_BY_CREATED = "CreateAt" FILEINFO_SORT_BY_SIZE = "Size" )
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" )
const ( EXPIRED_LICENSE_ERROR = "api.license.add_license.expired.app_error" INVALID_LICENSE_ERROR = "api.license.add_license.invalid.app_error" )
const ( LINK_METADATA_TYPE_IMAGE LinkMetadataType = "image" LINK_METADATA_TYPE_NONE LinkMetadataType = "none" LINK_METADATA_TYPE_OPENGRAPH LinkMetadataType = "opengraph" MAX_IMAGES int = 5 )
const ( MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2 = "migration_advanced_permissions_phase_2" MIGRATION_KEY_EMOJI_PERMISSIONS_SPLIT = "emoji_permissions_split" MIGRATION_KEY_WEBHOOK_PERMISSIONS_SPLIT = "webhook_permissions_split" MIGRATION_KEY_LIST_JOIN_PUBLIC_PRIVATE_TEAMS = "list_join_public_private_teams" MIGRATION_KEY_REMOVE_PERMANENT_DELETE_USER = "remove_permanent_delete_user" MIGRATION_KEY_ADD_BOT_PERMISSIONS = "add_bot_permissions" MIGRATION_KEY_APPLY_CHANNEL_MANAGE_DELETE_TO_CHANNEL_USER = "apply_channel_manage_delete_to_channel_user" MIGRATION_KEY_REMOVE_CHANNEL_MANAGE_DELETE_FROM_TEAM_USER = "remove_channel_manage_delete_from_team_user" MIGRATION_KEY_VIEW_MEMBERS_NEW_PERMISSION = "view_members_new_permission" MIGRATION_KEY_ADD_MANAGE_GUESTS_PERMISSIONS = "add_manage_guests_permissions" MIGRATION_KEY_CHANNEL_MODERATIONS_PERMISSIONS = "channel_moderations_permissions" MIGRATION_KEY_ADD_USE_GROUP_MENTIONS_PERMISSION = "add_use_group_mentions_permission" )
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" )
const ( PERMISSION_SCOPE_SYSTEM = "system_scope" PERMISSION_SCOPE_BRANCH = "branch_scope" PERMISSION_SCOPE_CLASS = "class_scope" )
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" )
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_TYPE_UPDATE_BADGE = "update_badge" PUSH_MESSAGE_V2 = "v2" PUSH_SOUND_NONE = "none" // 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" PUSH_SEND_PREPARE = "Prepared to send" PUSH_SEND_SUCCESS = "Successful" PUSH_NOT_SENT = "Not Sent due to preferences" PUSH_RECEIVED = "Received by device" )
const ( PUSH_STATUS = "status" PUSH_STATUS_OK = "OK" PUSH_STATUS_FAIL = "FAIL" PUSH_STATUS_REMOVE = "REMOVE" PUSH_STATUS_ERROR_MSG = "error" )
const ( SYSTEM_GUEST_ROLE_ID = "system_guest" 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" BRANCH_POST_ALL_ROLE_ID = "branch_post_all" BRANCH_POST_ALL_PUBLIC_ROLE_ID = "branch_post_all_public" BRANCH_USER_ROLE_ID = "branch_user" BRANCH_ADMIN_ROLE_ID = "branch_admin" CLASS_USER_ROLE_ID = "class_user" CLASS_ADMIN_ROLE_ID = "class_admin" ROLE_NAME_MAX_LENGTH = 64 ROLE_DISPLAY_NAME_MAX_LENGTH = 128 ROLE_DESCRIPTION_MAX_LENGTH = 1024 RoleScopeSystem RoleScope = "System" RoleScopeBranch RoleScope = "Branch" RoleScopeClass RoleScope = "Class" RoleTypeUser RoleType = "User" RoleTypeAdmin RoleType = "Admin" )
const ( USER_AUTH_SERVICE_SAML = "saml" USER_AUTH_SERVICE_SAML_TEXT = "SAML" )
const ( SCHEME_DISPLAY_NAME_MAX_LENGTH = 128 SCHEME_NAME_MAX_LENGTH = 64 SCHEME_DESCRIPTION_MAX_LENGTH = 1024 SCHEME_SCOPE_BRANCH = "branch" SCHEME_SCOPE_CLASS = "class" )
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_PROP_IS_BOT = "is_bot" SESSION_PROP_IS_BOT_VALUE = "true" SESSION_TYPE_USER_ACCESS_TOKEN = "UserAccessToken" SESSION_PROP_IS_GUEST = "is_guest" SESSION_ACTIVITY_TIMEOUT = 1000 * 60 * 5 // 5 minutes SESSION_USER_ACCESS_TOKEN_EXPIRY = 100 * 365 // 100 years )
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 )
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" )
const ( TOKEN_SIZE = 64 MAX_TOKEN_EXIPRY_TIME = 1000 * 60 * 60 * 48 // 48 hour TOKEN_TYPE_OAUTH = "oauth" )
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 )
const ( LOWERCASE_LETTERS = "abcdefghijklmnopqrstuvwxyz" UPPERCASE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" NUMBERS = "0123456789" SYMBOLS = " !\"\\#$%&'()*+,-./:;<=>?@[]^_`|~" )
const ( SOCKET_MAX_MESSAGE_SIZE_KB = 8 * 1024 // 8KB PING_TIMEOUT_BUFFER_SECONDS = 5 )
const ( WEBSOCKET_EVENT_TYPING = "typing" WEBSOCKET_EVENT_POSTED = "posted" WEBSOCKET_EVENT_POST_EDITED = "post_edited" WEBSOCKET_EVENT_POST_DELETED = "post_deleted" WEBSOCKET_EVENT_POST_UNREAD = "post_unread" WEBSOCKET_EVENT_CHANNEL_CONVERTED = "channel_converted" WEBSOCKET_EVENT_CHANNEL_CREATED = "channel_created" WEBSOCKET_EVENT_CHANNEL_DELETED = "channel_deleted" WEBSOCKET_EVENT_CHANNEL_RESTORED = "channel_restored" WEBSOCKET_EVENT_CHANNEL_UPDATED = "channel_updated" WEBSOCKET_EVENT_CHANNEL_MEMBER_UPDATED = "channel_member_updated" WEBSOCKET_EVENT_CHANNEL_SCHEME_UPDATED = "channel_scheme_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" WEBSOCKET_EVENT_GUESTS_DEACTIVATED = "guests_deactivated" )
const (
COMMAND_WEBHOOK_LIFETIME = 1000 * 60 * 30
)
const (
DEFAULT_WEBHOOK_USERNAME = "webhook"
)
const (
MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image
)
const OUTGOING_HOOK_RESPONSE_TYPE_COMMENT = "comment"
const TERMS_OF_SERVICE_CACHE_SIZE = 1
const (
USERNAME = "Username"
)
const (
USER_AUTH_SERVICE_GITLAB = "gitlab"
)
const (
USER_AUTH_SERVICE_LDAP = "ldap"
)
const USER_SEARCH_DEFAULT_LIMIT = 100
const USER_SEARCH_MAX_LIMIT = 1000
Variables ¶
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"} )
var ALL_PERMISSIONS []*Permission
var BuildDate string
var BuildEnterpriseReady string
var BuildHash string
var BuildHashEnterprise string
var BuildNumber string
var BuiltInSchemeManagedRoleIDs []string
var CLASS_MODERATED_PERMISSIONS []string
var CLASS_MODERATED_PERMISSIONS_MAP map[string]string
var CurrentVersion string = versions[0]
var EMOJI_PATTERN = regexp.MustCompile(`:[a-zA-Z0-9_-]+:`)
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, }
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 ArrayToJson ¶
func AsStringBoolMap ¶
func BranchListToJson ¶
func BranchMapToJson ¶
func BranchMemberWithErrorToString ¶
func BranchMemberWithErrorToString(o *BranchMemberWithError) string
func BranchMembersToJson ¶
func BranchMembersToJson(o []*BranchMember) string
func BranchMembersWithErrorToJson ¶
func BranchMembersWithErrorToJson(o []*BranchMemberWithError) string
func BranchesWithCountToJson ¶
func BranchesWithCountToJson(tlc *BranchesWithCount) []byte
func CheckStatusOK ¶
CheckStatusOK is a convenience function for checking the standard OK response from the web service.
func CleanBranchName ¶
func CleanUsername ¶
func ClearMentionTags ¶
func ClusterInfosToJson ¶
func ClusterInfosToJson(objmap []*ClusterInfo) string
func CommandListToJson ¶
func ComparePassword ¶
ComparePassword compares the hash
func CompliancePostHeader ¶
func CompliancePostHeader() []string
func EmojiListToJson ¶
func FileInfosToJson ¶
func FloorToNearestHour ¶
FloorToNearestHour takes a timestamp (in milliseconds) and returns it rounded to the previous hour in UTC.
func GenerateLinkMetadataHash ¶
GenerateLinkMetadataHash generates a unique hash for a given URL and timestamp for use as a database key.
func GeneratePassword ¶
func GetDMNameFromIds ¶
func GetEndOfDayMillis ¶
GetEndOfDayMillis is a convenience method to get milliseconds since epoch for provided date's end of day
func GetEtagForFileInfos ¶
func GetGroupNameFromUserIds ¶
func GetImageMimeType ¶
func GetMillis ¶
func GetMillis() int64
GetMillis is a convenience method to get milliseconds since epoch.
func GetMillisForTime ¶
GetMillisForTime is a convenience method to get milliseconds since epoch for provided Time.
func GetPreferredTimezone ¶
func GetPreviousVersion ¶
func GetServerIpAddress ¶
func GetStartOfDayMillis ¶
GetStartOfDayMillis is a convenience method to get milliseconds since epoch for provided date's start of day
func GetSystemEmojiId ¶
func HashPassword ¶
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 IsClassNotifyLevelValid ¶
func IsCurrentVersion ¶
func IsDomainName ¶
Copied from https://golang.org/src/net/dnsclient.go#L119
func IsFileExtImage ¶
func IsInRole ¶
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 IsReservedBranchName ¶
func IsSafeLink ¶
func IsSamlFile ¶
func IsSamlFile(saml *SamlSettings, filename string) bool
IsSamlFile checks if filename is a SAML file.
func IsSendEmailValid ¶
func IsValidAlphaNum ¶
func IsValidBranchName ¶
func IsValidClassIdentifier ¶
func IsValidEmail ¶
func IsValidHttpUrl ¶
func IsValidLocale ¶
func IsValidNumberString ¶
func IsValidRoleName ¶
func IsValidSchemeName ¶
func IsValidTurnOrStunServer ¶
func IsValidUserRoles ¶
func IsValidUsername ¶
func IsValidWebsocketUrl ¶
func JobsToJson ¶
func MakeDefaultRoles ¶
func MapBoolFromJson ¶
MapFromJson will decode the key/value pair map
func MapBoolToJson ¶
MapBoolToJson converts a map to a json string
func MapFromJson ¶
MapFromJson will decode the key/value pair map
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 NewRandomString ¶
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 NormalizeUsername ¶
func OAuthAppListToJson ¶
func OutgoingWebhookListToJson ¶
func OutgoingWebhookListToJson(l []*OutgoingWebhook) string
func PadDateStringZeros ¶
PadDateStringZeros is a convenience method to pad 2 digit date parts with zeros to meet ISO 8601 format
func ParseHashtags ¶
func PermissionsChangedByPatch ¶
Returns an array of permissions that are in either role.Permissions or patch.Permissions, but not both.
func PossibleAtMentions ¶
PossibleAtMentions returns all substrings in message that look like valid @ mentions.
func ReactionsToJson ¶
func RemoveDuplicateStrings ¶
func RoleListToJson ¶
func SchemeIDFromJson ¶
func SchemesToJson ¶
func SessionsToJson ¶
func StatusListToJson ¶
func StatusMapToInterfaceMap ¶
func StringFromJson ¶
func StringInterfaceFromJson ¶
func StringInterfaceToJson ¶
func StringToJson ¶
func TrimUsernameSpecialChar ¶
TrimUsernameSpecialChar tries to remove the last character from word if it is a special character for usernames (dot, dash or underscore). If not, it returns the same string.
func TruncateOpenGraph ¶
TruncateOpenGraph ensure OpenGraph metadata doesn't grow too big by shortening strings, trimming fields and reducing the number of images.
func UserAccessTokenListToJson ¶
func UserAccessTokenListToJson(t []*UserAccessToken) string
func UserListToJson ¶
func UserMapToJson ¶
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 (ad *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 ¶
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 ¶
AppErrorFromJson will decode the input and return an AppError
func InvalidUserError ¶
func IsValidEmojiName ¶
func NewAppError ¶
func (*AppError) SystemMessage ¶
func (er *AppError) SystemMessage(T goi18n.TranslateFunc) string
func (*AppError) Translate ¶
func (er *AppError) Translate(T goi18n.TranslateFunc)
type AttributeValue ¶
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 ¶
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 ¶
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 Branch ¶
type Branch struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` DisplayName string `json:"display_name"` Name string `json:"name"` Description string `json:"description"` Email string `json:"email"` SchoolId string `json:"school_id"` LastBranchIconUpdate int64 `json:"last_branch_icon_update,omitempty"` SchemeId *string `json:"scheme_id"` }
func BranchFromJson ¶
func BranchListFromJson ¶
func (*Branch) Patch ¶
func (o *Branch) Patch(patch *BranchPatch)
type BranchForExport ¶
type BranchMember ¶
type BranchMember struct { BranchId string `json:"branch_id"` UserId string `json:"user_id"` Roles string `json:"roles"` DeleteAt int64 `json:"delete_at"` SchemeUser bool `json:"scheme_user"` SchemeAdmin bool `json:"scheme_admin"` ExplicitRoles string `json:"explicit_roles"` }
func BranchMemberFromJson ¶
func BranchMemberFromJson(data io.Reader) *BranchMember
func BranchMembersFromJson ¶
func BranchMembersFromJson(data io.Reader) []*BranchMember
func BranchMembersWithErrorToBranchMembers ¶
func BranchMembersWithErrorToBranchMembers(o []*BranchMemberWithError) []*BranchMember
func (*BranchMember) GetRoles ¶
func (o *BranchMember) GetRoles() []string
func (*BranchMember) IsValid ¶
func (o *BranchMember) IsValid() *AppError
func (*BranchMember) PreUpdate ¶
func (o *BranchMember) PreUpdate()
func (*BranchMember) ToJson ¶
func (o *BranchMember) ToJson() string
type BranchMemberForExport ¶
type BranchMemberForExport struct { BranchMember BranchName string }
type BranchMemberWithError ¶
type BranchMemberWithError struct { UserId string `json:"user_id"` Member *BranchMember `json:"member"` Error *AppError `json:"error"` }
func BranchMembersWithErrorFromJson ¶
func BranchMembersWithErrorFromJson(data io.Reader) []*BranchMemberWithError
type BranchMembersGetOptions ¶
type BranchMembersGetOptions struct { // Sort the branch members. Accepts "Username", but defaults to "Id". Sort string // If true, exclude branch members whose corresponding user is deleted. ExcludeDeletedUsers bool // Restrict to search in a list of branches and channels ViewRestrictions *ViewUsersRestrictions }
type BranchPatch ¶
type BranchPatch struct { DisplayName *string `json:"display_name"` Description *string `json:"description"` }
func BranchPatchFromJson ¶
func BranchPatchFromJson(data io.Reader) *BranchPatch
func (*BranchPatch) ToJson ¶
func (t *BranchPatch) ToJson() string
type BranchSettings ¶
type BranchSettings struct { SiteName *string MaxUsersPerBranch *int DEPRECATED_DO_NOT_USE_EnableBranchCreation *bool `json:"EnableBranchCreation" mapstructure:"EnableBranchCreation"` // This field is deprecated and must not be used. EnableUserCreation *bool EnableOpenServer *bool EnableUserDeactivation *bool RestrictCreationToDomains *string EnableCustomBrand *bool CustomBrandText *string CustomDescriptionText *string RestrictDirectMessage *string DEPRECATED_DO_NOT_USE_RestrictBranchInvite *string `json:"RestrictBranchInvite" mapstructure:"RestrictBranchInvite"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPublicClassManagement *string `json:"RestrictPublicClassManagement" mapstructure:"RestrictPublicClassManagement"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateClassManagement *string `json:"RestrictPrivateClassManagement" mapstructure:"RestrictPrivateClassManagement"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPublicClassCreation *string `json:"RestrictPublicClassCreation" mapstructure:"RestrictPublicClassCreation"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateClassCreation *string `json:"RestrictPrivateClassCreation" mapstructure:"RestrictPrivateClassCreation"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPublicClassDeletion *string `json:"RestrictPublicClassDeletion" mapstructure:"RestrictPublicClassDeletion"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateClassDeletion *string `json:"RestrictPrivateClassDeletion" mapstructure:"RestrictPrivateClassDeletion"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateClassManageMembers *string `json:"RestrictPrivateClassManageMembers" mapstructure:"RestrictPrivateClassManageMembers"` // This field is deprecated and must not be used. EnableXToLeaveClassesFromLHS *bool UserStatusAwayTimeout *int64 MaxClassesPerBranch *int64 MaxNotificationsPerClass *int64 EnableConfirmNotificationsToClass *bool BranchmateNameDisplay *string ExperimentalViewArchivedClasses *bool ExperimentalEnableAutomaticReplies *bool ExperimentalHideTownSquareinLHS *bool ExperimentalTownSquareIsReadOnly *bool LockBranchmateNameDisplay *bool ExperimentalPrimaryBranch *string ExperimentalDefaultClasses []string }
func (*BranchSettings) SetDefaults ¶
func (s *BranchSettings) SetDefaults()
type BranchesWithCount ¶
type BranchesWithCount struct { Branches []*Branch `json:"branches"` TotalCount int64 `json:"total_count"` }
func BranchesWithCountFromJson ¶
func BranchesWithCountFromJson(data io.Reader) *BranchesWithCount
type ChannelMentionMap ¶
func ChannelMentionMapFromURLValues ¶
func ChannelMentionMapFromURLValues(values url.Values) (ChannelMentionMap, error)
func (ChannelMentionMap) ToURLValues ¶
func (m ChannelMentionMap) ToURLValues() url.Values
type Class ¶
type Class struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` BranchId string `json:"branch_id"` DisplayName string `json:"display_name"` Name string `json:"name"` Header string `json:"header"` Purpose string `json:"purpose"` ExtraUpdateAt int64 `json:"extra_update_at"` CreatorId string `json:"creator_id"` SchemeId *string `json:"scheme_id"` Props map[string]interface{} `json:"props" db:"-"` }
func ClassFromJson ¶
func ClassSliceFromJson ¶
func (*Class) GetOtherUserIdForDM ¶
func (*Class) MakeNonNil ¶
func (o *Class) MakeNonNil()
func (*Class) Patch ¶
func (o *Class) Patch(patch *ClassPatch)
type ClassForExport ¶
type ClassListWithBranchData ¶
type ClassListWithBranchData []*ClassWithBranchData
func ClassListWithBranchDataFromJson ¶
func ClassListWithBranchDataFromJson(data io.Reader) *ClassListWithBranchData
func (*ClassListWithBranchData) Etag ¶
func (o *ClassListWithBranchData) Etag() string
func (*ClassListWithBranchData) ToJson ¶
func (o *ClassListWithBranchData) ToJson() string
type ClassMember ¶
type ClassMember struct { ClassId string `json:"channel_id"` UserId string `json:"user_id"` Roles string `json:"roles"` 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 ClassMemberFromJson ¶
func ClassMemberFromJson(data io.Reader) *ClassMember
func (*ClassMember) GetRoles ¶
func (o *ClassMember) GetRoles() []string
func (*ClassMember) IsValid ¶
func (o *ClassMember) IsValid() *AppError
func (*ClassMember) PreSave ¶
func (o *ClassMember) PreSave()
func (*ClassMember) PreUpdate ¶
func (o *ClassMember) PreUpdate()
func (*ClassMember) ToJson ¶
func (o *ClassMember) ToJson() string
type ClassMemberForExport ¶
type ClassMemberForExport struct { ClassMember ClassName string Username string }
type ClassMembers ¶
type ClassMembers []ClassMember
func ClassMembersFromJson ¶
func ClassMembersFromJson(data io.Reader) *ClassMembers
func (*ClassMembers) ToJson ¶
func (o *ClassMembers) ToJson() string
type ClassModeratedRole ¶
type ClassModeratedRoles ¶
type ClassModeratedRoles struct {
Members *ClassModeratedRole `json:"members"`
}
type ClassModeratedRolesPatch ¶
type ClassModeratedRolesPatch struct {
Members *bool `json:"members"`
}
type ClassModeration ¶
type ClassModeration struct { Name string `json:"name"` Roles *ClassModeratedRoles `json:"roles"` }
func ClassModerationsFromJson ¶
func ClassModerationsFromJson(data io.Reader) []*ClassModeration
type ClassModerationPatch ¶
type ClassModerationPatch struct { Name *string `json:"name"` Roles *ClassModeratedRolesPatch `json:"roles"` }
func ClassModerationsPatchFromJson ¶
func ClassModerationsPatchFromJson(data io.Reader) []*ClassModerationPatch
type ClassPatch ¶
type ClassPatch struct { DisplayName *string `json:"display_name"` Name *string `json:"name"` Header *string `json:"header"` Purpose *string `json:"purpose"` }
func ClassPatchFromJson ¶
func ClassPatchFromJson(data io.Reader) *ClassPatch
func (*ClassPatch) ToJson ¶
func (o *ClassPatch) ToJson() string
type ClassSearchOpts ¶
type ClassSearchOpts struct { NotAssociatedToGroup string ExcludeDefaultClasses bool IncludeDeleted bool ExcludeClassNames []string Page *int PerPage *int }
ClassSearchOpts contains options for searching classes.
NotAssociatedToGroup will exclude classes that have associated, active GroupClasses records. ExcludeDefaultClasses will exclude the configured default classes (ex 'town-square' and 'off-topic'). IncludeDeleted will include class records where DeleteAt != 0. ExcludeClassNames will exclude classes from the results by name. Paginate whether to paginate the results. Page page requested, if results are paginated. PerPage number of results per page, if paginated.
type ClassWithBranchData ¶
type ClassesWithCount ¶
type ClassesWithCount struct { Classes *ClassListWithBranchData `json:"classes"` TotalCount int64 `json:"total_count"` }
func ClassesWithCountFromJson ¶
func ClassesWithCountFromJson(data io.Reader) *ClassesWithCount
func (*ClassesWithCount) ToJson ¶
func (o *ClassesWithCount) ToJson() []byte
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 (*Client4) AttachDeviceId ¶
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) AutocompleteEmoji ¶
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) CheckUserMfa ¶
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) ClearServerBusy ¶
ClearServerBusy will mark the server as not busy.
func (*Client4) CreateCommand ¶
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) CreateEmoji ¶
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) CreateIncomingWebhook ¶
func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
CreateIncomingWebhook creates an incoming webhook for a channel.
func (*Client4) CreateOAuthApp ¶
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) CreateScheme ¶
CreateScheme creates a new Scheme.
func (*Client4) CreateTermsOfService ¶
func (c *Client4) CreateTermsOfService(text, userId string) (*TermsOfService, *Response)
CreateTermsOfService creates new terms of service.
func (*Client4) CreateUser ¶
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 ¶
CreateUserWithInviteId creates a user in the system based on the provided invited id.
func (*Client4) CreateUserWithToken ¶
CreateUserWithToken creates a user in the system based on the provided tokenId.
func (*Client4) DatabaseRecycle ¶
DatabaseRecycle will recycle the connections. Discard current connection and get new one.
func (*Client4) DeauthorizeOAuthApp ¶
DeauthorizeOAuthApp will deauthorize an OAuth 2.0 client application from accessing a user's account.
func (*Client4) DeleteBrandImage ¶
DeleteBrandImage deletes the brand image for the system.
func (*Client4) DeleteCommand ¶
DeleteCommand deletes a command based on the provided command id string.
func (*Client4) DeleteEmoji ¶
DeleteEmoji delete an custom emoji on the provided emoji id string.
func (*Client4) DeleteIncomingWebhook ¶
DeleteIncomingWebhook deletes and Incoming Webhook given the hook ID.
func (*Client4) DeleteOAuthApp ¶
DeleteOAuthApp deletes a registered OAuth 2.0 client application.
func (*Client4) DeleteOutgoingWebhook ¶
DeleteOutgoingWebhook delete the outgoing webhook on the system requested by Hook Id.
func (*Client4) DeletePreferences ¶
func (c *Client4) DeletePreferences(userId string, preferences *Preferences) (bool, *Response)
DeletePreferences deletes the user's preferences.
func (*Client4) DeleteReaction ¶
DeleteReaction deletes reaction of a user in a post.
func (*Client4) DeleteSamlIdpCertificate ¶
DeleteSamlIdpCertificate deletes the SAML IDP certificate from the server and updates the config to not use it and disable SAML.
func (*Client4) DeleteSamlPrivateCertificate ¶
DeleteSamlPrivateCertificate deletes the SAML IDP certificate from the server and updates the config to not use it and disable SAML.
func (*Client4) DeleteSamlPublicCertificate ¶
DeleteSamlPublicCertificate deletes the SAML IDP certificate from the server and updates the config to not use it and disable SAML.
func (*Client4) DeleteScheme ¶
DeleteScheme deletes a single scheme by ID.
func (*Client4) DeleteUser ¶
DeleteUser deactivates a user in the system based on the provided user id string.
func (*Client4) DemoteUserToGuest ¶
DemoteUserToGuest convert a regular user into a guest
func (*Client4) DisableUserAccessToken ¶
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) DoApiRequest ¶
func (*Client4) DoEmojiUploadFile ¶
func (*Client4) DoUploadFile ¶
func (*Client4) DoUploadImportTeam ¶
func (*Client4) DownloadComplianceReport ¶
DownloadComplianceReport returns a full compliance report as a file.
func (*Client4) DownloadFile ¶
DownloadFile gets the bytes for a file by id, optionally adding headers to force the browser to download it.
func (*Client4) DownloadFilePreview ¶
DownloadFilePreview gets the bytes for a file by id.
func (*Client4) DownloadFileThumbnail ¶
DownloadFileThumbnail gets the bytes for a file by id, optionally adding headers to force the browser to download it.
func (*Client4) EnableUserAccessToken ¶
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) GenerateMfaSecret ¶
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) 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 (*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) GetBotRoute ¶
func (*Client4) GetBotsRoute ¶
func (*Client4) GetBrandImage ¶
GetBrandImage retrieves the previously uploaded brand image.
func (*Client4) GetBrandRoute ¶
func (*Client4) GetBulkReactions ¶
FetchBulkReactions returns a map of postIds and corresponding reactions
func (*Client4) GetCacheRoute ¶
func (*Client4) GetChannelByNameForTeamNameRoute ¶
func (*Client4) GetChannelByNameRoute ¶
func (*Client4) GetChannelMemberRoute ¶
func (*Client4) GetChannelMembersRoute ¶
func (*Client4) GetChannelRoute ¶
func (*Client4) GetChannelSchemeRoute ¶
func (*Client4) GetChannelsForTeamForUserRoute ¶
func (*Client4) GetChannelsForTeamRoute ¶
func (*Client4) GetChannelsRoute ¶
func (*Client4) GetClusterRoute ¶
func (*Client4) GetClusterStatus ¶
func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response)
GetClusterStatus returns the status of all the configured cluster nodes.
func (*Client4) GetCommandById ¶
GetCommandById will retrieve a command by id.
func (*Client4) GetCommandMoveRoute ¶
func (*Client4) GetCommandRoute ¶
func (*Client4) GetCommandsRoute ¶
func (*Client4) GetComplianceReport ¶
func (c *Client4) GetComplianceReport(reportId string) (*Compliance, *Response)
GetComplianceReport returns a compliance report.
func (*Client4) GetComplianceReportRoute ¶
func (*Client4) GetComplianceReports ¶
func (c *Client4) GetComplianceReports(page, perPage int) (Compliances, *Response)
GetComplianceReports returns list of compliance reports.
func (*Client4) GetComplianceReportsRoute ¶
func (*Client4) GetConfigRoute ¶
func (*Client4) GetDataRetentionPolicy ¶
func (c *Client4) GetDataRetentionPolicy() (*DataRetentionPolicy, *Response)
GetDataRetentionPolicy will get the current server data retention policy details.
func (*Client4) GetDataRetentionRoute ¶
func (*Client4) GetDatabaseRoute ¶
func (*Client4) GetDefaultProfileImage ¶
GetDefaultProfileImage gets the default user's profile image. Must be logged in.
func (*Client4) GetElasticsearchRoute ¶
func (*Client4) GetEmojiByName ¶
GetEmojiByName returns a custom emoji based on the name string.
func (*Client4) GetEmojiByNameRoute ¶
func (*Client4) GetEmojiImage ¶
GetEmojiImage returns the emoji image.
func (*Client4) GetEmojiList ¶
GetEmojiList returns a page of custom emoji on the system.
func (*Client4) GetEmojiRoute ¶
func (*Client4) GetEmojisRoute ¶
func (*Client4) GetEnvironmentConfig ¶
GetEnvironmentConfig will retrieve a map mirroring the server configuration where fields are set to true if the corresponding config setting is set through an environment variable. Settings that haven't been set through environment variables will be missing from the map.
func (*Client4) GetFileInfo ¶
GetFileInfo gets all the file info objects.
func (*Client4) GetFileInfosForPost ¶
GetFileInfosForPost gets all the file info objects attached to a post.
func (*Client4) GetFileLink ¶
GetFileLink gets the public link of a file by id.
func (*Client4) GetFilePreview ¶
GetFilePreview gets the bytes for a file by id.
func (*Client4) GetFileRoute ¶
func (*Client4) GetFileThumbnail ¶
GetFileThumbnail gets the bytes for a file by id.
func (*Client4) GetFilesRoute ¶
func (*Client4) GetIncomingWebhook ¶
func (c *Client4) GetIncomingWebhook(hookID string, etag string) (*IncomingWebhook, *Response)
GetIncomingWebhook returns an Incoming webhook given the hook ID.
func (*Client4) GetIncomingWebhookRoute ¶
func (*Client4) GetIncomingWebhooks ¶
func (c *Client4) GetIncomingWebhooks(page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
GetIncomingWebhooks returns a page of incoming webhooks on the system. Page counting starts at 0.
func (*Client4) GetIncomingWebhooksForTeam ¶
func (c *Client4) GetIncomingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
GetIncomingWebhooksForTeam returns a page of incoming webhooks for a team. Page counting starts at 0.
func (*Client4) GetIncomingWebhooksRoute ¶
func (*Client4) GetJobs ¶
GetJobs gets all jobs, sorted with the job that was created most recently first.
func (*Client4) GetJobsByType ¶
GetJobsByType gets all jobs of a given type, sorted with the job that was created most recently first.
func (*Client4) GetJobsRoute ¶
func (*Client4) GetLdapRoute ¶
func (*Client4) GetLicenseRoute ¶
func (*Client4) GetNewUsersInTeam ¶
func (c *Client4) GetNewUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetNewUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetOAuthAccessToken ¶
func (c *Client4) GetOAuthAccessToken(data url.Values) (*AccessResponse, *Response)
GetOAuthAccessToken is a test helper function for the OAuth access token endpoint.
func (*Client4) GetOAuthApp ¶
GetOAuthApp gets a registered OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) GetOAuthAppInfo ¶
GetOAuthAppInfo gets a sanitized version of a registered OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) GetOAuthAppRoute ¶
func (*Client4) GetOAuthApps ¶
GetOAuthApps gets a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) GetOAuthAppsRoute ¶
func (*Client4) GetOldClientConfig ¶
GetOldClientConfig will retrieve the parts of the server configuration needed by the client, formatted in the old format.
func (*Client4) GetOldClientLicense ¶
GetOldClientLicense will retrieve the parts of the server license needed by the client, formatted in the old format.
func (*Client4) GetOpenGraphRoute ¶
func (*Client4) GetOutgoingWebhook ¶
func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response)
GetOutgoingWebhook outgoing webhooks on the system requested by Hook Id.
func (*Client4) GetOutgoingWebhookRoute ¶
func (*Client4) GetOutgoingWebhooks ¶
func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
GetOutgoingWebhooks returns a page of outgoing webhooks on the system. Page counting starts at 0.
func (*Client4) GetOutgoingWebhooksForChannel ¶
func (c *Client4) GetOutgoingWebhooksForChannel(channelId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
GetOutgoingWebhooksForChannel returns a page of outgoing webhooks for a channel. Page counting starts at 0.
func (*Client4) GetOutgoingWebhooksForTeam ¶
func (c *Client4) GetOutgoingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
GetOutgoingWebhooksForTeam returns a page of outgoing webhooks for a team. Page counting starts at 0.
func (*Client4) GetOutgoingWebhooksRoute ¶
func (*Client4) GetPing ¶
GetPing will return ok if the running goRoutines are below the threshold and unhealthy for above.
func (*Client4) GetPingWithServerStatus ¶
GetPingWithServerStatus will return ok if several basic server health checks all pass successfully.
func (*Client4) GetPluginRoute ¶
func (*Client4) GetPluginsRoute ¶
func (*Client4) GetPostRoute ¶
func (*Client4) GetPostsEphemeralRoute ¶
func (*Client4) GetPostsRoute ¶
func (*Client4) GetPreferenceByCategoryAndName ¶
func (c *Client4) GetPreferenceByCategoryAndName(userId string, category string, preferenceName string) (*Preference, *Response)
GetPreferenceByCategoryAndName returns the user's preferences from the provided category and preference name string.
func (*Client4) GetPreferences ¶
func (c *Client4) GetPreferences(userId string) (Preferences, *Response)
GetPreferences returns the user's preferences.
func (*Client4) GetPreferencesByCategory ¶
func (c *Client4) GetPreferencesByCategory(userId string, category string) (Preferences, *Response)
GetPreferencesByCategory returns the user's preferences from the provided category string.
func (*Client4) GetPreferencesRoute ¶
func (*Client4) GetProfileImage ¶
GetProfileImage gets user's profile image. Must be logged in.
func (*Client4) GetReactions ¶
GetReactions returns a list of reactions to a post.
func (*Client4) GetReactionsRoute ¶
func (*Client4) GetRecentlyActiveUsersInTeam ¶
func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetRecentlyActiveUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetRedirectLocation ¶
GetRedirectLocation retrieves the value of the 'Location' header of an HTTP response for a given URL.
func (*Client4) GetRedirectLocationRoute ¶
func (*Client4) GetRoleByName ¶
GetRoleByName gets a single role by Name.
func (*Client4) GetRolesByNames ¶
GetRolesByNames returns a list of roles based on the provided role names.
func (*Client4) GetRolesRoute ¶
func (*Client4) GetSamlCertificateStatus ¶
func (c *Client4) GetSamlCertificateStatus() (*SamlCertificateStatus, *Response)
GetSamlCertificateStatus returns metadata for the SAML configuration.
func (*Client4) GetSamlMetadata ¶
GetSamlMetadata returns metadata for the SAML configuration.
func (*Client4) GetSamlMetadataFromIdp ¶
func (c *Client4) GetSamlMetadataFromIdp(samlMetadataURL string) (*SamlMetadataResponse, *Response)
func (*Client4) GetSamlRoute ¶
func (*Client4) GetSchemeRoute ¶
func (*Client4) GetSchemes ¶
GetSchemes gets all schemes, sorted with the most recently created first, optionally filtered by scope.
func (*Client4) GetSchemesRoute ¶
func (*Client4) GetServerBusy ¶
func (c *Client4) GetServerBusy() (*ServerBusyState, *Response)
GetServerBusy returns the current ServerBusyState including the time when a server marked busy will automatically have the flag cleared.
func (*Client4) GetServerBusyExpires
deprecated
func (*Client4) GetServerBusyRoute ¶
func (*Client4) GetSessions ¶
GetSessions returns a list of sessions based on the provided user id string.
func (*Client4) GetSortedEmojiList ¶
GetSortedEmojiList returns a page of custom emoji on the system sorted based on the sort parameter, blank for no sorting and "name" to sort by emoji names.
func (*Client4) GetSupportedTimezone ¶
GetSupportedTimezone returns a page of supported timezones on the system.
func (*Client4) GetSystemRoute ¶
func (*Client4) GetTeamAutoCompleteCommandsRoute ¶
func (*Client4) GetTeamByNameRoute ¶
func (*Client4) GetTeamImportRoute ¶
func (*Client4) GetTeamMemberRoute ¶
func (*Client4) GetTeamMembersRoute ¶
func (*Client4) GetTeamRoute ¶
func (*Client4) GetTeamSchemeRoute ¶
func (*Client4) GetTeamStatsRoute ¶
func (*Client4) GetTeamsRoute ¶
func (*Client4) GetTermsOfService ¶
func (c *Client4) GetTermsOfService(etag string) (*TermsOfService, *Response)
GetTermsOfService fetches the latest terms of service
func (*Client4) GetTermsOfServiceRoute ¶
func (*Client4) GetTestEmailRoute ¶
func (*Client4) GetTestS3Route ¶
func (*Client4) GetTestSiteURLRoute ¶
func (*Client4) GetTimezonesRoute ¶
func (*Client4) GetTotalUsersStatsRoute ¶
func (*Client4) GetUserAccessToken ¶
func (c *Client4) GetUserAccessToken(tokenId string) (*UserAccessToken, *Response)
GetUserAccessToken will get a user access tokens' id, description, is_active and the user_id of the user it is for. The actual token will not be returned. Must have the 'read_user_access_token' permission and if getting for another user, must have the 'edit_other_users' permission.
func (*Client4) GetUserAccessTokenRoute ¶
func (*Client4) GetUserAccessTokens ¶
func (c *Client4) GetUserAccessTokens(page int, perPage int) ([]*UserAccessToken, *Response)
GetUserAccessTokens will get a page of access tokens' id, description, is_active and the user_id in the system. The actual token will not be returned. Must have the 'manage_system' permission.
func (*Client4) GetUserAccessTokensForUser ¶
func (c *Client4) GetUserAccessTokensForUser(userId string, page, perPage int) ([]*UserAccessToken, *Response)
GetUserAccessTokensForUser will get a paged list of user access tokens showing id, description and user_id for each. The actual tokens will not be returned. Must have the 'read_user_access_token' permission and if getting for another user, must have the 'edit_other_users' permission.
func (*Client4) GetUserAccessTokensRoute ¶
func (*Client4) GetUserAudits ¶
func (c *Client4) GetUserAudits(userId string, page int, perPage int, etag string) (Audits, *Response)
GetUserAudits returns a list of audit based on the provided user id string.
func (*Client4) GetUserByEmail ¶
GetUserByEmail returns a user based on the provided user email string.
func (*Client4) GetUserByEmailRoute ¶
func (*Client4) GetUserByUsername ¶
GetUserByUsername returns a user based on the provided user name string.
func (*Client4) GetUserByUsernameRoute ¶
func (*Client4) GetUserRoute ¶
func (*Client4) GetUserStatus ¶
GetUserStatus returns a user based on the provided user id string.
func (*Client4) GetUserStatusRoute ¶
func (*Client4) GetUserStatusesRoute ¶
func (*Client4) GetUserTermsOfService ¶
func (c *Client4) GetUserTermsOfService(userId, etag string) (*UserTermsOfService, *Response)
GetUserTermsOfService fetches user's latest terms of service action if the latest action was for acceptance.
func (*Client4) GetUserTermsOfServiceRoute ¶
func (*Client4) GetUsers ¶
GetUsers returns a page of users on the system. Page counting starts at 0.
func (*Client4) GetUsersByIds ¶
GetUsersByIds returns a list of users based on the provided user ids.
func (*Client4) GetUsersByIdsWithOptions ¶
func (c *Client4) GetUsersByIdsWithOptions(userIds []string, options *UserGetByIdsOptions) ([]*User, *Response)
GetUsersByIds returns a list of users based on the provided user ids.
func (*Client4) GetUsersByUsernames ¶
GetUsersByUsernames returns a list of users based on the provided usernames.
func (*Client4) GetUsersInChannel ¶
func (c *Client4) GetUsersInChannel(channelId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersInChannel returns a page of users in a channel. Page counting starts at 0.
func (*Client4) GetUsersInChannelByStatus ¶
func (c *Client4) GetUsersInChannelByStatus(channelId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersInChannelByStatus returns a page of users in a channel. Page counting starts at 0. Sorted by Status
func (*Client4) GetUsersInTeam ¶
func (c *Client4) GetUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetUsersNotInChannel ¶
func (c *Client4) GetUsersNotInChannel(teamId, channelId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersNotInChannel returns a page of users not in a channel. Page counting starts at 0.
func (*Client4) GetUsersNotInTeam ¶
func (c *Client4) GetUsersNotInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersNotInTeam returns a page of users who are not in a team. Page counting starts at 0.
func (*Client4) GetUsersRoute ¶
func (*Client4) GetUsersStatusesByIds ¶
GetUsersStatusesByIds returns a list of users status based on the provided user ids.
func (*Client4) GetUsersWithoutTeam ¶
GetUsersWithoutTeam returns a page of users on the system that aren't on any teams. Page counting starts at 0.
func (*Client4) InvalidateCaches ¶
InvalidateCaches will purge the cache and can affect the performance while is cleaning.
func (*Client4) ListAutocompleteCommands ¶
ListAutocompleteCommands will retrieve a list of commands available in the team.
func (*Client4) ListCommands ¶
ListCommands will retrieve a list of commands available in the team.
func (*Client4) Login ¶
Login authenticates a user by login id, which can be username, email or some sort of SSO identifier based on server configuration, and a password.
func (*Client4) LoginByLdap ¶
LoginByLdap authenticates a user by LDAP id and password.
func (*Client4) LoginWithDevice ¶
func (c *Client4) LoginWithDevice(loginId string, password string, deviceId string) (*User, *Response)
LoginWithDevice authenticates a user by login id (username, email or some sort of SSO identifier based on configuration), password and attaches a device id to the session.
func (*Client4) LoginWithMFA ¶
LoginWithMFA logs a user in with a MFA token
func (*Client4) MockSession ¶
MockSession is deprecated in favour of SetToken
func (*Client4) MoveCommand ¶
MoveCommand moves a command to a different team.
func (*Client4) OpenGraph ¶
OpenGraph return the open graph metadata for a particular url if the site have the metadata.
func (*Client4) PatchRole ¶
PatchRole partially updates a role in the system. Any missing fields are not updated.
func (*Client4) PatchScheme ¶
func (c *Client4) PatchScheme(id string, patch *SchemePatch) (*Scheme, *Response)
PatchScheme partially updates a scheme in the system. Any missing fields are not updated.
func (*Client4) PatchUser ¶
PatchUser partially updates a user in the system. Any missing fields are not updated.
func (*Client4) PostLog ¶
PostLog is a convenience Web Service call so clients can log messages into the server-side logs. For example we typically log javascript error messages into the server-side. It returns the log message if the logging was successful.
func (*Client4) PromoteGuestToUser ¶
PromoteGuestToUser convert a guest into a regular user
func (*Client4) PurgeElasticsearchIndexes ¶
PurgeElasticsearchIndexes immediately deletes all Elasticsearch indexes.
func (*Client4) RegenCommandToken ¶
RegenCommandToken will create a new token if the user have the right permissions.
func (*Client4) RegenOutgoingHookToken ¶
func (c *Client4) RegenOutgoingHookToken(hookId string) (*OutgoingWebhook, *Response)
RegenOutgoingHookToken regenerate the outgoing webhook token.
func (*Client4) RegenerateOAuthAppSecret ¶
RegenerateOAuthAppSecret regenerates the client secret for a registered OAuth 2.0 client application.
func (*Client4) RegisterTermsOfServiceAction ¶
func (c *Client4) RegisterTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) (*bool, *Response)
RegisterTermsOfServiceAction saves action performed by a user against a specific terms of service.
func (*Client4) ReloadConfig ¶
ReloadConfig will reload the server configuration.
func (*Client4) RemoveLicenseFile ¶
RemoveLicenseFile will remove the server license it exists. Note that this will disable all enterprise features.
func (*Client4) ResetPassword ¶
ResetPassword uses a recovery code to update reset a user's password.
func (*Client4) RevokeAllSessions ¶
RevokeAllSessions revokes all sessions for the provided user id string.
func (*Client4) RevokeSession ¶
RevokeSession revokes a user session based on the provided user id and session id strings.
func (*Client4) RevokeSessionsFromAllUsers ¶
RevokeAllSessions revokes all sessions for all the users.
func (*Client4) RevokeUserAccessToken ¶
RevokeUserAccessToken will revoke a user access token by id. Must have the 'revoke_user_access_token' permission and if revoking for another user, must have the 'edit_other_users' permission.
func (*Client4) SaveReaction ¶
SaveReaction saves an emoji reaction for a post. Returns the saved reaction if successful, otherwise an error will be returned.
func (*Client4) SearchEmoji ¶
func (c *Client4) SearchEmoji(search *EmojiSearch) ([]*Emoji, *Response)
SearchEmoji returns a list of emoji matching some search criteria.
func (*Client4) SearchUserAccessTokens ¶
func (c *Client4) SearchUserAccessTokens(search *UserAccessTokenSearch) ([]*UserAccessToken, *Response)
SearchUserAccessTokens returns user access tokens matching the provided search term.
func (*Client4) SearchUsers ¶
func (c *Client4) SearchUsers(search *UserSearch) ([]*User, *Response)
SearchUsers returns a list of users based on some search criteria.
func (*Client4) SendPasswordResetEmail ¶
SendPasswordResetEmail will send a link for password resetting to a user with the provided email.
func (*Client4) SendVerificationEmail ¶
SendVerificationEmail will send an email to the user with the provided email address, if that user exists. The email will contain a link that can be used to verify the user's email address.
func (*Client4) SetDefaultProfileImage ¶
SetDefaultProfileImage resets the profile image to a default generated one.
func (*Client4) SetOAuthToken ¶
func (*Client4) SetProfileImage ¶
SetProfileImage sets profile image of the user.
func (*Client4) SetServerBusy ¶
SetServerBusy will mark the server as busy, which disables non-critical services for `secs` seconds.
func (*Client4) SwitchAccountType ¶
func (c *Client4) SwitchAccountType(switchRequest *SwitchRequest) (string, *Response)
SwitchAccountType changes a user's login type from one type to another.
func (*Client4) TestElasticsearch ¶
TestElasticsearch will attempt to connect to the configured Elasticsearch server and return OK if configured. correctly.
func (*Client4) TestLdap ¶
TestLdap will attempt to connect to the configured LDAP server and return OK if configured correctly.
func (*Client4) TestS3Connection ¶
TestS3Connection will attempt to connect to the AWS S3.
func (*Client4) TestSiteURL ¶
TestSiteURL will test the validity of a site URL.
func (*Client4) UpdateCommand ¶
UpdateCommand updates a command based on the provided Command struct.
func (*Client4) UpdateConfig ¶
UpdateConfig will update the server configuration.
func (*Client4) UpdateIncomingWebhook ¶
func (c *Client4) UpdateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
UpdateIncomingWebhook updates an incoming webhook for a channel.
func (*Client4) UpdateOAuthApp ¶
UpdateOAuthApp updates a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) UpdateOutgoingWebhook ¶
func (c *Client4) UpdateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
UpdateOutgoingWebhook creates an outgoing webhook for a team or channel.
func (*Client4) UpdatePreferences ¶
func (c *Client4) UpdatePreferences(userId string, preferences *Preferences) (bool, *Response)
UpdatePreferences saves the user's preferences.
func (*Client4) UpdateUser ¶
UpdateUser updates a user in the system based on the provided user struct.
func (*Client4) UpdateUserActive ¶
UpdateUserActive updates status of a user whether active or not.
func (*Client4) UpdateUserAuth ¶
UpdateUserAuth updates a user AuthData (uthData, authService and password) in the system.
func (*Client4) UpdateUserMfa ¶
UpdateUserMfa activates multi-factor authentication for a user if activate is true and a valid code is provided. If activate is false, then code is not required and multi-factor authentication is disabled for the user.
func (*Client4) UpdateUserPassword ¶
UpdateUserPassword updates a user's password. Must be logged in as the user or be a system administrator.
func (*Client4) UpdateUserRoles ¶
UpdateUserRoles updates a user's roles in the system. A user can have "system_user" and "system_admin" roles.
func (*Client4) UpdateUserStatus ¶
UpdateUserStatus sets a user's status based on the provided user id string.
func (*Client4) UploadBrandImage ¶
UploadBrandImage sets the brand image for the system.
func (*Client4) UploadFile ¶
func (c *Client4) UploadFile(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
UploadFile will upload a file to a channel using a multipart request, to be later attached to a post. This method is functionally equivalent to Client4.UploadFileAsRequestBody.
func (*Client4) UploadFileAsRequestBody ¶
func (c *Client4) UploadFileAsRequestBody(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
UploadFileAsRequestBody will upload a file to a channel as the body of a request, to be later attached to a post. This method is functionally equivalent to Client4.UploadFile.
func (*Client4) UploadLicenseFile ¶
UploadLicenseFile will add a license file to the system.
func (*Client4) UploadSamlIdpCertificate ¶
UploadSamlIdpCertificate will upload an IDP certificate for SAML and set the config to use it. The filename parameter is deprecated and ignored: the server will pick a hard-coded filename when writing to disk.
func (*Client4) UploadSamlPrivateCertificate ¶
UploadSamlPrivateCertificate will upload a private key for SAML and set the config to use it. The filename parameter is deprecated and ignored: the server will pick a hard-coded filename when writing to disk.
func (*Client4) UploadSamlPublicCertificate ¶
UploadSamlPublicCertificate will upload a public certificate for SAML and set the config to use it. The filename parameter is deprecated and ignored: the server will pick a hard-coded filename when writing to disk.
type ClientRequirements ¶
type ClientRequirements struct { AndroidLatestVersion string `restricted:"true"` AndroidMinVersion string `restricted:"true"` DesktopLatestVersion string `restricted:"true"` DesktopMinVersion string `restricted:"true"` IosLatestVersion string `restricted:"true"` IosMinVersion string `restricted:"true"` }
type ClusterDiscovery ¶
type ClusterDiscovery struct { Id string `json:"id"` Type string `json:"type"` ClusterName string `json:"cluster_name"` Hostname string `json:"hostname"` GossipPort int32 `json:"gossip_port"` Port int32 `json:"port"` CreateAt int64 `json:"create_at"` LastPingAt int64 `json:"last_ping_at"` }
func ClusterDiscoveryFromJson ¶
func ClusterDiscoveryFromJson(data io.Reader) *ClusterDiscovery
func FilterClusterDiscovery ¶
func FilterClusterDiscovery(vs []*ClusterDiscovery, f func(*ClusterDiscovery) bool) []*ClusterDiscovery
func (*ClusterDiscovery) AutoFillHostname ¶
func (o *ClusterDiscovery) AutoFillHostname()
func (*ClusterDiscovery) AutoFillIpAddress ¶
func (o *ClusterDiscovery) AutoFillIpAddress(iface string, ipAddress string)
func (*ClusterDiscovery) IsEqual ¶
func (o *ClusterDiscovery) IsEqual(in *ClusterDiscovery) bool
func (*ClusterDiscovery) IsValid ¶
func (o *ClusterDiscovery) IsValid() *AppError
func (*ClusterDiscovery) PreSave ¶
func (o *ClusterDiscovery) PreSave()
func (*ClusterDiscovery) ToJson ¶
func (o *ClusterDiscovery) ToJson() string
type ClusterInfo ¶
type ClusterInfo struct { Id string `json:"id"` Version string `json:"version"` ConfigHash string `json:"config_hash"` IpAddress string `json:"ipaddress"` Hostname string `json:"hostname"` }
func ClusterInfoFromJson ¶
func ClusterInfoFromJson(data io.Reader) *ClusterInfo
func ClusterInfosFromJson ¶
func ClusterInfosFromJson(data io.Reader) []*ClusterInfo
func (*ClusterInfo) ToJson ¶
func (me *ClusterInfo) ToJson() string
type ClusterMessage ¶
type ClusterMessage struct { Event string `json:"event"` SendType string `json:"-"` WaitForAllToSend bool `json:"-"` Data string `json:"data,omitempty"` Props map[string]string `json:"props,omitempty"` }
func ClusterMessageFromJson ¶
func ClusterMessageFromJson(data io.Reader) *ClusterMessage
func (*ClusterMessage) ToJson ¶
func (o *ClusterMessage) ToJson() string
type ClusterSettings ¶
type ClusterSettings struct { Enable *bool `restricted:"true"` ClusterName *string `restricted:"true"` OverrideHostname *string `restricted:"true"` NetworkInterface *string `restricted:"true"` BindAddress *string `restricted:"true"` AdvertiseAddress *string `restricted:"true"` UseIpAddress *bool `restricted:"true"` UseExperimentalGossip *bool `restricted:"true"` ReadOnlyConfig *bool `restricted:"true"` GossipPort *int `restricted:"true"` StreamingPort *int `restricted:"true"` MaxIdleConns *int `restricted:"true"` MaxIdleConnsPerHost *int `restricted:"true"` IdleConnTimeoutMilliseconds *int `restricted:"true"` }
func (*ClusterSettings) SetDefaults ¶
func (s *ClusterSettings) SetDefaults()
type ClusterStats ¶
type ClusterStats struct { Id string `json:"id"` TotalWebsocketConnections int `json:"total_websocket_connections"` TotalReadDbConnections int `json:"total_read_db_connections"` TotalMasterDbConnections int `json:"total_master_db_connections"` }
func ClusterStatsFromJson ¶
func ClusterStatsFromJson(data io.Reader) *ClusterStats
func (*ClusterStats) ToJson ¶
func (me *ClusterStats) ToJson() string
type Command ¶
type Command struct { Id string `json:"id"` Token string `json:"token"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` CreatorId string `json:"creator_id"` TeamId string `json:"team_id"` Trigger string `json:"trigger"` Method string `json:"method"` Username string `json:"username"` IconURL string `json:"icon_url"` AutoComplete bool `json:"auto_complete"` AutoCompleteDesc string `json:"auto_complete_desc"` AutoCompleteHint string `json:"auto_complete_hint"` DisplayName string `json:"display_name"` Description string `json:"description"` URL string `json:"url"` }
func CommandFromJson ¶
func CommandListFromJson ¶
type CommandArgs ¶
type CommandArgs struct { UserId string `json:"user_id"` ChannelId string `json:"channel_id"` TeamId string `json:"team_id"` RootId string `json:"root_id"` ParentId string `json:"parent_id"` TriggerId string `json:"trigger_id,omitempty"` Command string `json:"command"` SiteURL string `json:"-"` T goi18n.TranslateFunc `json:"-"` Session Session `json:"-"` UserMentions UserMentionMap `json:"-"` ChannelMentions ChannelMentionMap `json:"-"` }
func CommandArgsFromJson ¶
func CommandArgsFromJson(data io.Reader) *CommandArgs
func (*CommandArgs) AddChannelMention ¶
func (o *CommandArgs) AddChannelMention(channelName, channelId string)
AddChannelMention adds or overrides an entry in ChannelMentions with name channelName and identifier channelId
func (*CommandArgs) AddUserMention ¶
func (o *CommandArgs) AddUserMention(username, userId string)
AddUserMention adds or overrides an entry in UserMentions with name username and identifier userId
func (*CommandArgs) ToJson ¶
func (o *CommandArgs) ToJson() string
type CommandMoveRequest ¶
type CommandMoveRequest struct {
TeamId string `json:"team_id"`
}
func CommandMoveRequestFromJson ¶
func CommandMoveRequestFromJson(data io.Reader) (*CommandMoveRequest, error)
func (*CommandMoveRequest) ToJson ¶
func (cmr *CommandMoveRequest) ToJson() string
type CommandResponse ¶
type CommandResponse struct { ResponseType string `json:"response_type"` Text string `json:"text"` Username string `json:"username"` ClassId string `json:"class_id"` IconURL string `json:"icon_url"` Type string `json:"type"` Props StringInterface `json:"props"` GotoLocation string `json:"goto_location"` TriggerId string `json:"trigger_id"` SkipSlackParsing bool `json:"skip_slack_parsing"` // Set to `true` to skip the Slack-compatibility handling of Text. ExtraResponses []*CommandResponse `json:"extra_responses"` }
func CommandResponseFromHTTPBody ¶
func CommandResponseFromHTTPBody(contentType string, body io.Reader) (*CommandResponse, error)
func CommandResponseFromJson ¶
func CommandResponseFromJson(data io.Reader) (*CommandResponse, error)
func CommandResponseFromPlainText ¶
func CommandResponseFromPlainText(text string) *CommandResponse
func (*CommandResponse) ToJson ¶
func (o *CommandResponse) ToJson() string
type CommandWebhook ¶
type CommandWebhook struct { Id string CreateAt int64 CommandId string UserId string ChannelId string RootId string ParentId string UseCount int }
func (*CommandWebhook) IsValid ¶
func (o *CommandWebhook) IsValid() *AppError
func (*CommandWebhook) PreSave ¶
func (o *CommandWebhook) PreSave()
type Compliance ¶
type Compliance struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UserId string `json:"user_id"` Status string `json:"status"` Count int `json:"count"` Desc string `json:"desc"` Type string `json:"type"` StartAt int64 `json:"start_at"` EndAt int64 `json:"end_at"` Keywords string `json:"keywords"` Emails string `json:"emails"` }
func ComplianceFromJson ¶
func ComplianceFromJson(data io.Reader) *Compliance
func (*Compliance) IsValid ¶
func (c *Compliance) IsValid() *AppError