Documentation ¶
Index ¶
- Constants
- Variables
- func AddAncillaryPermissions(permissions []string) []string
- func AppErrorInit(t i18n.TranslateFunc)
- func ArrayFromInterface(data interface{}) []string
- func ArrayFromJSON(data io.Reader) []string
- func ArrayToJSON(objmap []string) string
- func AuditModelTypeConv(val interface{}) (newVal interface{}, converted bool)
- func ChannelMentions(message string) []string
- func ChannelModeratedPermissionsChangedByPatch(role *Role, patch *RolePatch) []string
- func CleanRoleNames(roleNames []string) ([]string, bool)
- func CleanTeamName(s string) string
- func CleanUsername(username string) string
- func ClearMentionTags(post string) string
- func CompliancePostHeader() []string
- func CopyStringMap(originalMap map[string]string) map[string]string
- func DecryptPostActionCookie(encoded string, secret []byte) (string, error)
- func EmailInviteWithErrorToEmails(o []*EmailInviteWithError) []string
- func EmailInviteWithErrorToString(o *EmailInviteWithError) string
- func Etag(parts ...interface{}) string
- func FloorToNearestHour(ms int64) int64
- func GenerateLinkMetadataHash(url string, timestamp int64) int64
- func GetDMNameFromIds(userId1, userId2 string) string
- func GetDefaultAppCustomURLSchemes() []string
- func GetEmojiNameFromUnicode(unicode string) (emojiName string, count int)
- 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 GetInfoForBytes(name string, data io.ReadSeeker, size int) (*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 GetTimeForMillis(millis int64) time.Time
- func HashPassword(password string) string
- func IncomingWebhookRequestFromJSON(data io.Reader) (*IncomingWebhookRequest, *AppError)
- func IsBotDMChannel(channel *Channel, botUserID string) bool
- func IsChannelMarkUnreadLevelValid(markUnreadLevel string) bool
- func IsChannelNotifyLevelValid(notifyLevel string) bool
- func IsCurrentVersion(versionToCheck string) bool
- func IsIgnoreChannelMentionsValid(ignoreChannelMentions string) bool
- func IsInRole(userRoles string, inRole string) bool
- func IsPreviousVersionsSupported(versionToCheck string) bool
- func IsReservedTeamName(s string) bool
- func IsSendEmailValid(sendEmail string) bool
- func IsValidAlphaNumHyphenUnderscore(s string, withFormat bool) bool
- func IsValidAlphaNumHyphenUnderscorePlus(s string) bool
- func IsValidCategoryId(s string) bool
- func IsValidChannelIdentifier(s string) bool
- func IsValidEmail(email string) bool
- func IsValidHTTPURL(rawURL string) bool
- func IsValidId(value string) bool
- func IsValidLocale(locale string) bool
- func IsValidPluginId(id string) bool
- func IsValidRemoteName(s string) bool
- func IsValidRoleName(roleName string) bool
- func IsValidSchemeName(name string) bool
- func IsValidTeamName(s string) bool
- func IsValidUserRoles(userRoles string) bool
- func IsValidUsername(s string) bool
- func IsValidUsernameAllowRemote(s string) bool
- 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 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 NewPluginKeyValueFromOptions(pluginId, key string, value []byte, opt PluginKVSetOptions) (*PluginKeyValue, *AppError)
- func NewRandomString(length int) string
- func NewRandomTeamName() string
- func NewString(s string) *string
- func NormalizeEmail(email string) string
- func NormalizeRemoteName(name string) string
- func NormalizeUsername(username string) string
- func PadDateStringZeros(dateString string) string
- func ParseHashtags(text string) (string, string)
- func ParseSlackAttachment(post *Post, attachments []*SlackAttachment)
- func ParseSlackLinksToMarkdown(text string) string
- func PermissionsChangedByPatch(role *Role, patch *RolePatch) []string
- func RemoveDuplicateStrings(in []string) []string
- func RewriteImageURLs(message string, f func(string) string) string
- func RuneToHexadecimalString(r rune) string
- func SanitizeUnicode(s string) string
- func SplitVersion(version string) (int64, int64, int64)
- func StatusListToJSON(u []*Status) ([]byte, error)
- func StatusMapToInterfaceMap(statusMap map[string]*Status) map[string]interface{}
- func StringInterfaceFromJSON(data io.Reader) map[string]interface{}
- func StringInterfaceToJSON(objmap map[string]interface{}) string
- func TeamMemberWithErrorToString(o *TeamMemberWithError) string
- func ToJSON(v interface{}) []byte
- func TruncateOpenGraph(ogdata *opengraph.OpenGraph) *opengraph.OpenGraph
- type AccessData
- type AccessResponse
- type AddOn
- type Address
- type AnalyticsPostCountsOptions
- type AnalyticsRow
- type AnalyticsRows
- type AnalyticsSettings
- type AnnouncementSettings
- type AppError
- func AppErrorFromJSON(data io.Reader) *AppError
- func DecodeAndVerifyTriggerId(triggerId string, s *ecdsa.PrivateKey) (string, string, *AppError)
- func GenerateTriggerId(userId string, s crypto.Signer) (string, string, *AppError)
- func InvalidTermsOfServiceError(fieldName string, termsOfServiceId string) *AppError
- func InvalidUserError(fieldName string, userId string) *AppError
- func InvalidUserTermsOfServiceError(fieldName string, userTermsOfServiceId string) *AppError
- func IsSearchParamsListValid(paramsList []*SearchParams) *AppError
- func IsValidEmojiName(name string) *AppError
- func MakeBotNotFoundError(userId 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 AutocompleteArg
- type AutocompleteArgType
- type AutocompleteData
- func (ad *AutocompleteData) AddCommand(command *AutocompleteData)
- func (ad *AutocompleteData) AddDynamicListArgument(helpText, url string, required bool)
- func (ad *AutocompleteData) AddNamedDynamicListArgument(name, helpText, url string, required bool)
- func (ad *AutocompleteData) AddNamedStaticListArgument(name, helpText string, required bool, items []AutocompleteListItem)
- func (ad *AutocompleteData) AddNamedTextArgument(name, helpText, hint, pattern string, required bool)
- func (ad *AutocompleteData) AddStaticListArgument(helpText string, required bool, items []AutocompleteListItem)
- func (ad *AutocompleteData) AddTextArgument(helpText, hint, pattern string)
- func (ad *AutocompleteData) Equals(command *AutocompleteData) bool
- func (ad *AutocompleteData) IsValid() error
- func (ad *AutocompleteData) UpdateRelativeURLsForPluginCommands(baseURL *url.URL) error
- type AutocompleteDynamicListArg
- type AutocompleteListItem
- type AutocompleteStaticListArg
- type AutocompleteSuggestion
- type AutocompleteTextArg
- type BaseMarketplacePlugin
- type BillingScheme
- type BleveSettings
- type Bot
- func (b *Bot) Clone() *Bot
- func (b *Bot) Etag() string
- func (b *Bot) IsValid() *AppError
- func (b *Bot) IsValidCreate() *AppError
- func (b *Bot) Patch(patch *BotPatch)
- func (b *Bot) PreSave()
- func (b *Bot) PreUpdate()
- func (b *Bot) Trace() map[string]interface{}
- func (b *Bot) WouldPatch(patch *BotPatch) bool
- type BotGetOptions
- type BotList
- type BotPatch
- type BundleInfo
- type CWSWebhookPayload
- type Channel
- func (o *Channel) AddProp(key string, value interface{})
- func (o *Channel) DeepCopy() *Channel
- func (o *Channel) Etag() string
- func (o *Channel) GetOtherUserIdForDM(userId string) string
- func (o *Channel) IsGroupConstrained() bool
- func (o *Channel) IsGroupOrDirect() bool
- func (o *Channel) IsOpen() bool
- func (o *Channel) IsShared() bool
- func (o *Channel) IsValid() *AppError
- func (o *Channel) MakeNonNil()
- func (o *Channel) Patch(patch *ChannelPatch)
- func (o *Channel) PreSave()
- func (o *Channel) PreUpdate()
- type ChannelCounts
- type ChannelData
- type ChannelForExport
- type ChannelList
- type ChannelListWithTeamData
- type ChannelMember
- type ChannelMemberCountByGroup
- type ChannelMemberForExport
- type ChannelMemberHistory
- type ChannelMemberHistoryResult
- type ChannelMemberWithTeamData
- type ChannelMembers
- type ChannelMembersWithTeamData
- type ChannelMentionMap
- type ChannelModeratedRole
- type ChannelModeratedRoles
- type ChannelModeratedRolesPatch
- type ChannelModeration
- type ChannelModerationPatch
- type ChannelOption
- type ChannelPatch
- type ChannelSearch
- type ChannelSearchOpts
- type ChannelStats
- type ChannelType
- type ChannelUnread
- type ChannelUnreadAt
- type ChannelView
- type ChannelViewResponse
- type ChannelWithTeamData
- type ChannelsWithCount
- type Client4
- func (c *Client4) AddChannelMember(channelId, userId string) (*ChannelMember, *Response, error)
- func (c *Client4) AddChannelMemberWithRootId(channelId, userId, postRootId string) (*ChannelMember, *Response, error)
- func (c *Client4) AddChannelsToRetentionPolicy(policyID string, channelIDs []string) (*Response, error)
- func (c *Client4) AddTeamMember(teamId, userId string) (*TeamMember, *Response, error)
- func (c *Client4) AddTeamMemberFromInvite(token, inviteId string) (*TeamMember, *Response, error)
- func (c *Client4) AddTeamMembers(teamId string, userIds []string) ([]*TeamMember, *Response, error)
- func (c *Client4) AddTeamMembersGracefully(teamId string, userIds []string) ([]*TeamMemberWithError, *Response, error)
- func (c *Client4) AddTeamsToRetentionPolicy(policyID string, teamIDs []string) (*Response, error)
- func (c *Client4) AssignBot(botUserId, newOwnerId string) (*Bot, *Response, error)
- func (c *Client4) AttachDeviceId(deviceId string) (*Response, error)
- func (c *Client4) AuthorizeOAuthApp(authRequest *AuthorizeRequest) (string, *Response, error)
- func (c *Client4) AutocompleteChannelsForTeam(teamId, name string) (ChannelList, *Response, error)
- func (c *Client4) AutocompleteChannelsForTeamForSearch(teamId, name string) (ChannelList, *Response, error)
- func (c *Client4) AutocompleteEmoji(name string, etag string) ([]*Emoji, *Response, error)
- func (c *Client4) AutocompleteUsers(username string, limit int, etag string) (*UserAutocomplete, *Response, error)
- func (c *Client4) AutocompleteUsersInChannel(teamId string, channelId string, username string, limit int, etag string) (*UserAutocomplete, *Response, error)
- func (c *Client4) AutocompleteUsersInTeam(teamId string, username string, limit int, etag string) (*UserAutocomplete, *Response, error)
- func (c *Client4) CancelJob(jobId string) (*Response, error)
- func (c *Client4) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page, perPage int, etag string) ([]*UserWithGroups, int64, *Response, error)
- func (c *Client4) CheckIntegrity() ([]IntegrityCheckResult, *Response, error)
- func (c *Client4) ClearOAuthToken()
- func (c *Client4) ClearServerBusy() (*Response, error)
- func (c *Client4) ConfirmCustomerPayment(confirmRequest *ConfirmPaymentMethodRequest) (*Response, error)
- func (c *Client4) ConvertBotToUser(userId string, userPatch *UserPatch, setSystemAdmin bool) (*User, *Response, error)
- func (c *Client4) ConvertUserToBot(userId string) (*Bot, *Response, error)
- func (c *Client4) CreateBot(bot *Bot) (*Bot, *Response, error)
- func (c *Client4) CreateChannel(channel *Channel) (*Channel, *Response, error)
- func (c *Client4) CreateCommand(cmd *Command) (*Command, *Response, error)
- func (c *Client4) CreateComplianceReport(report *Compliance) (*Compliance, *Response, error)
- func (c *Client4) CreateCustomerPayment() (*StripeSetupIntent, *Response, error)
- func (c *Client4) CreateDataRetentionPolicy(policy *RetentionPolicyWithTeamAndChannelIDs) (*RetentionPolicyWithTeamAndChannelCounts, *Response, error)
- func (c *Client4) CreateDirectChannel(userId1, userId2 string) (*Channel, *Response, error)
- func (c *Client4) CreateEmoji(emoji *Emoji, image []byte, filename string) (*Emoji, *Response, error)
- func (c *Client4) CreateGroupChannel(userIds []string) (*Channel, *Response, error)
- func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response, error)
- func (c *Client4) CreateJob(job *Job) (*Job, *Response, error)
- func (c *Client4) CreateOAuthApp(app *OAuthApp) (*OAuthApp, *Response, error)
- func (c *Client4) CreateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response, error)
- func (c *Client4) CreatePost(post *Post) (*Post, *Response, error)
- func (c *Client4) CreatePostEphemeral(post *PostEphemeral) (*Post, *Response, error)
- func (c *Client4) CreateScheme(scheme *Scheme) (*Scheme, *Response, error)
- func (c *Client4) CreateSidebarCategoryForTeamForUser(userID, teamID string, category *SidebarCategoryWithChannels) (*SidebarCategoryWithChannels, *Response, error)
- func (c *Client4) CreateTeam(team *Team) (*Team, *Response, error)
- func (c *Client4) CreateTermsOfService(text, userId string) (*TermsOfService, *Response, error)
- func (c *Client4) CreateUpload(us *UploadSession) (*UploadSession, *Response, error)
- func (c *Client4) CreateUser(user *User) (*User, *Response, error)
- func (c *Client4) CreateUserAccessToken(userId, description string) (*UserAccessToken, *Response, error)
- func (c *Client4) CreateUserWithInviteId(user *User, inviteId string) (*User, *Response, error)
- func (c *Client4) CreateUserWithToken(user *User, tokenId string) (*User, *Response, error)
- func (c *Client4) DatabaseRecycle() (*Response, error)
- func (c *Client4) DeauthorizeOAuthApp(appId string) (*Response, error)
- func (c *Client4) DeleteBrandImage() (*Response, error)
- func (c *Client4) DeleteChannel(channelId string) (*Response, error)
- func (c *Client4) DeleteCommand(commandId string) (*Response, error)
- func (c *Client4) DeleteDataRetentionPolicy(policyID string) (*Response, error)
- func (c *Client4) DeleteEmoji(emojiId string) (*Response, error)
- func (c *Client4) DeleteExport(name string) (*Response, error)
- func (c *Client4) DeleteIncomingWebhook(hookID string) (*Response, error)
- func (c *Client4) DeleteLdapPrivateCertificate() (*Response, error)
- func (c *Client4) DeleteLdapPublicCertificate() (*Response, error)
- func (c *Client4) DeleteOAuthApp(appId string) (*Response, error)
- func (c *Client4) DeleteOutgoingWebhook(hookId string) (*Response, error)
- func (c *Client4) DeletePost(postId string) (*Response, error)
- func (c *Client4) DeletePreferences(userId string, preferences Preferences) (*Response, error)
- func (c *Client4) DeleteReaction(reaction *Reaction) (*Response, error)
- func (c *Client4) DeleteSamlIdpCertificate() (*Response, error)
- func (c *Client4) DeleteSamlPrivateCertificate() (*Response, error)
- func (c *Client4) DeleteSamlPublicCertificate() (*Response, error)
- func (c *Client4) DeleteScheme(id string) (*Response, error)
- func (c *Client4) DeleteUser(userId string) (*Response, error)
- func (c *Client4) DemoteUserToGuest(guestId string) (*Response, error)
- func (c *Client4) DisableBot(botUserId string) (*Bot, *Response, error)
- func (c *Client4) DisablePlugin(id string) (*Response, error)
- func (c *Client4) DisableUserAccessToken(tokenId string) (*Response, error)
- func (c *Client4) DoAPIDelete(url string) (*http.Response, error)
- func (c *Client4) DoAPIDeleteBytes(url string, data []byte) (*http.Response, error)
- func (c *Client4) DoAPIGet(url string, etag string) (*http.Response, error)
- func (c *Client4) DoAPIPatchBytes(url string, data []byte) (*http.Response, error)
- func (c *Client4) DoAPIPost(url string, data string) (*http.Response, error)
- func (c *Client4) DoAPIPostBytes(url string, data []byte) (*http.Response, error)
- func (c *Client4) DoAPIPut(url string, data string) (*http.Response, error)
- func (c *Client4) DoAPIPutBytes(url string, data []byte) (*http.Response, error)
- func (c *Client4) DoAPIRequest(method, url, data, etag string) (*http.Response, error)
- func (c *Client4) DoAPIRequestBytes(method, url string, data []byte, etag string) (*http.Response, error)
- func (c *Client4) DoAPIRequestReader(method, url string, data io.Reader, headers map[string]string) (*http.Response, error)
- func (c *Client4) DoAPIRequestWithHeaders(method, url, data string, headers map[string]string) (*http.Response, error)
- func (c *Client4) DoEmojiUploadFile(url string, data []byte, contentType string) (*Emoji, *Response, error)
- func (c *Client4) DoPostAction(postId, actionId string) (*Response, error)
- func (c *Client4) DoPostActionWithCookie(postId, actionId, selected, cookieStr string) (*Response, error)
- func (c *Client4) DoUploadFile(url string, data []byte, contentType string) (*FileUploadResponse, *Response, error)
- func (c *Client4) DoUploadImportTeam(url string, data []byte, contentType string) (map[string]string, *Response, error)
- func (c *Client4) DownloadComplianceReport(reportId string) ([]byte, *Response, error)
- func (c *Client4) DownloadExport(name string, wr io.Writer, offset int64) (int64, *Response, error)
- func (c *Client4) DownloadFile(fileId string, download bool) ([]byte, *Response, error)
- func (c *Client4) DownloadFilePreview(fileId string, download bool) ([]byte, *Response, error)
- func (c *Client4) DownloadFileThumbnail(fileId string, download bool) ([]byte, *Response, error)
- func (c *Client4) DownloadJob(jobId string) ([]byte, *Response, error)
- func (c *Client4) EnableBot(botUserId string) (*Bot, *Response, error)
- func (c *Client4) EnablePlugin(id string) (*Response, error)
- func (c *Client4) EnableUserAccessToken(tokenId string) (*Response, error)
- func (c *Client4) ExecuteCommand(channelId, command string) (*CommandResponse, *Response, error)
- func (c *Client4) ExecuteCommandWithTeam(channelId, teamId, command string) (*CommandResponse, *Response, error)
- func (c *Client4) GenerateMfaSecret(userId string) (*MfaSecret, *Response, error)
- func (c *Client4) GenerateSupportPacket() ([]byte, *Response, error)
- func (c *Client4) GetActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetAllChannels(page int, perPage int, etag string) (ChannelListWithTeamData, *Response, error)
- func (c *Client4) GetAllChannelsExcludePolicyConstrained(page, perPage int, etag string) (ChannelListWithTeamData, *Response, error)
- func (c *Client4) GetAllChannelsIncludeDeleted(page int, perPage int, etag string) (ChannelListWithTeamData, *Response, error)
- func (c *Client4) GetAllChannelsWithCount(page int, perPage int, etag string) (ChannelListWithTeamData, int64, *Response, error)
- func (c *Client4) GetAllRoles() ([]*Role, *Response, error)
- func (c *Client4) GetAllSharedChannels(teamID string, page, perPage int) ([]*SharedChannel, *Response, error)
- func (c *Client4) GetAllTeams(etag string, page int, perPage int) ([]*Team, *Response, error)
- func (c *Client4) GetAllTeamsExcludePolicyConstrained(etag string, page int, perPage int) ([]*Team, *Response, error)
- func (c *Client4) GetAllTeamsWithTotalCount(etag string, page int, perPage int) ([]*Team, int64, *Response, error)
- func (c *Client4) GetAnalyticsOld(name, teamId string) (AnalyticsRows, *Response, error)
- func (c *Client4) GetAncillaryPermissions(subsectionPermissions []string) ([]string, *Response, error)
- func (c *Client4) GetAudits(page int, perPage int, etag string) (Audits, *Response, error)
- func (c *Client4) GetAuthorizedOAuthAppsForUser(userId string, page, perPage int) ([]*OAuthApp, *Response, error)
- func (c *Client4) GetBot(userId string, etag string) (*Bot, *Response, error)
- func (c *Client4) GetBotIncludeDeleted(userId string, etag string) (*Bot, *Response, error)
- func (c *Client4) GetBots(page, perPage int, etag string) ([]*Bot, *Response, error)
- func (c *Client4) GetBotsIncludeDeleted(page, perPage int, etag string) ([]*Bot, *Response, error)
- func (c *Client4) GetBotsOrphaned(page, perPage int, etag string) ([]*Bot, *Response, error)
- func (c *Client4) GetBrandImage() ([]byte, *Response, error)
- func (c *Client4) GetBulkReactions(postIds []string) (map[string][]*Reaction, *Response, error)
- func (c *Client4) GetChannel(channelId, etag string) (*Channel, *Response, error)
- func (c *Client4) GetChannelByName(channelName, teamId string, etag string) (*Channel, *Response, error)
- func (c *Client4) GetChannelByNameForTeamName(channelName, teamName string, etag string) (*Channel, *Response, error)
- func (c *Client4) GetChannelByNameForTeamNameIncludeDeleted(channelName, teamName string, etag string) (*Channel, *Response, error)
- func (c *Client4) GetChannelByNameIncludeDeleted(channelName, teamId string, etag string) (*Channel, *Response, error)
- func (c *Client4) GetChannelMember(channelId, userId, etag string) (*ChannelMember, *Response, error)
- func (c *Client4) GetChannelMemberCountsByGroup(channelID string, includeTimezones bool, etag string) ([]*ChannelMemberCountByGroup, *Response, error)
- func (c *Client4) GetChannelMembers(channelId string, page, perPage int, etag string) (ChannelMembers, *Response, error)
- func (c *Client4) GetChannelMembersByIds(channelId string, userIds []string) (ChannelMembers, *Response, error)
- func (c *Client4) GetChannelMembersForUser(userId, teamId, etag string) (ChannelMembers, *Response, error)
- func (c *Client4) GetChannelMembersTimezones(channelId string) ([]string, *Response, error)
- func (c *Client4) GetChannelMembersWithTeamData(userID string, page, perPage int) (ChannelMembersWithTeamData, *Response, error)
- func (c *Client4) GetChannelModerations(channelID string, etag string) ([]*ChannelModeration, *Response, error)
- func (c *Client4) GetChannelPoliciesForUser(userID string, offset, limit int) (*RetentionPolicyForChannelList, *Response, error)
- func (c *Client4) GetChannelStats(channelId string, etag string) (*ChannelStats, *Response, error)
- func (c *Client4) GetChannelUnread(channelId, userId string) (*ChannelUnread, *Response, error)
- func (c *Client4) GetChannelsForRetentionPolicy(policyID string, page, perPage int) (*ChannelsWithCount, *Response, error)
- func (c *Client4) GetChannelsForScheme(schemeId string, page int, perPage int) (ChannelList, *Response, error)
- func (c *Client4) GetChannelsForTeamAndUserWithLastDeleteAt(teamId, userId string, includeDeleted bool, lastDeleteAt int, etag string) ([]*Channel, *Response, error)
- func (c *Client4) GetChannelsForTeamForUser(teamId, userId string, includeDeleted bool, etag string) ([]*Channel, *Response, error)
- func (c *Client4) GetChannelsForUserWithLastDeleteAt(userID string, lastDeleteAt int) ([]*Channel, *Response, error)
- func (c *Client4) GetCloudCustomer() (*CloudCustomer, *Response, error)
- func (c *Client4) GetCloudProducts() ([]*Product, *Response, error)
- func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response, error)
- func (c *Client4) GetCommandById(cmdId string) (*Command, *Response, error)
- func (c *Client4) GetComplianceReport(reportId string) (*Compliance, *Response, error)
- func (c *Client4) GetComplianceReports(page, perPage int) (Compliances, *Response, error)
- func (c *Client4) GetConfig() (*Config, *Response, error)
- func (c *Client4) GetDataRetentionPolicies(page, perPage int) (*RetentionPolicyWithTeamAndChannelCountsList, *Response, error)
- func (c *Client4) GetDataRetentionPoliciesCount() (int64, *Response, error)
- func (c *Client4) GetDataRetentionPolicy() (*GlobalRetentionPolicy, *Response, error)
- func (c *Client4) GetDataRetentionPolicyByID(policyID string) (*RetentionPolicyWithTeamAndChannelCounts, *Response, error)
- func (c *Client4) GetDefaultProfileImage(userId string) ([]byte, *Response, error)
- func (c *Client4) GetDeletedChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response, error)
- func (c *Client4) GetEmoji(emojiId string) (*Emoji, *Response, error)
- func (c *Client4) GetEmojiByName(name string) (*Emoji, *Response, error)
- func (c *Client4) GetEmojiImage(emojiId string) ([]byte, *Response, error)
- func (c *Client4) GetEmojiList(page, perPage int) ([]*Emoji, *Response, error)
- func (c *Client4) GetEnvironmentConfig() (map[string]interface{}, *Response, error)
- func (c *Client4) GetFile(fileId string) ([]byte, *Response, error)
- func (c *Client4) GetFileInfo(fileId string) (*FileInfo, *Response, error)
- func (c *Client4) GetFileInfosForPost(postId string, etag string) ([]*FileInfo, *Response, error)
- func (c *Client4) GetFileLink(fileId string) (string, *Response, error)
- func (c *Client4) GetFilePreview(fileId string) ([]byte, *Response, error)
- func (c *Client4) GetFileThumbnail(fileId string) ([]byte, *Response, error)
- func (c *Client4) GetFlaggedPostsForUser(userId string, page int, perPage int) (*PostList, *Response, error)
- func (c *Client4) GetFlaggedPostsForUserInChannel(userId string, channelId string, page int, perPage int) (*PostList, *Response, error)
- func (c *Client4) GetFlaggedPostsForUserInTeam(userId string, teamId string, page int, perPage int) (*PostList, *Response, error)
- func (c *Client4) GetGroup(groupID, etag string) (*Group, *Response, error)
- func (c *Client4) GetGroupStats(groupID string) (*GroupStats, *Response, error)
- func (c *Client4) GetGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, etag string) (*GroupSyncable, *Response, error)
- func (c *Client4) GetGroupSyncables(groupID string, syncableType GroupSyncableType, etag string) ([]*GroupSyncable, *Response, error)
- func (c *Client4) GetGroups(opts GroupSearchOpts) ([]*Group, *Response, error)
- func (c *Client4) GetGroupsAssociatedToChannelsByTeam(teamId string, opts GroupSearchOpts) (map[string][]*GroupWithSchemeAdmin, *Response, error)
- func (c *Client4) GetGroupsByChannel(channelId string, opts GroupSearchOpts) ([]*GroupWithSchemeAdmin, int, *Response, error)
- func (c *Client4) GetGroupsByTeam(teamId string, opts GroupSearchOpts) ([]*GroupWithSchemeAdmin, int, *Response, error)
- func (c *Client4) GetGroupsByUserId(userId string) ([]*Group, *Response, error)
- func (c *Client4) GetIncomingWebhook(hookID string, etag string) (*IncomingWebhook, *Response, error)
- func (c *Client4) GetIncomingWebhooks(page int, perPage int, etag string) ([]*IncomingWebhook, *Response, error)
- func (c *Client4) GetIncomingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*IncomingWebhook, *Response, error)
- func (c *Client4) GetInvoicesForSubscription() ([]*Invoice, *Response, error)
- func (c *Client4) GetJob(id string) (*Job, *Response, error)
- func (c *Client4) GetJobs(page int, perPage int) ([]*Job, *Response, error)
- func (c *Client4) GetJobsByType(jobType string, page int, perPage int) ([]*Job, *Response, error)
- func (c *Client4) GetKnownUsers() ([]string, *Response, error)
- func (c *Client4) GetLdapGroups() ([]*Group, *Response, error)
- func (c *Client4) GetLogs(page, perPage int) ([]string, *Response, error)
- func (c *Client4) GetMarketplacePlugins(filter *MarketplacePluginFilter) ([]*MarketplacePlugin, *Response, error)
- func (c *Client4) GetMe(etag string) (*User, *Response, error)
- func (c *Client4) GetNewUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetNotices(lastViewed int64, teamId string, client NoticeClientType, ...) (NoticeMessages, *Response, error)
- func (c *Client4) GetOAuthAccessToken(data url.Values) (*AccessResponse, *Response, error)
- func (c *Client4) GetOAuthApp(appId string) (*OAuthApp, *Response, error)
- func (c *Client4) GetOAuthAppInfo(appId string) (*OAuthApp, *Response, error)
- func (c *Client4) GetOAuthApps(page, perPage int) ([]*OAuthApp, *Response, error)
- func (c *Client4) GetOldClientConfig(etag string) (map[string]string, *Response, error)
- func (c *Client4) GetOldClientLicense(etag string) (map[string]string, *Response, error)
- func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response, error)
- func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*OutgoingWebhook, *Response, error)
- func (c *Client4) GetOutgoingWebhooksForChannel(channelId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response, error)
- func (c *Client4) GetOutgoingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response, error)
- func (c *Client4) GetPing() (string, *Response, error)
- func (c *Client4) GetPingWithFullServerStatus() (map[string]string, *Response, error)
- func (c *Client4) GetPingWithServerStatus() (string, *Response, error)
- func (c *Client4) GetPinnedPosts(channelId string, etag string) (*PostList, *Response, error)
- func (c *Client4) GetPluginStatuses() (PluginStatuses, *Response, error)
- func (c *Client4) GetPlugins() (*PluginsResponse, *Response, error)
- func (c *Client4) GetPost(postId string, etag string) (*Post, *Response, error)
- func (c *Client4) GetPostThread(postId string, etag string, collapsedThreads bool) (*PostList, *Response, error)
- func (c *Client4) GetPostsAfter(channelId, postId string, page, perPage int, etag string, ...) (*PostList, *Response, error)
- func (c *Client4) GetPostsAroundLastUnread(userId, channelId string, limitBefore, limitAfter int, collapsedThreads bool) (*PostList, *Response, error)
- func (c *Client4) GetPostsBefore(channelId, postId string, page, perPage int, etag string, ...) (*PostList, *Response, error)
- func (c *Client4) GetPostsByIds(postIds []string) ([]*Post, *Response, error)
- func (c *Client4) GetPostsForChannel(channelId string, page, perPage int, etag string, collapsedThreads bool) (*PostList, *Response, error)
- func (c *Client4) GetPostsSince(channelId string, time int64, collapsedThreads bool) (*PostList, *Response, error)
- func (c *Client4) GetPreferenceByCategoryAndName(userId string, category string, preferenceName string) (*Preference, *Response, error)
- func (c *Client4) GetPreferences(userId string) (Preferences, *Response, error)
- func (c *Client4) GetPreferencesByCategory(userId string, category string) (Preferences, *Response, error)
- func (c *Client4) GetPrivateChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response, error)
- func (c *Client4) GetProfileImage(userId, etag string) ([]byte, *Response, error)
- func (c *Client4) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) ([]*Channel, *Response, error)
- func (c *Client4) GetPublicChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response, error)
- func (c *Client4) GetReactions(postId string) ([]*Reaction, *Response, error)
- func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetRedirectLocation(urlParam, etag string) (string, *Response, error)
- func (c *Client4) GetRemoteClusterInfo(remoteID string) (RemoteClusterInfo, *Response, error)
- func (c *Client4) GetRole(id string) (*Role, *Response, error)
- func (c *Client4) GetRoleByName(name string) (*Role, *Response, error)
- func (c *Client4) GetRolesByNames(roleNames []string) ([]*Role, *Response, error)
- func (c *Client4) GetSamlCertificateStatus() (*SamlCertificateStatus, *Response, error)
- func (c *Client4) GetSamlMetadata() (string, *Response, error)
- func (c *Client4) GetSamlMetadataFromIdp(samlMetadataURL string) (*SamlMetadataResponse, *Response, error)
- func (c *Client4) GetScheme(id string) (*Scheme, *Response, error)
- func (c *Client4) GetSchemes(scope string, page int, perPage int) ([]*Scheme, *Response, error)
- func (c *Client4) GetServerBusy() (*ServerBusyState, *Response, error)
- func (c *Client4) GetSessions(userId, etag string) ([]*Session, *Response, error)
- func (c *Client4) GetSidebarCategoriesForTeamForUser(userID, teamID, etag string) (*OrderedSidebarCategories, *Response, error)
- func (c *Client4) GetSidebarCategoryForTeamForUser(userID, teamID, categoryID, etag string) (*SidebarCategoryWithChannels, *Response, error)
- func (c *Client4) GetSidebarCategoryOrderForTeamForUser(userID, teamID, etag string) ([]string, *Response, error)
- func (c *Client4) GetSortedEmojiList(page, perPage int, sort string) ([]*Emoji, *Response, error)
- func (c *Client4) GetSubscription() (*Subscription, *Response, error)
- func (c *Client4) GetSubscriptionStats() (*SubscriptionStats, *Response, error)
- func (c *Client4) GetSupportedTimezone() ([]string, *Response, error)
- func (c *Client4) GetTeam(teamId, etag string) (*Team, *Response, error)
- func (c *Client4) GetTeamByName(name, etag string) (*Team, *Response, error)
- func (c *Client4) GetTeamIcon(teamId, etag string) ([]byte, *Response, error)
- func (c *Client4) GetTeamInviteInfo(inviteId string) (*Team, *Response, error)
- func (c *Client4) GetTeamMember(teamId, userId, etag string) (*TeamMember, *Response, error)
- func (c *Client4) GetTeamMembers(teamId string, page int, perPage int, etag string) ([]*TeamMember, *Response, error)
- func (c *Client4) GetTeamMembersByIds(teamId string, userIds []string) ([]*TeamMember, *Response, error)
- func (c *Client4) GetTeamMembersForUser(userId string, etag string) ([]*TeamMember, *Response, error)
- func (c *Client4) GetTeamMembersSortAndWithoutDeletedUsers(teamId string, page int, perPage int, sort string, excludeDeletedUsers bool, ...) ([]*TeamMember, *Response, error)
- func (c *Client4) GetTeamPoliciesForUser(userID string, offset, limit int) (*RetentionPolicyForTeamList, *Response, error)
- func (c *Client4) GetTeamStats(teamId, etag string) (*TeamStats, *Response, error)
- func (c *Client4) GetTeamUnread(teamId, userId string) (*TeamUnread, *Response, error)
- func (c *Client4) GetTeamsForRetentionPolicy(policyID string, page, perPage int) (*TeamsWithCount, *Response, error)
- func (c *Client4) GetTeamsForScheme(schemeId string, page int, perPage int) ([]*Team, *Response, error)
- func (c *Client4) GetTeamsForUser(userId, etag string) ([]*Team, *Response, error)
- func (c *Client4) GetTeamsUnreadForUser(userId, teamIdToExclude string, includeCollapsedThreads bool) ([]*TeamUnread, *Response, error)
- func (c *Client4) GetTermsOfService(etag string) (*TermsOfService, *Response, error)
- func (c *Client4) GetTotalUsersStats(etag string) (*UsersStats, *Response, error)
- func (c *Client4) GetUpload(uploadId string) (*UploadSession, *Response, error)
- func (c *Client4) GetUploadsForUser(userId string) ([]*UploadSession, *Response, error)
- func (c *Client4) GetUser(userId, etag string) (*User, *Response, error)
- func (c *Client4) GetUserAccessToken(tokenId string) (*UserAccessToken, *Response, error)
- func (c *Client4) GetUserAccessTokens(page int, perPage int) ([]*UserAccessToken, *Response, error)
- func (c *Client4) GetUserAccessTokensForUser(userId string, page, perPage int) ([]*UserAccessToken, *Response, error)
- func (c *Client4) GetUserAudits(userId string, page int, perPage int, etag string) (Audits, *Response, error)
- func (c *Client4) GetUserByEmail(email, etag string) (*User, *Response, error)
- func (c *Client4) GetUserByUsername(userName, etag string) (*User, *Response, error)
- func (c *Client4) GetUserStatus(userId, etag string) (*Status, *Response, error)
- func (c *Client4) GetUserTermsOfService(userId, etag string) (*UserTermsOfService, *Response, error)
- func (c *Client4) GetUserThread(userId, teamId, threadId string, extended bool) (*ThreadResponse, *Response, error)
- func (c *Client4) GetUserThreads(userId, teamId string, options GetUserThreadsOpts) (*Threads, *Response, error)
- func (c *Client4) GetUsers(page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersByGroupChannelIds(groupChannelIds []string) (map[string][]*User, *Response, error)
- func (c *Client4) GetUsersByIds(userIds []string) ([]*User, *Response, error)
- func (c *Client4) GetUsersByIdsWithOptions(userIds []string, options *UserGetByIdsOptions) ([]*User, *Response, error)
- func (c *Client4) GetUsersByUsernames(usernames []string) ([]*User, *Response, error)
- func (c *Client4) GetUsersInChannel(channelId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersInChannelByStatus(channelId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersInGroup(groupID string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersNotInChannel(teamId, channelId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersNotInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetUsersStatusesByIds(userIds []string) ([]*Status, *Response, error)
- func (c *Client4) GetUsersWithoutTeam(page int, perPage int, etag string) ([]*User, *Response, error)
- func (c *Client4) GetWebappPlugins() ([]*Manifest, *Response, error)
- func (c *Client4) ImportTeam(data []byte, filesize int, importFrom, filename, teamId string) (map[string]string, *Response, error)
- func (c *Client4) InstallMarketplacePlugin(request *InstallMarketplacePluginRequest) (*Manifest, *Response, error)
- func (c *Client4) InstallPluginFromURL(downloadURL string, force bool) (*Manifest, *Response, error)
- func (c *Client4) InvalidateCaches() (*Response, error)
- func (c *Client4) InvalidateEmailInvites() (*Response, error)
- func (c *Client4) InviteGuestsToTeam(teamId string, userEmails []string, channels []string, message string) (*Response, error)
- func (c *Client4) InviteGuestsToTeamGracefully(teamId string, userEmails []string, channels []string, message string) ([]*EmailInviteWithError, *Response, error)
- func (c *Client4) InviteUsersToTeam(teamId string, userEmails []string) (*Response, error)
- func (c *Client4) InviteUsersToTeamGracefully(teamId string, userEmails []string) ([]*EmailInviteWithError, *Response, error)
- func (c *Client4) LinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, ...) (*GroupSyncable, *Response, error)
- func (c *Client4) LinkLdapGroup(dn string) (*Group, *Response, error)
- func (c *Client4) ListAutocompleteCommands(teamId string) ([]*Command, *Response, error)
- func (c *Client4) ListCommandAutocompleteSuggestions(userInput, teamId string) ([]AutocompleteSuggestion, *Response, error)
- func (c *Client4) ListCommands(teamId string, customOnly bool) ([]*Command, *Response, error)
- func (c *Client4) ListExports() ([]string, *Response, error)
- func (c *Client4) ListImports() ([]string, *Response, error)
- func (c *Client4) Login(loginId string, password string) (*User, *Response, error)
- func (c *Client4) LoginById(id string, password string) (*User, *Response, error)
- func (c *Client4) LoginByLdap(loginId string, password string) (*User, *Response, error)
- func (c *Client4) LoginWithDevice(loginId string, password string, deviceId string) (*User, *Response, error)
- func (c *Client4) LoginWithMFA(loginId, password, mfaToken string) (*User, *Response, error)
- func (c *Client4) Logout() (*Response, error)
- func (c *Client4) MarkNoticesViewed(ids []string) (*Response, error)
- func (c *Client4) MigrateAuthToLdap(fromAuthService string, matchField string, force bool) (*Response, error)
- func (c *Client4) MigrateAuthToSaml(fromAuthService string, usersMap map[string]string, auto bool) (*Response, error)
- func (c *Client4) MigrateConfig(from, to string) (*Response, error)
- func (c *Client4) MigrateIdLdap(toAttribute string) (*Response, error)
- func (c *Client4) MockSession(token string)
- func (c *Client4) MoveChannel(channelId, teamId string, force bool) (*Channel, *Response, error)
- func (c *Client4) MoveCommand(teamId string, commandId string) (*Response, error)
- func (c *Client4) OpenGraph(url string) (map[string]string, *Response, error)
- func (c *Client4) OpenInteractiveDialog(request OpenDialogRequest) (*Response, error)
- func (c *Client4) PatchBot(userId string, patch *BotPatch) (*Bot, *Response, error)
- func (c *Client4) PatchChannel(channelId string, patch *ChannelPatch) (*Channel, *Response, error)
- func (c *Client4) PatchChannelModerations(channelID string, patch []*ChannelModerationPatch) ([]*ChannelModeration, *Response, error)
- func (c *Client4) PatchConfig(config *Config) (*Config, *Response, error)
- func (c *Client4) PatchDataRetentionPolicy(patch *RetentionPolicyWithTeamAndChannelIDs) (*RetentionPolicyWithTeamAndChannelCounts, *Response, error)
- func (c *Client4) PatchGroup(groupID string, patch *GroupPatch) (*Group, *Response, error)
- func (c *Client4) PatchGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, ...) (*GroupSyncable, *Response, error)
- func (c *Client4) PatchPost(postId string, patch *PostPatch) (*Post, *Response, error)
- func (c *Client4) PatchRole(roleId string, patch *RolePatch) (*Role, *Response, error)
- func (c *Client4) PatchScheme(id string, patch *SchemePatch) (*Scheme, *Response, error)
- func (c *Client4) PatchTeam(teamId string, patch *TeamPatch) (*Team, *Response, error)
- func (c *Client4) PatchUser(userId string, patch *UserPatch) (*User, *Response, error)
- func (c *Client4) PermanentDeleteAllUsers() (*Response, error)
- func (c *Client4) PermanentDeleteChannel(channelId string) (*Response, error)
- func (c *Client4) PermanentDeleteTeam(teamId string) (*Response, error)
- func (c *Client4) PermanentDeleteUser(userId string) (*Response, error)
- func (c *Client4) PinPost(postId string) (*Response, error)
- func (c *Client4) PostLog(message map[string]string) (map[string]string, *Response, error)
- func (c *Client4) PromoteGuestToUser(guestId string) (*Response, error)
- func (c *Client4) PublishUserTyping(userID string, typingRequest TypingRequest) (*Response, error)
- func (c *Client4) PurgeBleveIndexes() (*Response, error)
- func (c *Client4) PurgeElasticsearchIndexes() (*Response, error)
- func (c *Client4) RegenCommandToken(commandId string) (string, *Response, error)
- func (c *Client4) RegenOutgoingHookToken(hookId string) (*OutgoingWebhook, *Response, error)
- func (c *Client4) RegenerateOAuthAppSecret(appId string) (*OAuthApp, *Response, error)
- func (c *Client4) RegenerateTeamInviteId(teamId string) (*Team, *Response, error)
- func (c *Client4) RegisterTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) (*Response, error)
- func (c *Client4) ReloadConfig() (*Response, error)
- func (c *Client4) RemoveChannelsFromRetentionPolicy(policyID string, channelIDs []string) (*Response, error)
- func (c *Client4) RemoveLicenseFile() (*Response, error)
- func (c *Client4) RemovePlugin(id string) (*Response, error)
- func (c *Client4) RemoveRecentUserCustomStatus(userId string) (*Response, error)
- func (c *Client4) RemoveTeamIcon(teamId string) (*Response, error)
- func (c *Client4) RemoveTeamMember(teamId, userId string) (*Response, error)
- func (c *Client4) RemoveTeamsFromRetentionPolicy(policyID string, teamIDs []string) (*Response, error)
- func (c *Client4) RemoveUserCustomStatus(userId string) (*Response, error)
- func (c *Client4) RemoveUserFromChannel(channelId, userId string) (*Response, error)
- func (c *Client4) RequestTrialLicense(users int) (*Response, error)
- func (c *Client4) ResetPassword(token, newPassword string) (*Response, error)
- func (c *Client4) ResetSamlAuthDataToEmail(includeDeleted bool, dryRun bool, userIDs []string) (int64, *Response, error)
- func (c *Client4) RestoreChannel(channelId string) (*Channel, *Response, error)
- func (c *Client4) RestoreTeam(teamId string) (*Team, *Response, error)
- func (c *Client4) RevokeAllSessions(userId string) (*Response, error)
- func (c *Client4) RevokeSession(userId, sessionId string) (*Response, error)
- func (c *Client4) RevokeSessionsFromAllUsers() (*Response, error)
- func (c *Client4) RevokeUserAccessToken(tokenId string) (*Response, error)
- func (c *Client4) SaveReaction(reaction *Reaction) (*Reaction, *Response, error)
- func (c *Client4) SearchAllChannels(search *ChannelSearch) (ChannelListWithTeamData, *Response, error)
- func (c *Client4) SearchAllChannelsForUser(term string) (ChannelListWithTeamData, *Response, error)
- func (c *Client4) SearchAllChannelsPaged(search *ChannelSearch) (*ChannelsWithCount, *Response, error)
- func (c *Client4) SearchArchivedChannels(teamId string, search *ChannelSearch) ([]*Channel, *Response, error)
- func (c *Client4) SearchChannels(teamId string, search *ChannelSearch) ([]*Channel, *Response, error)
- func (c *Client4) SearchChannelsForRetentionPolicy(policyID string, term string) (ChannelListWithTeamData, *Response, error)
- func (c *Client4) SearchEmoji(search *EmojiSearch) ([]*Emoji, *Response, error)
- func (c *Client4) SearchFiles(teamId string, terms string, isOrSearch bool) (*FileInfoList, *Response, error)
- func (c *Client4) SearchFilesWithParams(teamId string, params *SearchParameter) (*FileInfoList, *Response, error)
- func (c *Client4) SearchGroupChannels(search *ChannelSearch) ([]*Channel, *Response, error)
- func (c *Client4) SearchPosts(teamId string, terms string, isOrSearch bool) (*PostList, *Response, error)
- func (c *Client4) SearchPostsWithMatches(teamId string, terms string, isOrSearch bool) (*PostSearchResults, *Response, error)
- func (c *Client4) SearchPostsWithParams(teamId string, params *SearchParameter) (*PostList, *Response, error)
- func (c *Client4) SearchTeams(search *TeamSearch) ([]*Team, *Response, error)
- func (c *Client4) SearchTeamsForRetentionPolicy(policyID string, term string) ([]*Team, *Response, error)
- func (c *Client4) SearchTeamsPaged(search *TeamSearch) ([]*Team, int64, *Response, error)
- func (c *Client4) SearchUserAccessTokens(search *UserAccessTokenSearch) ([]*UserAccessToken, *Response, error)
- func (c *Client4) SearchUsers(search *UserSearch) ([]*User, *Response, error)
- func (c *Client4) SendAdminUpgradeRequestEmail() (*Response, error)
- func (c *Client4) SendAdminUpgradeRequestEmailOnJoin() (*Response, error)
- func (c *Client4) SendPasswordResetEmail(email string) (*Response, error)
- func (c *Client4) SendVerificationEmail(email string) (*Response, error)
- func (c *Client4) SetBoolString(value bool, valueStr string)
- func (c *Client4) SetDefaultProfileImage(userId string) (*Response, error)
- func (c *Client4) SetOAuthToken(token string)
- func (c *Client4) SetPostUnread(userId string, postId string, collapsedThreadsSupported bool) (*Response, error)
- func (c *Client4) SetProfileImage(userId string, data []byte) (*Response, error)
- func (c *Client4) SetServerBusy(secs int) (*Response, error)
- func (c *Client4) SetTeamIcon(teamId string, data []byte) (*Response, error)
- func (c *Client4) SetToken(token string)
- func (c *Client4) SoftDeleteTeam(teamId string) (*Response, error)
- func (c *Client4) SubmitInteractiveDialog(request SubmitDialogRequest) (*SubmitDialogResponse, *Response, error)
- func (c *Client4) SwitchAccountType(switchRequest *SwitchRequest) (string, *Response, error)
- func (c *Client4) SyncLdap(includeRemovedMembers bool) (*Response, error)
- func (c *Client4) TeamExists(name, etag string) (bool, *Response, error)
- func (c *Client4) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page, perPage int, etag string) ([]*UserWithGroups, int64, *Response, error)
- func (c *Client4) TestElasticsearch() (*Response, error)
- func (c *Client4) TestEmail(config *Config) (*Response, error)
- func (c *Client4) TestLdap() (*Response, error)
- func (c *Client4) TestS3Connection(config *Config) (*Response, error)
- func (c *Client4) TestSiteURL(siteURL string) (*Response, error)
- func (c *Client4) UnlinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType) (*Response, error)
- func (c *Client4) UnlinkLdapGroup(dn string) (*Group, *Response, error)
- func (c *Client4) UnpinPost(postId string) (*Response, error)
- func (c *Client4) UpdateChannel(channel *Channel) (*Channel, *Response, error)
- func (c *Client4) UpdateChannelMemberSchemeRoles(channelId string, userId string, schemeRoles *SchemeRoles) (*Response, error)
- func (c *Client4) UpdateChannelNotifyProps(channelId, userId string, props map[string]string) (*Response, error)
- func (c *Client4) UpdateChannelPrivacy(channelId string, privacy ChannelType) (*Channel, *Response, error)
- func (c *Client4) UpdateChannelRoles(channelId, userId, roles string) (*Response, error)
- func (c *Client4) UpdateChannelScheme(channelId, schemeId string) (*Response, error)
- func (c *Client4) UpdateCloudCustomer(customerInfo *CloudCustomerInfo) (*CloudCustomer, *Response, error)
- func (c *Client4) UpdateCloudCustomerAddress(address *Address) (*CloudCustomer, *Response, error)
- func (c *Client4) UpdateCommand(cmd *Command) (*Command, *Response, error)
- func (c *Client4) UpdateConfig(config *Config) (*Config, *Response, error)
- func (c *Client4) UpdateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response, error)
- func (c *Client4) UpdateOAuthApp(app *OAuthApp) (*OAuthApp, *Response, error)
- func (c *Client4) UpdateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response, error)
- func (c *Client4) UpdatePassword(userId, currentPassword, newPassword string) (*Response, error)
- func (c *Client4) UpdatePost(postId string, post *Post) (*Post, *Response, error)
- func (c *Client4) UpdatePreferences(userId string, preferences Preferences) (*Response, error)
- func (c *Client4) UpdateSidebarCategoriesForTeamForUser(userID, teamID string, categories []*SidebarCategoryWithChannels) ([]*SidebarCategoryWithChannels, *Response, error)
- func (c *Client4) UpdateSidebarCategoryForTeamForUser(userID, teamID, categoryID string, category *SidebarCategoryWithChannels) (*SidebarCategoryWithChannels, *Response, error)
- func (c *Client4) UpdateSidebarCategoryOrderForTeamForUser(userID, teamID string, order []string) ([]string, *Response, error)
- func (c *Client4) UpdateTeam(team *Team) (*Team, *Response, error)
- func (c *Client4) UpdateTeamMemberRoles(teamId, userId, newRoles string) (*Response, error)
- func (c *Client4) UpdateTeamMemberSchemeRoles(teamId string, userId string, schemeRoles *SchemeRoles) (*Response, error)
- func (c *Client4) UpdateTeamPrivacy(teamId string, privacy string) (*Team, *Response, error)
- func (c *Client4) UpdateTeamScheme(teamId, schemeId string) (*Response, error)
- func (c *Client4) UpdateThreadFollowForUser(userId, teamId, threadId string, state bool) (*Response, error)
- func (c *Client4) UpdateThreadReadForUser(userId, teamId, threadId string, timestamp int64) (*ThreadResponse, *Response, error)
- func (c *Client4) UpdateThreadsReadForUser(userId, teamId string) (*Response, error)
- func (c *Client4) UpdateUser(user *User) (*User, *Response, error)
- func (c *Client4) UpdateUserActive(userId string, active bool) (*Response, error)
- func (c *Client4) UpdateUserAuth(userId string, userAuth *UserAuth) (*UserAuth, *Response, error)
- func (c *Client4) UpdateUserCustomStatus(userId string, userCustomStatus *CustomStatus) (*CustomStatus, *Response, error)
- func (c *Client4) UpdateUserHashedPassword(userId, newHashedPassword string) (*Response, error)
- func (c *Client4) UpdateUserMfa(userId, code string, activate bool) (*Response, error)
- func (c *Client4) UpdateUserPassword(userId, currentPassword, newPassword string) (*Response, error)
- func (c *Client4) UpdateUserRoles(userId, roles string) (*Response, error)
- func (c *Client4) UpdateUserStatus(userId string, userStatus *Status) (*Status, *Response, error)
- func (c *Client4) UploadBrandImage(data []byte) (*Response, error)
- func (c *Client4) UploadData(uploadId string, data io.Reader) (*FileInfo, *Response, error)
- func (c *Client4) UploadFile(data []byte, channelId string, filename string) (*FileUploadResponse, *Response, error)
- func (c *Client4) UploadFileAsRequestBody(data []byte, channelId string, filename string) (*FileUploadResponse, *Response, error)
- func (c *Client4) UploadLdapPrivateCertificate(data []byte) (*Response, error)
- func (c *Client4) UploadLdapPublicCertificate(data []byte) (*Response, error)
- func (c *Client4) UploadLicenseFile(data []byte) (*Response, error)
- func (c *Client4) UploadPlugin(file io.Reader) (*Manifest, *Response, error)
- func (c *Client4) UploadPluginForced(file io.Reader) (*Manifest, *Response, error)
- func (c *Client4) UploadSamlIdpCertificate(data []byte, filename string) (*Response, error)
- func (c *Client4) UploadSamlPrivateCertificate(data []byte, filename string) (*Response, error)
- func (c *Client4) UploadSamlPublicCertificate(data []byte, filename string) (*Response, error)
- func (c *Client4) VerifyUserEmail(token string) (*Response, error)
- func (c *Client4) VerifyUserEmailWithoutToken(userId string) (*User, *Response, error)
- func (c *Client4) ViewChannel(userId string, view *ChannelView) (*ChannelViewResponse, *Response, error)
- type ClientRequirements
- type CloudCustomer
- type CloudCustomerInfo
- type CloudSettings
- type CloudWorkspaceOwner
- type ClusterDiscovery
- type ClusterEvent
- type ClusterInfo
- type ClusterMessage
- type ClusterSettings
- type ClusterStats
- type Command
- type CommandArgs
- type CommandMoveRequest
- type CommandResponse
- type CommandWebhook
- type Compliance
- type ComplianceExportCursor
- type CompliancePost
- type ComplianceSettings
- type Compliances
- type Conditions
- type Config
- func (o *Config) Clone() *Config
- func (o *Config) GetSSOService(service string) *SSOSettings
- func (o *Config) GetSanitizeOptions() map[string]bool
- func (o *Config) IsValid() *AppError
- func (o *Config) Sanitize()
- func (o *Config) SetDefaults()
- func (o *Config) ToJSONFiltered(tagType, tagValue string) ([]byte, error)
- type ConfigFunc
- type ConfirmPaymentMethodRequest
- type ContactPerson
- type CustomStatus
- type Customer
- type DataRetentionSettings
- type Dialog
- type DialogElement
- type DirectChannelForExport
- type DirectPostForExport
- type DisplaySettings
- type DoPostActionRequest
- type ElasticsearchSettings
- type EmailInviteWithError
- type EmailSettings
- type Emoji
- type EmojiSearch
- type EncryptionMethod
- type Endpoint
- type EntityDescriptor
- type ExperimentalAuditSettings
- type ExperimentalSettings
- type ExportSettings
- type ExternalDependency
- type FailedPayment
- type FeatureFlags
- type Features
- type FileData
- type FileForIndexing
- type FileInfo
- type FileInfoList
- func (o *FileInfoList) AddFileInfo(fileInfo *FileInfo)
- func (o *FileInfoList) AddOrder(id string)
- func (o *FileInfoList) Etag() string
- func (o *FileInfoList) Extend(other *FileInfoList)
- func (o *FileInfoList) MakeNonNil()
- func (o *FileInfoList) SortByCreateAt()
- func (o *FileInfoList) ToSlice() []*FileInfo
- func (o *FileInfoList) UniqueOrder()
- type FileInfoSearchMatches
- type FileInfoSearchResults
- type FileSettings
- type FileUploadResponse
- type GetFileInfosOptions
- type GetPostsOptions
- type GetPostsSinceForSyncCursor
- type GetPostsSinceForSyncOptions
- type GetPostsSinceOptions
- type GetUserThreadsOpts
- type GetUsersForSyncFilter
- type GlobalRelayMessageExportSettings
- type GlobalRetentionPolicy
- type Group
- type GroupMember
- type GroupPatch
- type GroupSearchOpts
- type GroupSource
- type GroupStats
- type GroupSyncable
- type GroupSyncablePatch
- type GroupSyncableType
- type GroupWithSchemeAdmin
- type GroupsAssociatedToChannel
- type GroupsAssociatedToChannelWithSchemeAdmin
- type GuestAccountsSettings
- type GuestsInvite
- type IDPSSODescriptor
- type ImageProxySettings
- type ImportSettings
- type IncomingWebhook
- type IncomingWebhookRequest
- type IndexedEndpoint
- type InitialLoad
- type InstallMarketplacePluginRequest
- type IntegrityCheckResult
- type Invites
- type Invoice
- type InvoiceLineItem
- type Job
- type JobSettings
- type KeyDescriptor
- type KeyInfo
- type LdapGroupSearchOpts
- type LdapSettings
- type License
- func (l *License) DaysToExpiration() int
- func (l *License) HasEnterpriseMarketplacePlugins() bool
- func (l *License) IsExpired() bool
- func (l *License) IsPastGracePeriod() bool
- func (l *License) IsSanctionedTrial() bool
- func (l *License) IsStarted() bool
- func (l *License) IsTrialLicense() bool
- func (l *License) IsWithinExpirationPeriod() bool
- type LicenseRecord
- type LinkMetadata
- type LinkMetadataType
- type LocalizationSettings
- type LocalizedName
- type LocalizedURI
- type LogSettings
- type Manifest
- func (m *Manifest) ClientManifest() *Manifest
- func (m *Manifest) GetExecutableForRuntime(goOs, goArch string) string
- func (m *Manifest) HasClient() bool
- func (m *Manifest) HasServer() bool
- func (m *Manifest) HasWebapp() bool
- func (m *Manifest) IsValid() error
- func (m *Manifest) MeetMinServerVersion(serverVersion string) (bool, error)
- type ManifestExecutablesdeprecated
- type ManifestServer
- type ManifestWebapp
- type MarketplaceLabel
- type MarketplacePlugin
- type MarketplacePluginFilter
- type MessageExport
- type MessageExportCursor
- type MessageExportSettings
- type MetricsSettings
- type MfaSecret
- type NameID
- type NameIDFormat
- type NativeAppSettings
- type NoticeAction
- type NoticeAudience
- type NoticeClientType
- type NoticeInstanceType
- type NoticeMessage
- type NoticeMessageInternal
- type NoticeMessages
- type NoticeSKU
- type NotificationLogSettings
- type OAuthApp
- type Office365Settings
- type OpenDialogRequest
- type OrderedSidebarCategories
- type Organization
- type OrphanedRecord
- 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) TriggerWordExactMatch(word string) bool
- func (o *OutgoingWebhook) TriggerWordStartsWith(word string) bool
- type OutgoingWebhookPayload
- type OutgoingWebhookResponse
- type PageOpts
- type PasswordSettings
- type PaymentMethod
- type Permalink
- type Permission
- type PluginClusterEvent
- type PluginClusterEventSendOptions
- type PluginEventData
- type PluginInfo
- type PluginKVSetOptions
- type PluginKeyValue
- type PluginOption
- type PluginSetting
- type PluginSettingType
- type PluginSettings
- type PluginSettingsSchema
- type PluginState
- type PluginStatus
- type PluginStatuses
- type PluginsResponse
- type Post
- func (o *Post) AddProp(key string, value interface{})
- func (o *Post) Attachments() []*SlackAttachment
- func (o *Post) AttachmentsEqual(input *Post) bool
- func (o *Post) ChannelMentions() []string
- func (o *Post) Clone() *Post
- func (o *Post) DelProp(key string)
- func (o *Post) DisableMentionHighlights() string
- func (o *Post) EncodeJSON(w io.Writer) error
- func (o *Post) Etag() string
- func (o *Post) GenerateActionIds()
- func (o *Post) GetAction(id string) *PostAction
- func (o *Post) GetPreviewPost() *PreviewPost
- func (o *Post) GetPreviewedPostProp() string
- func (o *Post) GetProp(key string) interface{}
- func (o *Post) GetProps() StringInterface
- func (o *Post) GetRemoteID() string
- func (o *Post) IsFromOAuthBot() bool
- func (o *Post) IsJoinLeaveMessage() bool
- func (o *Post) IsRemote() bool
- func (o *Post) IsSystemMessage() bool
- func (o *Post) IsValid(maxPostSize int) *AppError
- func (o *Post) MakeNonNil()
- func (o *Post) Patch(patch *PostPatch)
- func (o *Post) PreCommit()
- func (o *Post) PreSave()
- func (o *Post) RemovePreviewPost()
- func (o *Post) SanitizeProps()
- func (o *Post) SetProps(props StringInterface)
- func (o *Post) ShallowCopy(dst *Post) error
- func (o *Post) StripActionIntegrations()
- func (o *Post) ToJSON() (string, error)
- func (o *Post) ToNilIfInvalid() *Post
- func (o *Post) WithRewrittenImageURLs(f func(string) string) *Post
- type PostAction
- type PostActionAPIResponse
- type PostActionCookie
- type PostActionIntegration
- type PostActionIntegrationRequest
- type PostActionIntegrationResponse
- type PostActionOptions
- type PostEmbed
- type PostEmbedType
- type PostEphemeral
- type PostForExport
- type PostForIndexing
- type PostImage
- type PostList
- func (o *PostList) AddOrder(id string)
- func (o *PostList) AddPost(post *Post)
- func (o *PostList) Clone() *PostList
- func (o *PostList) EncodeJSON(w io.Writer) error
- func (o *PostList) Etag() string
- func (o *PostList) Extend(other *PostList)
- func (o *PostList) IsChannelId(channelId string) bool
- func (o *PostList) MakeNonNil()
- func (o *PostList) SortByCreateAt()
- func (o *PostList) StripActionIntegrations()
- func (o *PostList) ToJSON() (string, error)
- func (o *PostList) ToSlice() []*Post
- func (o *PostList) UniqueOrder()
- func (o *PostList) WithRewrittenImageURLs(f func(string) string) *PostList
- type PostMetadata
- type PostPatch
- type PostSearchMatches
- type PostSearchResults
- type Preference
- type Preferences
- type PreviewPost
- type PrivacySettings
- type Product
- type ProductNotice
- type ProductNoticeViewState
- type ProductNotices
- type PushNotification
- type PushNotificationAck
- type PushResponse
- type RateLimitSettings
- type Reaction
- type RecentCustomStatuses
- type RecurringInterval
- type RelationalIntegrityCheckData
- type RemoteCluster
- type RemoteClusterFrame
- type RemoteClusterInfo
- type RemoteClusterInvite
- type RemoteClusterMsg
- type RemoteClusterPing
- type RemoteClusterQueryFilter
- type ReplicaLagSettings
- type ReplyForExport
- type Response
- type RetentionPolicy
- type RetentionPolicyChannel
- type RetentionPolicyCursor
- type RetentionPolicyForChannel
- type RetentionPolicyForChannelList
- type RetentionPolicyForTeam
- type RetentionPolicyForTeamList
- type RetentionPolicyTeam
- type RetentionPolicyWithTeamAndChannelCounts
- type RetentionPolicyWithTeamAndChannelCountsList
- type RetentionPolicyWithTeamAndChannelIDs
- type Role
- func (r *Role) GetChannelModeratedPermissions(channelType ChannelType) map[string]bool
- func (r *Role) IsValid() bool
- func (r *Role) IsValidWithoutId() bool
- func (r *Role) MergeChannelHigherScopedPermissions(higherScopedPermissions *RolePermissions)
- func (r *Role) Patch(patch *RolePatch)
- func (r *Role) RolePatchFromChannelModerationsPatch(channelModerationsPatch []*ChannelModerationPatch, roleName string) *RolePatch
- type RoleDescriptor
- type RolePatch
- type RolePermissions
- type RoleScope
- type RoleType
- type SSODescriptor
- type SSOSettings
- type SamlAuthRequest
- type SamlCertificateStatus
- type SamlMetadataResponse
- type SamlSettings
- type ScheduledTask
- func CreateRecurringTask(name string, function TaskFunc, interval time.Duration) *ScheduledTask
- func CreateRecurringTaskFromNextIntervalTime(name string, function TaskFunc, interval time.Duration) *ScheduledTask
- func CreateTask(name string, function TaskFunc, timeToExecution time.Duration) *ScheduledTask
- type Scheduler
- type Scheme
- type SchemeConveyor
- type SchemeIDPatch
- type SchemePatch
- type SchemeRoles
- type SearchParameter
- 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 SendWarnMetricAck
- type ServerBusyState
- type ServiceSettings
- type Session
- func (s *Session) AddProp(key string, value string)
- func (z *Session) DecodeMsg(dc *msgp.Reader) (err error)
- func (s *Session) DeepCopy() *Session
- func (z *Session) EncodeMsg(en *msgp.Writer) (err error)
- func (s *Session) GenerateCSRF() string
- func (s *Session) GetCSRF() string
- func (s *Session) GetTeamByTeamId(teamId string) *TeamMember
- func (s *Session) GetUserRoles() []string
- func (s *Session) IsExpired() bool
- func (s *Session) IsMobile() bool
- func (s *Session) IsMobileApp() bool
- func (s *Session) IsOAuthUser() bool
- func (s *Session) IsSSOLogin() bool
- func (s *Session) IsSaml() bool
- func (s *Session) IsUnrestricted() bool
- func (s *Session) IsValid() *AppError
- func (z *Session) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Session) Msgsize() (s int)
- func (s *Session) PreSave()
- func (s *Session) Sanitize()
- func (z *Session) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SharedChannel
- type SharedChannelAttachment
- type SharedChannelFilterOpts
- type SharedChannelRemote
- type SharedChannelRemoteFilterOpts
- type SharedChannelRemoteStatus
- type SharedChannelUser
- type SidebarCategoriesWithChannels
- type SidebarCategory
- type SidebarCategoryOrder
- type SidebarCategorySorting
- type SidebarCategoryType
- type SidebarCategoryWithChannels
- type SidebarChannel
- type SidebarChannels
- type SlackAttachment
- type SlackAttachmentField
- type SlackCompatibleBool
- type SqlSettings
- type Status
- type StringArray
- type StringInterface
- type StringMap
- func (z *StringMap) DecodeMsg(dc *msgp.Reader) (err error)
- func (z StringMap) EncodeMsg(en *msgp.Writer) (err error)
- func (z StringMap) MarshalMsg(b []byte) (o []byte, err error)
- func (z StringMap) Msgsize() (s int)
- func (m *StringMap) Scan(value interface{}) error
- func (z *StringMap) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (m StringMap) Value() (driver.Value, error)
- type StripeSetupIntent
- type SubmitDialogRequest
- type SubmitDialogResponse
- type Subscription
- type SubscriptionChange
- type SubscriptionFamily
- type SubscriptionStats
- type SuggestCommand
- type SupportPacket
- type SupportSettings
- type SwitchRequest
- type System
- type SystemAsymmetricSigningKey
- type SystemECDSAKey
- type SystemPostActionCookieSecret
- type TaskFunc
- type Team
- type TeamForExport
- type TeamInviteReminderData
- type TeamMember
- func (z *TeamMember) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *TeamMember) EncodeMsg(en *msgp.Writer) (err error)
- func (o *TeamMember) GetRoles() []string
- func (o *TeamMember) IsValid() *AppError
- func (z *TeamMember) MarshalMsg(b []byte) (o []byte, err error)
- func (z *TeamMember) Msgsize() (s int)
- func (o *TeamMember) PreUpdate()
- func (z *TeamMember) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TeamMemberForExport
- type TeamMemberWithError
- type TeamMembersGetOptions
- type TeamPatch
- type TeamSearch
- type TeamSettings
- type TeamStats
- type TeamUnread
- type TeamsWithCount
- type TermsOfService
- type ThemeSettings
- type Thread
- type ThreadMembership
- type ThreadResponse
- type Threads
- type Token
- type TrialLicenseRequest
- type TypingRequest
- type UploadSession
- type UploadType
- type User
- func (u *User) AddNotifyProp(key string, value string)
- func (u *User) ClearCustomStatus()
- func (u *User) ClearNonProfileFields()
- func (z *User) DecodeMsg(dc *msgp.Reader) (err error)
- func (u *User) DeepCopy() *User
- func (z *User) EncodeMsg(en *msgp.Writer) (err error)
- func (u *User) Etag(showFullName, showEmail bool) string
- func (u *User) GetCustomStatus() *CustomStatus
- 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) GetProp(name string) (string, bool)
- func (u *User) GetRawRoles() string
- func (u *User) GetRemoteID() 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) IsRemote() 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 (z *User) MarshalMsg(b []byte) (o []byte, err error)
- func (z *User) Msgsize() (s int)
- 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) SetCustomStatus(cs *CustomStatus) error
- func (u *User) SetDefaultNotifications()
- func (u *User) SetProp(name string, value string)
- func (u *User) ToPatch() *UserPatch
- func (z *User) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (u *User) UpdateMentionKeysFromUsername(oldUsername string)
- type UserAccessToken
- type UserAccessTokenSearch
- type UserAuth
- type UserAutocomplete
- type UserAutocompleteInChannel
- type UserAutocompleteInTeam
- type UserChannelIDPair
- type UserCountOptions
- type UserForIndexing
- type UserGetByIdsOptions
- type UserGetOptions
- type UserMap
- type UserMentionMap
- type UserPatch
- type UserSearch
- type UserSearchOptions
- type UserSlice
- type UserTeamIDPair
- type UserTermsOfService
- type UserUpdate
- type UserWithGroups
- type UsersStats
- type UsersWithGroupsAndCount
- type ViewUsersRestrictions
- type WarnMetric
- type WarnMetricDisplayTexts
- type WarnMetricStatus
- type WebSocketClient
- func NewReliableWebSocketClientWithDialer(dialer *websocket.Dialer, url, authToken, connID string, seqNo int, ...) (*WebSocketClient, error)
- func NewWebSocketClient(url, authToken string) (*WebSocketClient, error)
- func NewWebSocketClient4(url, authToken string) (*WebSocketClient, error)
- func NewWebSocketClient4WithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, error)
- func NewWebSocketClientWithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, error)
- 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) SendBinaryMessage(action string, data map[string]interface{}) error
- 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) DeepCopy() *WebSocketEvent
- func (ev *WebSocketEvent) Encode(enc *json.Encoder) error
- 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() ([]byte, error)
- type WebSocketMessage
- type WebSocketRequest
- type WebSocketResponse
- type WebsocketBroadcast
- type Worker
- type X509Certificate
- type X509Data
Constants ¶
const ( AccessTokenGrantType = "authorization_code" AccessTokenType = "bearer" RefreshTokenGrantType = "refresh_token" )
const ( AuthCodeExpireTime = 60 * 10 // 10 minutes AuthCodeResponseType = "code" ImplicitResponseType = "token" DefaultScope = "user" )
const ( BotDisplayNameMaxRunes = UserFirstNameMaxRunes BotDescriptionMaxRunes = 1024 BotCreatorIdMaxRunes = KeyValuePluginIdMaxRunes // UserId or PluginId BotWarnMetricBotUsername = "mattermost-advisor" BotSystemBotUsername = "system-bot" )
const ( ChannelTypeOpen ChannelType = "O" ChannelTypePrivate ChannelType = "P" ChannelTypeDirect ChannelType = "D" ChannelTypeGroup ChannelType = "G" ChannelGroupMaxUsers = 8 ChannelGroupMinUsers = 3 DefaultChannelName = "town-square" ChannelDisplayNameMaxRunes = 64 ChannelNameMinLength = 2 ChannelNameMaxLength = 64 ChannelHeaderMaxRunes = 1024 ChannelPurposeMaxRunes = 250 ChannelCacheSize = 25000 ChannelSortByUsername = "username" ChannelSortByStatus = "status" )
const ( ChannelNotifyDefault = "default" ChannelNotifyAll = "all" ChannelNotifyMention = "mention" ChannelNotifyNone = "none" ChannelMarkUnreadAll = "all" ChannelMarkUnreadMention = "mention" IgnoreChannelMentionsDefault = "default" IgnoreChannelMentionsOff = "off" IgnoreChannelMentionsOn = "on" IgnoreChannelMentionsNotifyProp = "ignore_channel_mentions" )
const ( // Each sidebar category has a 'type'. System categories are Channels, Favorites and DMs // All user-created categories will have type Custom SidebarCategoryChannels SidebarCategoryType = "channels" SidebarCategoryDirectMessages SidebarCategoryType = "direct_messages" SidebarCategoryFavorites SidebarCategoryType = "favorites" SidebarCategoryCustom SidebarCategoryType = "custom" // Increment to use when adding/reordering things in the sidebar MinimalSidebarSortDistance = 10 // Default Sort Orders for categories DefaultSidebarSortOrderFavorites = 0 DefaultSidebarSortOrderChannels = DefaultSidebarSortOrderFavorites + MinimalSidebarSortDistance DefaultSidebarSortOrderDMs = DefaultSidebarSortOrderChannels + MinimalSidebarSortDistance // Sorting modes // default for all categories except DMs (behaves like manual) SidebarCategorySortDefault SidebarCategorySorting = "" // sort manually SidebarCategorySortManual SidebarCategorySorting = "manual" // sort by recency (default for DMs) SidebarCategorySortRecent SidebarCategorySorting = "recent" // sort by display name alphabetically SidebarCategorySortAlphabetical SidebarCategorySorting = "alpha" )
const ( HeaderRequestId = "X-Request-ID" HeaderVersionId = "X-Version-ID" HeaderClusterId = "X-Cluster-ID" HeaderEtagServer = "ETag" HeaderEtagClient = "If-None-Match" HeaderForwarded = "X-Forwarded-For" HeaderRealIP = "X-Real-IP" HeaderForwardedProto = "X-Forwarded-Proto" HeaderToken = "token" HeaderCsrfToken = "X-CSRF-Token" HeaderBearer = "BEARER" HeaderAuth = "Authorization" HeaderCloudToken = "X-Cloud-Token" HeaderRemoteclusterToken = "X-RemoteCluster-Token" HeaderRemoteclusterId = "X-RemoteCluster-Id" HeaderRequestedWith = "X-Requested-With" HeaderRequestedWithXML = "XMLHttpRequest" HeaderRange = "Range" STATUS = "status" StatusOk = "OK" StatusFail = "FAIL" StatusUnhealthy = "UNHEALTHY" StatusRemove = "REMOVE" ClientDir = "client" APIURLSuffixV1 = "/api/v1" APIURLSuffixV4 = "/api/v4" APIURLSuffix = APIURLSuffixV4 )
const ( EventTypeFailedPayment = "failed-payment" EventTypeFailedPaymentNoCard = "failed-payment-no-card" EventTypeSendAdminWelcomeEmail = "send-admin-welcome-email" EventTypeTrialWillEnd = "trial-will-end" EventTypeTrialEnded = "trial-ended" JoinLimitation = "join" InviteLimitation = "invite" )
const ( BillingSchemePerSeat = BillingScheme("per_seat") BillingSchemeFlatFee = BillingScheme("flat_fee") BillingSchemeSalesServe = BillingScheme("sales_serve") )
const ( RecurringIntervalYearly = RecurringInterval("year") RecurringIntervalMonthly = RecurringInterval("month") )
const ( SubscriptionFamilyCloud = SubscriptionFamily("cloud") SubscriptionFamilyOnPrem = SubscriptionFamily("on-prem") )
const ( CDSOfflineAfterMillis = 1000 * 60 * 30 // 30 minutes CDSTypeApp = "mattermost_app" )
const ( CommandMethodPost = "P" CommandMethodGet = "G" MinTriggerLength = 1 MaxTriggerLength = 128 )
const ( CommandResponseTypeInChannel = "in_channel" CommandResponseTypeEphemeral = "ephemeral" )
const ( ComplianceStatusCreated = "created" ComplianceStatusRunning = "running" ComplianceStatusFinished = "finished" ComplianceStatusFailed = "failed" ComplianceStatusRemoved = "removed" ComplianceTypeDaily = "daily" ComplianceTypeAdhoc = "adhoc" )
const ( ConnSecurityNone = "" ConnSecurityPlain = "PLAIN" ConnSecurityTLS = "TLS" ConnSecurityStarttls = "STARTTLS" ImageDriverLocal = "local" ImageDriverS3 = "amazons3" DatabaseDriverMysql = "mysql" DatabaseDriverPostgres = "postgres" SearchengineElasticsearch = "elasticsearch" MinioAccessKey = "minioaccesskey" MinioSecretKey = "miniosecretkey" MinioBucket = "mattermost-test" PasswordMaximumLength = 64 PasswordMinimumLength = 5 ServiceGitlab = "gitlab" ServiceGoogle = "google" ServiceOffice365 = "office365" ServiceOpenid = "openid" GenericNoChannelNotification = "generic_no_channel" GenericNotification = "generic" GenericNotificationServer = "https://push-test.mattermost.com" MmSupportAdvisorAddress = "support-advisor@mattermost.com" FullNotification = "full" IdLoadedNotification = "id_loaded" DirectMessageAny = "any" DirectMessageTeam = "team" ShowUsername = "username" ShowNicknameFullName = "nickname_full_name" ShowFullName = "full_name" PermissionsAll = "all" PermissionsChannelAdmin = "channel_admin" PermissionsTeamAdmin = "team_admin" PermissionsSystemAdmin = "system_admin" FakeSetting = "********************************" RestrictEmojiCreationAll = "all" RestrictEmojiCreationAdmin = "admin" RestrictEmojiCreationSystemAdmin = "system_admin" PermissionsDeletePostAll = "all" PermissionsDeletePostTeamAdmin = "team_admin" PermissionsDeletePostSystemAdmin = "system_admin" GroupUnreadChannelsDisabled = "disabled" GroupUnreadChannelsDefaultOn = "default_on" GroupUnreadChannelsDefaultOff = "default_off" CollapsedThreadsDisabled = "disabled" CollapsedThreadsDefaultOn = "default_on" CollapsedThreadsDefaultOff = "default_off" EmailBatchingBufferSize = 256 EmailBatchingInterval = 30 EmailNotificationContentsFull = "full" EmailNotificationContentsGeneric = "generic" SitenameMaxLength = 30 ServiceSettingsDefaultSiteURL = "http://localhost:8065" ServiceSettingsDefaultTLSCertFile = "" ServiceSettingsDefaultTLSKeyFile = "" ServiceSettingsDefaultReadTimeout = 300 ServiceSettingsDefaultWriteTimeout = 300 ServiceSettingsDefaultIdleTimeout = 60 ServiceSettingsDefaultMaxLoginAttempts = 10 ServiceSettingsDefaultAllowCorsFrom = "" ServiceSettingsDefaultListenAndAddress = ":8065" ServiceSettingsDefaultGfycatAPIKey = "2_KtH_W5" ServiceSettingsDefaultGfycatAPISecret = "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof" ServiceSettingsDefaultDeveloperFlags = "" TeamSettingsDefaultSiteName = "Mattermost" TeamSettingsDefaultMaxUsersPerTeam = 50 TeamSettingsDefaultCustomBrandText = "" TeamSettingsDefaultCustomDescriptionText = "" TeamSettingsDefaultUserStatusAwayTimeout = 300 SqlSettingsDefaultDataSource = "postgres://mmuser:mostest@localhost/mattermost_test?sslmode=disable&connect_timeout=10" FileSettingsDefaultDirectory = "./data/" ImportSettingsDefaultDirectory = "./import" ImportSettingsDefaultRetentionDays = 30 ExportSettingsDefaultDirectory = "./export" ExportSettingsDefaultRetentionDays = 30 EmailSettingsDefaultFeedbackOrganization = "" SupportSettingsDefaultTermsOfServiceLink = "https://mattermost.com/terms-of-use/" SupportSettingsDefaultPrivacyPolicyLink = "https://mattermost.com/privacy-policy/" SupportSettingsDefaultAboutLink = "https://about.mattermost.com/default-about/" SupportSettingsDefaultHelpLink = "https://about.mattermost.com/default-help/" SupportSettingsDefaultReportAProblemLink = "https://about.mattermost.com/default-report-a-problem/" SupportSettingsDefaultSupportEmail = "" SupportSettingsDefaultReAcceptancePeriod = 365 LdapSettingsDefaultFirstNameAttribute = "" LdapSettingsDefaultLastNameAttribute = "" LdapSettingsDefaultEmailAttribute = "" LdapSettingsDefaultUsernameAttribute = "" LdapSettingsDefaultNicknameAttribute = "" LdapSettingsDefaultIdAttribute = "" LdapSettingsDefaultPositionAttribute = "" LdapSettingsDefaultLoginFieldName = "" LdapSettingsDefaultGroupDisplayNameAttribute = "" LdapSettingsDefaultGroupIdAttribute = "" LdapSettingsDefaultPictureAttribute = "" SamlSettingsDefaultIdAttribute = "" SamlSettingsDefaultGuestAttribute = "" SamlSettingsDefaultAdminAttribute = "" SamlSettingsDefaultFirstNameAttribute = "" SamlSettingsDefaultLastNameAttribute = "" SamlSettingsDefaultEmailAttribute = "" SamlSettingsDefaultUsernameAttribute = "" SamlSettingsDefaultNicknameAttribute = "" SamlSettingsDefaultLocaleAttribute = "" SamlSettingsDefaultPositionAttribute = "" SamlSettingsSignatureAlgorithmSha1 = "RSAwithSHA1" SamlSettingsSignatureAlgorithmSha256 = "RSAwithSHA256" SamlSettingsSignatureAlgorithmSha512 = "RSAwithSHA512" SamlSettingsDefaultSignatureAlgorithm = SamlSettingsSignatureAlgorithmSha1 SamlSettingsCanonicalAlgorithmC14n = "Canonical1.0" SamlSettingsCanonicalAlgorithmC14n11 = "Canonical1.1" SamlSettingsDefaultCanonicalAlgorithm = SamlSettingsCanonicalAlgorithmC14n NativeappSettingsDefaultAppDownloadLink = "https://mattermost.com/download/#mattermostApps" NativeappSettingsDefaultAndroidAppDownloadLink = "https://about.mattermost.com/mattermost-android-app/" NativeappSettingsDefaultIosAppDownloadLink = "https://about.mattermost.com/mattermost-ios-app/" ExperimentalSettingsDefaultLinkMetadataTimeoutMilliseconds = 5000 AnalyticsSettingsDefaultMaxUsersForStatistics = 2500 AnnouncementSettingsDefaultBannerColor = "#f2a93b" AnnouncementSettingsDefaultBannerTextColor = "#333333" AnnouncementSettingsDefaultNoticesJsonURL = "https://notices.mattermost.com/" AnnouncementSettingsDefaultNoticesFetchFrequencySeconds = 3600 TeamSettingsDefaultTeamText = "default" ElasticsearchSettingsDefaultConnectionURL = "http://localhost:9200" ElasticsearchSettingsDefaultUsername = "elastic" ElasticsearchSettingsDefaultPassword = "changeme" ElasticsearchSettingsDefaultPostIndexReplicas = 1 ElasticsearchSettingsDefaultPostIndexShards = 1 ElasticsearchSettingsDefaultChannelIndexReplicas = 1 ElasticsearchSettingsDefaultChannelIndexShards = 1 ElasticsearchSettingsDefaultUserIndexReplicas = 1 ElasticsearchSettingsDefaultUserIndexShards = 1 ElasticsearchSettingsDefaultAggregatePostsAfterDays = 365 ElasticsearchSettingsDefaultPostsAggregatorJobStartTime = "03:00" ElasticsearchSettingsDefaultIndexPrefix = "" ElasticsearchSettingsDefaultLiveIndexingBatchSize = 1 ElasticsearchSettingsDefaultBulkIndexingTimeWindowSeconds = 3600 ElasticsearchSettingsDefaultRequestTimeoutSeconds = 30 BleveSettingsDefaultIndexDir = "" BleveSettingsDefaultBulkIndexingTimeWindowSeconds = 3600 DataRetentionSettingsDefaultMessageRetentionDays = 365 DataRetentionSettingsDefaultFileRetentionDays = 365 DataRetentionSettingsDefaultBoardsRetentionDays = 365 DataRetentionSettingsDefaultDeletionJobStartTime = "02:00" DataRetentionSettingsDefaultBatchSize = 3000 PluginSettingsDefaultDirectory = "./plugins" PluginSettingsDefaultClientDirectory = "./client/plugins" PluginSettingsDefaultEnableMarketplace = true PluginSettingsDefaultMarketplaceURL = "https://api.integrations.mattermost.com" PluginSettingsOldMarketplaceURL = "https://marketplace.integrations.mattermost.com" ComplianceExportTypeCsv = "csv" ComplianceExportTypeActiance = "actiance" ComplianceExportTypeGlobalrelay = "globalrelay" ComplianceExportTypeGlobalrelayZip = "globalrelay-zip" GlobalrelayCustomerTypeA9 = "A9" GlobalrelayCustomerTypeA10 = "A10" ClientSideCertCheckPrimaryAuth = "primary" ClientSideCertCheckSecondaryAuth = "secondary" ImageProxyTypeLocal = "local" ImageProxyTypeAtmosCamo = "atmos/camo" GoogleSettingsDefaultScope = "profile email" GoogleSettingsDefaultAuthEndpoint = "https://accounts.google.com/o/oauth2/v2/auth" GoogleSettingsDefaultTokenEndpoint = "https://www.googleapis.com/oauth2/v4/token" GoogleSettingsDefaultUserAPIEndpoint = "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata" Office365SettingsDefaultScope = "User.Read" Office365SettingsDefaultAuthEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize" Office365SettingsDefaultTokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token" Office365SettingsDefaultUserAPIEndpoint = "https://graph.microsoft.com/v1.0/me" CloudSettingsDefaultCwsURL = "https://customers.mattermost.com" CloudSettingsDefaultCwsAPIURL = "https://portal.internal.prod.cloud.mattermost.com" OpenidSettingsDefaultScope = "profile openid email" LocalModeSocketPath = "/var/tmp/mattermost_local.socket" )
const ( UserPropsKeyCustomStatus = "customStatus" CustomStatusTextMaxRunes = 100 MaxRecentCustomStatuses = 5 DefaultCustomStatusEmoji = "speech_balloon" )
const ( EmojiNameMaxLength = 64 EmojiSortByName = "name" )
const ( FileinfoSortByCreated = "CreateAt" FileinfoSortBySize = "Size" )
const ( GroupSourceLdap GroupSource = "ldap" GroupNameMaxLength = 64 GroupSourceMaxLength = 64 GroupDisplayNameMaxLength = 128 GroupDescriptionMaxLength = 1024 GroupRemoteIDMaxLength = 48 )
const ( PostActionTypeButton = "button" PostActionTypeSelect = "select" InteractiveDialogTriggerTimeoutMilliseconds = 3000 )
const ( JobTypeDataRetention = "data_retention" JobTypeMessageExport = "message_export" JobTypeElasticsearchPostIndexing = "elasticsearch_post_indexing" JobTypeElasticsearchPostAggregation = "elasticsearch_post_aggregation" JobTypeBlevePostIndexing = "bleve_post_indexing" JobTypeLdapSync = "ldap_sync" JobTypeMigrations = "migrations" JobTypePlugins = "plugins" JobTypeExpiryNotify = "expiry_notify" JobTypeProductNotices = "product_notices" JobTypeActiveUsers = "active_users" JobTypeImportProcess = "import_process" JobTypeImportDelete = "import_delete" JobTypeExportProcess = "export_process" JobTypeExportDelete = "export_delete" JobTypeCloud = "cloud" JobTypeResendInvitationEmail = "resend_invitation_email" JobTypeExtractContent = "extract_content" JobStatusPending = "pending" JobStatusInProgress = "in_progress" JobStatusSuccess = "success" JobStatusError = "error" JobStatusCancelRequested = "cancel_requested" JobStatusCanceled = "canceled" JobStatusWarning = "warning" )
const ( UserAuthServiceLdap = "ldap" LdapPublicCertificateName = "ldap-public.crt" LdapPrivateKeyName = "ldap-private.key" )
const ( ExpiredLicenseError = "api.license.add_license.expired.app_error" InvalidLicenseError = "api.license.add_license.invalid.app_error" LicenseGracePeriod = 1000 * 60 * 60 * 24 * 10 //10 days LicenseRenewalLink = "https://mattermost.com/renew/" LicenseShortSkuE10 = "E10" LicenseShortSkuE20 = "E20" LicenseShortSkuProfessional = "professional" LicenseShortSkuEnterprise = "enterprise" )
const ( LinkMetadataTypeImage LinkMetadataType = "image" LinkMetadataTypeNone LinkMetadataType = "none" LinkMetadataTypeOpengraph LinkMetadataType = "opengraph" LinkMetadataMaxImages int = 5 )
const ( AdvancedPermissionsMigrationKey = "AdvancedPermissionsMigrationComplete" MigrationKeyAdvancedPermissionsPhase2 = "migration_advanced_permissions_phase_2" MigrationKeyEmojiPermissionsSplit = "emoji_permissions_split" MigrationKeyWebhookPermissionsSplit = "webhook_permissions_split" MigrationKeyListJoinPublicPrivateTeams = "list_join_public_private_teams" MigrationKeyRemovePermanentDeleteUser = "remove_permanent_delete_user" MigrationKeyAddBotPermissions = "add_bot_permissions" MigrationKeyApplyChannelManageDeleteToChannelUser = "apply_channel_manage_delete_to_channel_user" MigrationKeyRemoveChannelManageDeleteFromTeamUser = "remove_channel_manage_delete_from_team_user" MigrationKeyViewMembersNewPermission = "view_members_new_permission" MigrationKeyAddManageGuestsPermissions = "add_manage_guests_permissions" MigrationKeyChannelModerationsPermissions = "channel_moderations_permissions" MigrationKeyAddUseGroupMentionsPermission = "add_use_group_mentions_permission" MigrationKeyAddSystemConsolePermissions = "add_system_console_permissions" MigrationKeySidebarCategoriesPhase2 = "migration_sidebar_categories_phase_2" MigrationKeyAddConvertChannelPermissions = "add_convert_channel_permissions" MigrationKeyAddSystemRolesPermissions = "add_system_roles_permissions" MigrationKeyAddBillingPermissions = "add_billing_permissions" MigrationKeyAddManageSecureConnectionsPermissions = "manage_secure_connections_permissions" MigrationKeyAddDownloadComplianceExportResults = "download_compliance_export_results" MigrationKeyAddComplianceSubsectionPermissions = "compliance_subsection_permissions" MigrationKeyAddExperimentalSubsectionPermissions = "experimental_subsection_permissions" MigrationKeyAddAuthenticationSubsectionPermissions = "authentication_subsection_permissions" MigrationKeyAddSiteSubsectionPermissions = "site_subsection_permissions" MigrationKeyAddEnvironmentSubsectionPermissions = "environment_subsection_permissions" MigrationKeyAddReportingSubsectionPermissions = "reporting_subsection_permissions" MigrationKeyAddTestEmailAncillaryPermission = "test_email_ancillary_permission" MigrationKeyAddAboutSubsectionPermissions = "about_subsection_permissions" MigrationKeyAddIntegrationsSubsectionPermissions = "integrations_subsection_permissions" MigrationKeyAddPlaybooksPermissions = "playbooks_permissions" )
const ( OAuthActionSignup = "signup" OAuthActionLogin = "login" OAuthActionEmailToSSO = "email_to_sso" OAuthActionSSOToEmail = "sso_to_email" OAuthActionMobile = "mobile" )
const ( PermissionScopeSystem = "system_scope" PermissionScopeTeam = "team_scope" PermissionScopeChannel = "channel_scope" PermissionScopePlaybook = "playbook_scope" PermissionScopeRun = "run_scope" )
const ( PluginClusterEventSendTypeReliable = ClusterSendReliable PluginClusterEventSendTypeBestEffort = ClusterSendBestEffort )
const ( KeyValuePluginIdMaxRunes = 190 KeyValueKeyMaxRunes = 150 )
const ( PluginStateNotRunning = 0 PluginStateStarting = 1 // unused by server PluginStateRunning = 2 PluginStateFailedToStart = 3 PluginStateFailedToStayRunning = 4 PluginStateStopping = 5 // unused by server )
const ( MinIdLength = 3 MaxIdLength = 190 ValidIdRegex = `^[a-zA-Z0-9-_\.]+$` )
const ( PostSystemMessagePrefix = "system_" PostTypeDefault = "" PostTypeSlackAttachment = "slack_attachment" PostTypeSystemGeneric = "system_generic" PostTypeJoinLeave = "system_join_leave" // Deprecated, use PostJoinChannel or PostLeaveChannel instead PostTypeJoinChannel = "system_join_channel" PostTypeGuestJoinChannel = "system_guest_join_channel" PostTypeLeaveChannel = "system_leave_channel" PostTypeJoinTeam = "system_join_team" PostTypeLeaveTeam = "system_leave_team" PostTypeAutoResponder = "system_auto_responder" PostTypeAddRemove = "system_add_remove" // Deprecated, use PostAddToChannel or PostRemoveFromChannel instead PostTypeAddToChannel = "system_add_to_channel" PostTypeAddGuestToChannel = "system_add_guest_to_chan" PostTypeRemoveFromChannel = "system_remove_from_channel" PostTypeMoveChannel = "system_move_channel" PostTypeAddToTeam = "system_add_to_team" PostTypeRemoveFromTeam = "system_remove_from_team" PostTypeHeaderChange = "system_header_change" PostTypeDisplaynameChange = "system_displayname_change" PostTypeConvertChannel = "system_convert_channel" PostTypePurposeChange = "system_purpose_change" PostTypeChannelDeleted = "system_channel_deleted" PostTypeChannelRestored = "system_channel_restored" PostTypeEphemeral = "system_ephemeral" PostTypeChangeChannelPrivacy = "system_change_chan_privacy" PostTypeAddBotTeamsChannels = "add_bot_teams_channels" PostTypeSystemWarnMetricStatus = "warn_metric_status" PostTypeMe = "me" PostCustomTypePrefix = "custom_" PostFileidsMaxRunes = 300 PostFilenamesMaxRunes = 4000 PostMessageMaxRunesV1 = 4000 PostMessageMaxBytesV2 = 65535 // Maximum size of a TEXT column in MySQL PostMessageMaxRunesV2 = PostMessageMaxBytesV2 / 4 // Assume a worst-case representation PostPropsMaxRunes = 800000 PostPropsMaxUserRunes = PostPropsMaxRunes - 40000 // Leave some room for system / pre-save modifications PropsAddChannelMember = "add_channel_member" PostPropsAddedUserId = "addedUserId" PostPropsDeleteBy = "deleteBy" PostPropsOverrideIconURL = "override_icon_url" PostPropsOverrideIconEmoji = "override_icon_emoji" PostPropsMentionHighlightDisabled = "mentionHighlightDisabled" PostPropsGroupHighlightDisabled = "disable_group_highlight" PostPropsPreviewedPost = "previewed_post" )
const ( PreferenceCategoryDirectChannelShow = "direct_channel_show" PreferenceCategoryGroupChannelShow = "group_channel_show" PreferenceCategoryTutorialSteps = "tutorial_step" PreferenceCategoryAdvancedSettings = "advanced_settings" PreferenceCategoryFlaggedPost = "flagged_post" PreferenceCategoryFavoriteChannel = "favorite_channel" PreferenceCategorySidebarSettings = "sidebar_settings" PreferenceCategoryDisplaySettings = "display_settings" PreferenceNameCollapsedThreadsEnabled = "collapsed_reply_threads" PreferenceNameChannelDisplayMode = "channel_display_mode" PreferenceNameCollapseSetting = "collapse_previews" PreferenceNameMessageDisplay = "message_display" PreferenceNameNameFormat = "name_format" PreferenceNameUseMilitaryTime = "use_military_time" PreferenceRecommendedNextSteps = "recommended_next_steps" PreferenceCategoryTheme = "theme" PreferenceCategoryAuthorizedOAuthApp = "oauth_app" PreferenceCategoryLast = "last" PreferenceNameLastChannel = "channel" PreferenceNameLastTeam = "team" PreferenceCategoryCustomStatus = "custom_status" PreferenceNameRecentCustomStatuses = "recent_custom_statuses" PreferenceNameCustomStatusTutorialState = "custom_status_tutorial_state" PreferenceCustomStatusModalViewed = "custom_status_modal_viewed" PreferenceCategoryNotifications = "notifications" PreferenceNameEmailInterval = "email_interval" PreferenceEmailIntervalNoBatchingSeconds = "30" // the "immediate" setting is actually 30s PreferenceEmailIntervalBatchingSeconds = "900" // fifteen minutes is 900 seconds PreferenceEmailIntervalImmediately = "immediately" PreferenceEmailIntervalFifteen = "fifteen" PreferenceEmailIntervalFifteenAsSeconds = "900" PreferenceEmailIntervalHour = "hour" PreferenceEmailIntervalHourAsSeconds = "3600" )
const ( PushNotifyApple = "apple" PushNotifyAndroid = "android" PushNotifyAppleReactNative = "apple_rn" PushNotifyAndroidReactNative = "android_rn" PushTypeMessage = "message" PushTypeClear = "clear" PushTypeUpdateBadge = "update_badge" PushTypeSession = "session" PushMessageV2 = "v2" PushSoundNone = "none" // The category is set to handle a set of interactive Actions // with the push notifications CategoryCanReply = "CAN_REPLY" MHPNS = "https://push.mattermost.com" PushSendPrepare = "Prepared to send" PushSendSuccess = "Successful" PushNotSent = "Not Sent due to preferences" PushReceived = "Received by device" )
const ( PushStatus = "status" PushStatusOk = "OK" PushStatusFail = "FAIL" PushStatusRemove = "REMOVE" PushStatusErrorMsg = "error" )
const ( RemoteOfflineAfterMillis = 1000 * 60 * 5 // 5 minutes RemoteNameMinLength = 1 RemoteNameMaxLength = 64 )
const ( SystemGuestRoleId = "system_guest" SystemUserRoleId = "system_user" SystemAdminRoleId = "system_admin" SystemPostAllRoleId = "system_post_all" SystemPostAllPublicRoleId = "system_post_all_public" SystemUserAccessTokenRoleId = "system_user_access_token" SystemUserManagerRoleId = "system_user_manager" SystemReadOnlyAdminRoleId = "system_read_only_admin" SystemManagerRoleId = "system_manager" TeamGuestRoleId = "team_guest" TeamUserRoleId = "team_user" TeamAdminRoleId = "team_admin" TeamPostAllRoleId = "team_post_all" TeamPostAllPublicRoleId = "team_post_all_public" ChannelGuestRoleId = "channel_guest" ChannelUserRoleId = "channel_user" ChannelAdminRoleId = "channel_admin" PlaybookAdminRoleId = "playbook_admin" PlaybookMemberRoleId = "playbook_member" RunAdminRoleId = "run_admin" RunMemberRoleId = "run_member" RoleNameMaxLength = 64 RoleDisplayNameMaxLength = 128 RoleDescriptionMaxLength = 1024 RoleScopeSystem RoleScope = "System" RoleScopeTeam RoleScope = "Team" RoleScopeChannel RoleScope = "Channel" RoleTypeGuest RoleType = "Guest" RoleTypeUser RoleType = "User" RoleTypeAdmin RoleType = "Admin" )
const ( UserAuthServiceSaml = "saml" UserAuthServiceSamlText = "SAML" UserAuthServiceIsSaml = "isSaml" UserAuthServiceIsMobile = "isMobile" UserAuthServiceIsOAuth = "isOAuthUser" )
const ( SchemeDisplayNameMaxLength = 128 SchemeNameMaxLength = 64 SchemeDescriptionMaxLength = 1024 SchemeScopeTeam = "team" SchemeScopeChannel = "channel" SchemeScopePlaybook = "playbook" SchemeScopeRun = "run" )
const ( SessionCookieToken = "MMAUTHTOKEN" SessionCookieUser = "MMUSERID" SessionCookieCsrf = "MMCSRF" SessionCookieCloudUrl = "MMCLOUDURL" SessionCacheSize = 35000 SessionPropPlatform = "platform" SessionPropOs = "os" SessionPropBrowser = "browser" SessionPropType = "type" SessionPropUserAccessTokenId = "user_access_token_id" SessionPropIsBot = "is_bot" SessionPropIsBotValue = "true" SessionTypeUserAccessToken = "UserAccessToken" SessionTypeCloudKey = "CloudKey" SessionTypeRemoteclusterToken = "RemoteClusterToken" SessionPropIsGuest = "is_guest" SessionActivityTimeout = 1000 * 60 * 5 // 5 minutes SessionUserAccessTokenExpiry = 100 * 365 // 100 years )
const ( StatusOutOfOffice = "ooo" StatusOffline = "offline" StatusAway = "away" StatusDnd = "dnd" StatusOnline = "online" StatusCacheSize = SessionCacheSize StatusChannelTimeout = 20000 // 20 seconds StatusMinUpdateTime = 120000 // 2 minutes )
const ( SystemTelemetryId = "DiagnosticId" SystemRanUnitTests = "RanUnitTests" SystemLastSecurityTime = "LastSecurityTime" SystemActiveLicenseId = "ActiveLicenseId" SystemLicenseRenewalToken = "LicenseRenewalToken" SystemLastComplianceTime = "LastComplianceTime" SystemAsymmetricSigningKeyKey = "AsymmetricSigningKey" SystemPostActionCookieSecretKey = "PostActionCookieSecret" SystemInstallationDateKey = "InstallationDate" SystemFirstServerRunTimestampKey = "FirstServerRunTimestamp" SystemClusterEncryptionKey = "ClusterEncryptionKey" SystemUpgradedFromTeId = "UpgradedFromTE" SystemWarnMetricNumberOfTeams5 = "warn_metric_number_of_teams_5" SystemWarnMetricNumberOfChannels50 = "warn_metric_number_of_channels_50" SystemWarnMetricMfa = "warn_metric_mfa" SystemWarnMetricEmailDomain = "warn_metric_email_domain" SystemWarnMetricNumberOfActiveUsers100 = "warn_metric_number_of_active_users_100" SystemWarnMetricNumberOfActiveUsers200 = "warn_metric_number_of_active_users_200" SystemWarnMetricNumberOfActiveUsers300 = "warn_metric_number_of_active_users_300" SystemWarnMetricNumberOfActiveUsers500 = "warn_metric_number_of_active_users_500" SystemWarnMetricNumberOfPosts2m = "warn_metric_number_of_posts_2M" SystemWarnMetricLastRunTimestampKey = "LastWarnMetricRunTimestamp" SystemMetricSupportEmailNotConfigured = "warn_metric_support_email_not_configured" SystemFirstAdminVisitMarketplace = "FirstAdminVisitMarketplace" AwsMeteringReportInterval = 1 AwsMeteringDimensionUsageHrs = "UsageHrs" UserLimitOverageCycleEndDate = "UserLimitOverageCycleEndDate" OverUserLimitForgivenCount = "OverUserLimitForgivenCount" OverUserLimitLastEmailSent = "OverUserLimitLastEmailSent" )
const ( WarnMetricStatusLimitReached = "true" WarnMetricStatusRunonce = "runonce" WarnMetricStatusAck = "ack" WarnMetricStatusStorePrefix = "warn_metric_" WarnMetricJobInterval = 24 * 7 WarnMetricNumberOfActiveUsers25 = 25 WarnMetricJobWaitTime = 1000 * 3600 * 24 * 7 // 7 days )
const ( TeamOpen = "O" TeamInvite = "I" TeamAllowedDomainsMaxLength = 500 TeamCompanyNameMaxLength = 64 TeamDescriptionMaxLength = 255 TeamDisplayNameMaxRunes = 64 TeamEmailMaxLength = 128 TeamNameMaxLength = 64 TeamNameMinLength = 2 )
const ( TokenSize = 64 MaxTokenExipryTime = 1000 * 60 * 60 * 48 // 48 hour TokenTypeOAuth = "oauth" )
const ( Me = "me" UserNotifyAll = "all" UserNotifyHere = "here" UserNotifyMention = "mention" UserNotifyNone = "none" DesktopNotifyProp = "desktop" DesktopSoundNotifyProp = "desktop_sound" MarkUnreadNotifyProp = "mark_unread" PushNotifyProp = "push" PushStatusNotifyProp = "push_status" EmailNotifyProp = "email" ChannelMentionsNotifyProp = "channel" CommentsNotifyProp = "comments" MentionKeysNotifyProp = "mention_keys" CommentsNotifyNever = "never" CommentsNotifyRoot = "root" CommentsNotifyAny = "any" CommentsNotifyCRT = "crt" FirstNameNotifyProp = "first_name" AutoResponderActiveNotifyProp = "auto_responder_active" AutoResponderMessageNotifyProp = "auto_responder_message" DesktopThreadsNotifyProp = "desktop_threads" PushThreadsNotifyProp = "push_threads" EmailThreadsNotifyProp = "email_threads" DefaultLocale = "en" UserAuthServiceEmail = "email" UserEmailMaxLength = 128 UserNicknameMaxRunes = 64 UserPositionMaxRunes = 128 UserFirstNameMaxRunes = 64 UserLastNameMaxRunes = 64 UserAuthDataMaxLength = 128 UserNameMaxLength = 64 UserNameMinLength = 1 UserPasswordMaxLength = 72 UserLocaleMaxLength = 5 UserTimezoneMaxRunes = 256 UserRolesMaxLength = 256 )
const ( LowercaseLetters = "abcdefghijklmnopqrstuvwxyz" UppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" NUMBERS = "0123456789" SYMBOLS = " !\"\\#$%&'()*+,-./:;<=>?@[]^_`|~" )
const ( SocketMaxMessageSizeKb = 8 * 1024 // 8KB PingTimeoutBufferSeconds = 5 )
const ( WebsocketEventTyping = "typing" WebsocketEventPosted = "posted" WebsocketEventPostEdited = "post_edited" WebsocketEventPostDeleted = "post_deleted" WebsocketEventPostUnread = "post_unread" WebsocketEventChannelConverted = "channel_converted" WebsocketEventChannelCreated = "channel_created" WebsocketEventChannelDeleted = "channel_deleted" WebsocketEventChannelRestored = "channel_restored" WebsocketEventChannelUpdated = "channel_updated" WebsocketEventChannelMemberUpdated = "channel_member_updated" WebsocketEventChannelSchemeUpdated = "channel_scheme_updated" WebsocketEventDirectAdded = "direct_added" WebsocketEventGroupAdded = "group_added" WebsocketEventNewUser = "new_user" WebsocketEventAddedToTeam = "added_to_team" WebsocketEventLeaveTeam = "leave_team" WebsocketEventUpdateTeam = "update_team" WebsocketEventDeleteTeam = "delete_team" WebsocketEventRestoreTeam = "restore_team" WebsocketEventUpdateTeamScheme = "update_team_scheme" WebsocketEventUserAdded = "user_added" WebsocketEventUserUpdated = "user_updated" WebsocketEventUserRoleUpdated = "user_role_updated" WebsocketEventMemberroleUpdated = "memberrole_updated" WebsocketEventUserRemoved = "user_removed" WebsocketEventPreferenceChanged = "preference_changed" WebsocketEventPreferencesChanged = "preferences_changed" WebsocketEventPreferencesDeleted = "preferences_deleted" WebsocketEventEphemeralMessage = "ephemeral_message" WebsocketEventStatusChange = "status_change" WebsocketEventHello = "hello" WebsocketAuthenticationChallenge = "authentication_challenge" WebsocketEventReactionAdded = "reaction_added" WebsocketEventReactionRemoved = "reaction_removed" WebsocketEventResponse = "response" WebsocketEventEmojiAdded = "emoji_added" WebsocketEventChannelViewed = "channel_viewed" WebsocketEventPluginStatusesChanged = "plugin_statuses_changed" WebsocketEventPluginEnabled = "plugin_enabled" WebsocketEventPluginDisabled = "plugin_disabled" WebsocketEventRoleUpdated = "role_updated" WebsocketEventLicenseChanged = "license_changed" WebsocketEventConfigChanged = "config_changed" WebsocketEventOpenDialog = "open_dialog" WebsocketEventGuestsDeactivated = "guests_deactivated" WebsocketEventUserActivationStatusChange = "user_activation_status_change" WebsocketEventReceivedGroup = "received_group" WebsocketEventReceivedGroupAssociatedToTeam = "received_group_associated_to_team" WebsocketEventReceivedGroupNotAssociatedToTeam = "received_group_not_associated_to_team" WebsocketEventReceivedGroupAssociatedToChannel = "received_group_associated_to_channel" WebsocketEventReceivedGroupNotAssociatedToChannel = "received_group_not_associated_to_channel" WebsocketEventSidebarCategoryCreated = "sidebar_category_created" WebsocketEventSidebarCategoryUpdated = "sidebar_category_updated" WebsocketEventSidebarCategoryDeleted = "sidebar_category_deleted" WebsocketEventSidebarCategoryOrderUpdated = "sidebar_category_order_updated" WebsocketWarnMetricStatusReceived = "warn_metric_status_received" WebsocketWarnMetricStatusRemoved = "warn_metric_status_removed" WebsocketEventCloudPaymentStatusUpdated = "cloud_payment_status_updated" WebsocketEventThreadUpdated = "thread_updated" WebsocketEventThreadFollowChanged = "thread_follow_changed" WebsocketEventThreadReadChanged = "thread_read_changed" WebsocketFirstAdminVisitMarketplaceStatusReceived = "first_admin_visit_marketplace_status_received" )
const ChannelSearchDefaultLimit = 50
const (
CommandWebhookLifetime = 1000 * 60 * 30
)
const ConfigAccessTagAnySysConsoleRead = "*_read"
Allows read access if any PermissionSysconsoleRead* is allowed
const ConfigAccessTagCloudRestrictable = "cloud_restrictable"
const ConfigAccessTagType = "access"
const ConfigAccessTagWriteRestrictable = "write_restrictable"
const (
DefaultWebhookUsername = "webhook"
)
const (
LicenseUpForRenewalEmailSent = "LicenseUpForRenewalEmailSent"
)
const (
MaxImageSize = int64(6048 * 4032) // 24 megapixels, roughly 36MB as a raw image
)
const OutgoingHookResponseTypeComment = "comment"
const (
USERNAME = "Username"
)
const UploadNoUserID = "nouser"
UploadNoUserID is a "fake" user id used by the API layer when in local mode.
const (
UserAuthServiceGitlab = "gitlab"
)
const UserSearchDefaultLimit = 100
const UserSearchMaxLimit = 1000
Variables ¶
var AllJobTypes = [...]string{ JobTypeDataRetention, JobTypeMessageExport, JobTypeElasticsearchPostIndexing, JobTypeElasticsearchPostAggregation, JobTypeBlevePostIndexing, JobTypeLdapSync, JobTypeMigrations, JobTypePlugins, JobTypeExpiryNotify, JobTypeProductNotices, JobTypeActiveUsers, JobTypeImportProcess, JobTypeImportDelete, JobTypeExportProcess, JobTypeExportDelete, JobTypeCloud, JobTypeExtractContent, }
var AllPermissions []*Permission
var BuildDate string
var BuildEnterpriseReady string
var BuildHash string
var BuildHashEnterprise string
var BuildNumber string
var BuiltInSchemeManagedRoleIDs []string
var ChannelModeratedPermissions []string
var ChannelModeratedPermissionsMap map[string]string
var CurrentVersion string = versions[0]
var DeprecatedPermissions []*Permission
var EmojiPattern = regexp.MustCompile(`:[a-zA-Z0-9_+-]+:`)
var MockCWS string
var NewSystemRoleIDs []string
var PostActionRetainPropKeys = []string{"from_webhook", "override_username", "override_icon_url"}
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 SysconsoleAncillaryPermissions map[string][]*Permission
SysconsoleAncillaryPermissions maps the non-sysconsole permissions required by each sysconsole view.
var SysconsoleReadPermissions []*Permission
var SysconsoleWritePermissions []*Permission
var SystemEmojis = map[string]string{} /* 4458 elements not displayed */
var SystemManagerDefaultPermissions []string
var SystemReadOnlyAdminDefaultPermissions []string
var SystemUserManagerDefaultPermissions []string
var WarnMetricsTable = map[string]WarnMetric{ SystemWarnMetricMfa: { Id: SystemWarnMetricMfa, Limit: -1, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricEmailDomain: { Id: SystemWarnMetricEmailDomain, Limit: -1, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricNumberOfTeams5: { Id: SystemWarnMetricNumberOfTeams5, Limit: 5, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricNumberOfChannels50: { Id: SystemWarnMetricNumberOfChannels50, Limit: 50, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricNumberOfActiveUsers100: { Id: SystemWarnMetricNumberOfActiveUsers100, Limit: 100, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricNumberOfActiveUsers200: { Id: SystemWarnMetricNumberOfActiveUsers200, Limit: 200, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricNumberOfActiveUsers300: { Id: SystemWarnMetricNumberOfActiveUsers300, Limit: 300, IsBotOnly: true, IsRunOnce: true, }, SystemWarnMetricNumberOfActiveUsers500: { Id: SystemWarnMetricNumberOfActiveUsers500, Limit: 500, IsBotOnly: false, IsRunOnce: true, }, SystemWarnMetricNumberOfPosts2m: { Id: SystemWarnMetricNumberOfPosts2m, Limit: 2000000, IsBotOnly: false, IsRunOnce: true, }, SystemMetricSupportEmailNotConfigured: { Id: SystemMetricSupportEmailNotConfigured, Limit: -1, IsBotOnly: true, IsRunOnce: false, SkipAction: true, }, }
Functions ¶
func AddAncillaryPermissions ¶
func AppErrorInit ¶
func AppErrorInit(t i18n.TranslateFunc)
func ArrayFromInterface ¶
func ArrayFromInterface(data interface{}) []string
func ArrayFromJSON ¶
func ArrayToJSON ¶
func AuditModelTypeConv ¶
func AuditModelTypeConv(val interface{}) (newVal interface{}, converted bool)
AuditModelTypeConv converts key model types to something better suited for audit output.
func ChannelMentions ¶
func CleanRoleNames ¶
func CleanTeamName ¶
func CleanUsername ¶
func ClearMentionTags ¶
func CompliancePostHeader ¶
func CompliancePostHeader() []string
func DecryptPostActionCookie ¶
func EmailInviteWithErrorToEmails ¶
func EmailInviteWithErrorToEmails(o []*EmailInviteWithError) []string
func EmailInviteWithErrorToString ¶
func EmailInviteWithErrorToString(o *EmailInviteWithError) string
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 GetDMNameFromIds ¶
func GetDefaultAppCustomURLSchemes ¶
func GetDefaultAppCustomURLSchemes() []string
func GetEmojiNameFromUnicode ¶
func GetEndOfDayMillis ¶
GetEndOfDayMillis is a convenience method to get milliseconds since epoch for provided date's end of day
func GetEtagForFileInfos ¶
func GetGroupNameFromUserIds ¶
func GetInfoForBytes ¶
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 GetTimeForMillis ¶
GetTimeForMillis is a convenience method to get time.Time for milliseconds since epoch.
func HashPassword ¶
HashPassword generates a hash using the bcrypt.GenerateFromPassword
func IncomingWebhookRequestFromJSON ¶
func IncomingWebhookRequestFromJSON(data io.Reader) (*IncomingWebhookRequest, *AppError)
func IsBotDMChannel ¶
func IsCurrentVersion ¶
func IsInRole ¶
Make sure you actually want to use this function. In context.go there are functions to check permissions This function should not be used to check permissions.
func IsReservedTeamName ¶
func IsSendEmailValid ¶
func IsValidCategoryId ¶
func IsValidEmail ¶
func IsValidHTTPURL ¶
func IsValidLocale ¶
func IsValidPluginId ¶
IsValidPluginId verifies that the plugin id has a minimum length of 3, maximum length of 190, and contains only alphanumeric characters, dashes, underscores and periods.
These constraints are necessary since the plugin id is used as part of a filesystem path.
func IsValidRemoteName ¶
func IsValidRoleName ¶
func IsValidSchemeName ¶
func IsValidTeamName ¶
func IsValidUserRoles ¶
func IsValidUsername ¶
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 NewPluginKeyValueFromOptions ¶
func NewPluginKeyValueFromOptions(pluginId, key string, value []byte, opt PluginKVSetOptions) (*PluginKeyValue, *AppError)
NewPluginKeyValueFromOptions return a PluginKeyValue given a pluginID, a KV pair and options.
func NewRandomString ¶
NewRandomString returns a random string of the given length. The resulting entropy will be (5 * length) bits.
func NewRandomTeamName ¶
func NewRandomTeamName() string
NewRandomTeamName is a NewId that will be a valid team name.
func NormalizeEmail ¶
func NormalizeRemoteName ¶
func NormalizeUsername ¶
func PadDateStringZeros ¶
PadDateStringZeros is a convenience method to pad 2 digit date parts with zeros to meet ISO 8601 format
func ParseHashtags ¶
func ParseSlackAttachment ¶
func ParseSlackAttachment(post *Post, attachments []*SlackAttachment)
This method only parses and processes the attachments, all else should be set in the post which is passed
func PermissionsChangedByPatch ¶
Returns an array of permissions that are in either role.Permissions or patch.Permissions, but not both.
func RemoveDuplicateStrings ¶
RemoveDuplicateStrings does an in-place removal of duplicate strings from the input slice. The original slice gets modified.
func RewriteImageURLs ¶
RewriteImageURLs takes a message and returns a copy that has all of the image URLs replaced according to the function f. For each image URL, f will be invoked, and the resulting markdown will contain the URL returned by that invocation instead.
Image URLs are destination URLs used in inline images or reference definitions that are used anywhere in the input markdown as an image.
func RuneToHexadecimalString ¶
func SanitizeUnicode ¶
SanitizeUnicode will remove undesirable Unicode characters from a string.
func StatusListToJSON ¶
func StatusMapToInterfaceMap ¶
func StringInterfaceFromJSON ¶
func StringInterfaceToJSON ¶
func TeamMemberWithErrorToString ¶
func TeamMemberWithErrorToString(o *TeamMemberWithError) string
Types ¶
type AccessData ¶
type AccessData struct { ClientId string `json:"client_id"` UserId string `json:"user_id"` Token string `json:"token"` RefreshToken string `json:"refresh_token"` RedirectUri string `json:"redirect_uri"` ExpiresAt int64 `json:"expires_at"` Scope string `json:"scope"` }
func (*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.
type AccessResponse ¶
type AddOn ¶
type AddOn struct { ID string `json:"id"` Name string `json:"name"` DisplayName string `json:"display_name"` PricePerSeat float64 `json:"price_per_seat"` }
AddOn represents an addon to a product.
type Address ¶
type Address struct { City string `json:"city"` Country string `json:"country"` Line1 string `json:"line1"` Line2 string `json:"line2"` PostalCode string `json:"postal_code"` State string `json:"state"` }
Address model represents a customer's address.
type AnalyticsRow ¶
type AnalyticsRows ¶
type AnalyticsRows []*AnalyticsRow
type AnalyticsSettings ¶
type AnalyticsSettings struct {
MaxUsersForStatistics *int `access:"write_restrictable,cloud_restrictable"`
}
func (*AnalyticsSettings) SetDefaults ¶
func (s *AnalyticsSettings) SetDefaults()
type AnnouncementSettings ¶
type AnnouncementSettings struct { EnableBanner *bool `access:"site_announcement_banner"` BannerText *string `access:"site_announcement_banner"` // telemetry: none BannerColor *string `access:"site_announcement_banner"` BannerTextColor *string `access:"site_announcement_banner"` AllowBannerDismissal *bool `access:"site_announcement_banner"` AdminNoticesEnabled *bool `access:"site_notices"` UserNoticesEnabled *bool `access:"site_notices"` NoticesURL *string `access:"site_notices,write_restrictable"` // telemetry: none NoticesFetchFrequency *int `access:"site_notices,write_restrictable"` // telemetry: none NoticesSkipCache *bool `access:"site_notices,write_restrictable"` // telemetry: none }
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 GenerateTriggerId ¶
func InvalidUserError ¶
func IsSearchParamsListValid ¶
func IsSearchParamsListValid(paramsList []*SearchParams) *AppError
func IsValidEmojiName ¶
func MakeBotNotFoundError ¶
MakeBotNotFoundError creates the error returned when a bot does not exist, or when the user isn't allowed to query the bot. The errors must the same in both cases to avoid leaking that a user is a bot.
func NewAppError ¶
func (*AppError) SystemMessage ¶
func (er *AppError) SystemMessage(T i18n.TranslateFunc) string
func (*AppError) Translate ¶
func (er *AppError) Translate(T i18n.TranslateFunc)
type AttributeValue ¶
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"` }
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 (*AuthorizeRequest) IsValid ¶
func (ar *AuthorizeRequest) IsValid() *AppError
IsValid validates the AuthorizeRequest and returns an error if it isn't configured correctly.
type AutocompleteArg ¶
type AutocompleteArg struct { // Name of the argument Name string // Text displayed to the user to help with the autocomplete HelpText string // Type of the argument Type AutocompleteArgType // Required determines if argument is optional or not. Required bool // Actual data of the argument (depends on the Type) Data interface{} }
AutocompleteArg describes an argument of the command. Arguments can be named or positional. If Name is empty string Argument is positional otherwise it is named argument. Named arguments are passed as --Name Argument_Value.
func (*AutocompleteArg) Equals ¶
func (a *AutocompleteArg) Equals(arg *AutocompleteArg) bool
Equals method checks if argument is the same.
func (*AutocompleteArg) UnmarshalJSON ¶
func (a *AutocompleteArg) UnmarshalJSON(b []byte) error
UnmarshalJSON will unmarshal argument
type AutocompleteArgType ¶
type AutocompleteArgType string
AutocompleteArgType describes autocomplete argument type
const ( AutocompleteArgTypeText AutocompleteArgType = "TextInput" AutocompleteArgTypeStaticList AutocompleteArgType = "StaticList" AutocompleteArgTypeDynamicList AutocompleteArgType = "DynamicList" )
Argument types
type AutocompleteData ¶
type AutocompleteData struct { // Trigger of the command Trigger string // Hint of a command Hint string // Text displayed to the user to help with the autocomplete description HelpText string // Role of the user who should be able to see the autocomplete info of this command RoleID string // Arguments of the command. Arguments can be named or positional. // If they are positional order in the list matters, if they are named order does not matter. // All arguments should be either named or positional, no mixing allowed. Arguments []*AutocompleteArg // Subcommands of the command SubCommands []*AutocompleteData }
AutocompleteData describes slash command autocomplete information.
func NewAutocompleteData ¶
func NewAutocompleteData(trigger, hint, helpText string) *AutocompleteData
NewAutocompleteData returns new Autocomplete data.
func (*AutocompleteData) AddCommand ¶
func (ad *AutocompleteData) AddCommand(command *AutocompleteData)
AddCommand adds a subcommand to the autocomplete data.
func (*AutocompleteData) AddDynamicListArgument ¶
func (ad *AutocompleteData) AddDynamicListArgument(helpText, url string, required bool)
AddDynamicListArgument adds positional AutocompleteArgTypeDynamicList argument to the command.
func (*AutocompleteData) AddNamedDynamicListArgument ¶
func (ad *AutocompleteData) AddNamedDynamicListArgument(name, helpText, url string, required bool)
AddNamedDynamicListArgument adds named AutocompleteArgTypeDynamicList argument to the command.
func (*AutocompleteData) AddNamedStaticListArgument ¶
func (ad *AutocompleteData) AddNamedStaticListArgument(name, helpText string, required bool, items []AutocompleteListItem)
AddNamedStaticListArgument adds named AutocompleteArgTypeStaticList argument to the command.
func (*AutocompleteData) AddNamedTextArgument ¶
func (ad *AutocompleteData) AddNamedTextArgument(name, helpText, hint, pattern string, required bool)
AddNamedTextArgument adds named AutocompleteArgTypeText argument to the command.
func (*AutocompleteData) AddStaticListArgument ¶
func (ad *AutocompleteData) AddStaticListArgument(helpText string, required bool, items []AutocompleteListItem)
AddStaticListArgument adds positional AutocompleteArgTypeStaticList argument to the command.
func (*AutocompleteData) AddTextArgument ¶
func (ad *AutocompleteData) AddTextArgument(helpText, hint, pattern string)
AddTextArgument adds positional AutocompleteArgTypeText argument to the command.
func (*AutocompleteData) Equals ¶
func (ad *AutocompleteData) Equals(command *AutocompleteData) bool
Equals method checks if command is the same.
func (*AutocompleteData) IsValid ¶
func (ad *AutocompleteData) IsValid() error
IsValid method checks if autocomplete data is valid.
func (*AutocompleteData) UpdateRelativeURLsForPluginCommands ¶
func (ad *AutocompleteData) UpdateRelativeURLsForPluginCommands(baseURL *url.URL) error
UpdateRelativeURLsForPluginCommands method updates relative urls for plugin commands
type AutocompleteDynamicListArg ¶
type AutocompleteDynamicListArg struct {
FetchURL string
}
AutocompleteDynamicListArg is used when user wants to download possible argument list from the URL.
type AutocompleteListItem ¶
AutocompleteListItem describes an item in the AutocompleteStaticListArg.
type AutocompleteStaticListArg ¶
type AutocompleteStaticListArg struct {
PossibleArguments []AutocompleteListItem
}
AutocompleteStaticListArg is used to input one of the arguments from the list, for example [yes, no], [on, off], and so on.
type AutocompleteSuggestion ¶
type AutocompleteSuggestion struct { // Complete describes completed suggestion Complete string // Suggestion describes what user might want to input next Suggestion string // Hint describes a hint about the suggested input Hint string // Description of the command or a suggestion Description string // IconData is base64 encoded svg image IconData string }
AutocompleteSuggestion describes a single suggestion item sent to the front-end Example: for user input `/jira cre` - Complete might be `/jira create` Suggestion might be `create`, Hint might be `[issue text]`, Description might be `Create a new Issue`
type AutocompleteTextArg ¶
type AutocompleteTextArg struct { // Hint of the input text Hint string // Regex pattern to match Pattern string }
AutocompleteTextArg describes text user can input as an argument.
type BaseMarketplacePlugin ¶
type BaseMarketplacePlugin struct { HomepageURL string `json:"homepage_url"` IconData string `json:"icon_data"` DownloadURL string `json:"download_url"` ReleaseNotesURL string `json:"release_notes_url"` Labels []MarketplaceLabel `json:"labels,omitempty"` Hosting string `json:"hosting"` // Indicated if the plugin is limited to a certain hosting type AuthorType string `json:"author_type"` // The maintainer of the plugin ReleaseStage string `json:"release_stage"` // The stage in the software release cycle that the plugin is in Enterprise bool `json:"enterprise"` // Indicated if the plugin is an enterprise plugin Signature string `json:"signature"` // Signature represents a signature of a plugin saved in base64 encoding. Manifest *Manifest `json:"manifest"` }
BaseMarketplacePlugin is a Mattermost plugin received from the Marketplace server.
func BaseMarketplacePluginsFromReader ¶
func BaseMarketplacePluginsFromReader(reader io.Reader) ([]*BaseMarketplacePlugin, error)
BaseMarketplacePluginsFromReader decodes a json-encoded list of plugins from the given io.Reader.
func (*BaseMarketplacePlugin) DecodeSignature ¶
func (plugin *BaseMarketplacePlugin) DecodeSignature() (io.ReadSeeker, error)
DecodeSignature Decodes signature and returns ReadSeeker.
type BillingScheme ¶
type BillingScheme string
type BleveSettings ¶
type BleveSettings struct { IndexDir *string `access:"experimental_bleve"` // telemetry: none EnableIndexing *bool `access:"experimental_bleve"` EnableSearching *bool `access:"experimental_bleve"` EnableAutocomplete *bool `access:"experimental_bleve"` BulkIndexingTimeWindowSeconds *int `access:"experimental_bleve"` }
func (*BleveSettings) SetDefaults ¶
func (bs *BleveSettings) SetDefaults()
type Bot ¶
type Bot struct { UserId string `json:"user_id"` Username string `json:"username"` DisplayName string `json:"display_name,omitempty"` Description string `json:"description,omitempty"` OwnerId string `json:"owner_id"` LastIconUpdate int64 `json:"last_icon_update,omitempty"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` }
Bot is a special type of User meant for programmatic interactions. Note that the primary key of a bot is the UserId, and matches the primary key of the corresponding user.
func BotFromUser ¶
BotFromUser returns a bot model given a user model
func (*Bot) IsValid ¶
IsValid validates the bot and returns an error if it isn't configured correctly.
func (*Bot) IsValidCreate ¶ added in v6.1.0
IsValidCreate validates bot for Create call. This skips validations of fields that are auto-filled on Create
func (*Bot) Patch ¶
Patch modifies an existing bot with optional fields from the given patch. TODO 6.0: consider returning a boolean to indicate whether or not the patch applied any changes.
func (*Bot) PreSave ¶
func (b *Bot) PreSave()
PreSave should be run before saving a new bot to the database.
func (*Bot) PreUpdate ¶
func (b *Bot) PreUpdate()
PreUpdate should be run before saving an updated bot to the database.
func (*Bot) Trace ¶
Trace describes the minimum information required to identify a bot for the purpose of logging.
func (*Bot) WouldPatch ¶
WouldPatch returns whether or not the given patch would be applied or not.
type BotGetOptions ¶
type BotGetOptions struct { OwnerId string IncludeDeleted bool OnlyOrphaned bool Page int PerPage int }
BotGetOptions acts as a filter on bulk bot fetching queries.
type BotPatch ¶
type BotPatch struct { Username *string `json:"username"` DisplayName *string `json:"display_name"` Description *string `json:"description"` }
BotPatch is a description of what fields to update on an existing bot.
type BundleInfo ¶
func BundleInfoForPath ¶
func BundleInfoForPath(path string) *BundleInfo
Returns bundle info for the given path. The return value is never nil.
func (*BundleInfo) WrapLogger ¶
func (b *BundleInfo) WrapLogger(logger *mlog.Logger) *mlog.Logger
type CWSWebhookPayload ¶
type CWSWebhookPayload struct { Event string `json:"event"` FailedPayment *FailedPayment `json:"failed_payment"` CloudWorkspaceOwner *CloudWorkspaceOwner `json:"cloud_workspace_owner"` SubscriptionTrialEndUnixTimeStamp int64 `json:"trial_end_time_stamp"` }
type Channel ¶
type Channel struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` TeamId string `json:"team_id"` Type ChannelType `json:"type"` DisplayName string `json:"display_name"` Name string `json:"name"` Header string `json:"header"` Purpose string `json:"purpose"` LastPostAt int64 `json:"last_post_at"` TotalMsgCount int64 `json:"total_msg_count"` ExtraUpdateAt int64 `json:"extra_update_at"` CreatorId string `json:"creator_id"` SchemeId *string `json:"scheme_id"` Props map[string]interface{} `json:"props" db:"-"` GroupConstrained *bool `json:"group_constrained"` TotalMsgCountRoot int64 `json:"total_msg_count_root"` PolicyID *string `json:"policy_id" db:"-"` LastRootPostAt int64 `json:"last_root_post_at"` }
func (*Channel) GetOtherUserIdForDM ¶
func (*Channel) IsGroupConstrained ¶
func (*Channel) IsGroupOrDirect ¶
func (*Channel) MakeNonNil ¶
func (o *Channel) MakeNonNil()
func (*Channel) Patch ¶
func (o *Channel) Patch(patch *ChannelPatch)
type ChannelCounts ¶
type ChannelCounts struct { Counts map[string]int64 `json:"counts"` CountsRoot map[string]int64 `json:"counts_root"` UpdateTimes map[string]int64 `json:"update_times"` }
func (*ChannelCounts) Etag ¶
func (o *ChannelCounts) Etag() string
type ChannelData ¶
type ChannelData struct { Channel *Channel `json:"channel"` Member *ChannelMember `json:"member"` }
func (*ChannelData) Etag ¶
func (o *ChannelData) Etag() string
type ChannelForExport ¶
type ChannelList ¶
type ChannelList []*Channel
func (*ChannelList) Etag ¶
func (o *ChannelList) Etag() string
type ChannelListWithTeamData ¶
type ChannelListWithTeamData []*ChannelWithTeamData
func (*ChannelListWithTeamData) Etag ¶
func (o *ChannelListWithTeamData) Etag() string
type ChannelMember ¶
type ChannelMember struct { ChannelId string `json:"channel_id"` UserId string `json:"user_id"` Roles string `json:"roles"` LastViewedAt int64 `json:"last_viewed_at"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` MentionCountRoot int64 `json:"mention_count_root"` MsgCountRoot int64 `json:"msg_count_root"` NotifyProps StringMap `json:"notify_props"` LastUpdateAt int64 `json:"last_update_at"` SchemeGuest bool `json:"scheme_guest"` SchemeUser bool `json:"scheme_user"` SchemeAdmin bool `json:"scheme_admin"` ExplicitRoles string `json:"explicit_roles"` }
func (*ChannelMember) GetRoles ¶
func (o *ChannelMember) GetRoles() []string
func (*ChannelMember) IsChannelMuted ¶
func (o *ChannelMember) IsChannelMuted() bool
func (*ChannelMember) IsValid ¶
func (o *ChannelMember) IsValid() *AppError
func (*ChannelMember) PreSave ¶
func (o *ChannelMember) PreSave()
func (*ChannelMember) PreUpdate ¶
func (o *ChannelMember) PreUpdate()
func (*ChannelMember) SetChannelMuted ¶
func (o *ChannelMember) SetChannelMuted(muted bool)
type ChannelMemberForExport ¶
type ChannelMemberForExport struct { ChannelMember ChannelName string Username string }
type ChannelMemberHistory ¶
type ChannelMemberWithTeamData ¶ added in v6.2.0
type ChannelMemberWithTeamData struct { ChannelMember TeamDisplayName string `json:"team_display_name"` TeamName string `json:"team_name"` TeamUpdateAt int64 `json:"team_update_at"` }
ChannelMemberWithTeamData contains ChannelMember appended with extra team information as well.
type ChannelMembers ¶
type ChannelMembers []ChannelMember
type ChannelMembersWithTeamData ¶ added in v6.2.0
type ChannelMembersWithTeamData []ChannelMemberWithTeamData
type ChannelMentionMap ¶
func ChannelMentionMapFromURLValues ¶
func ChannelMentionMapFromURLValues(values url.Values) (ChannelMentionMap, error)
func (ChannelMentionMap) ToURLValues ¶
func (m ChannelMentionMap) ToURLValues() url.Values
type ChannelModeratedRole ¶
type ChannelModeratedRoles ¶
type ChannelModeratedRoles struct { Guests *ChannelModeratedRole `json:"guests"` Members *ChannelModeratedRole `json:"members"` }
type ChannelModeration ¶
type ChannelModeration struct { Name string `json:"name"` Roles *ChannelModeratedRoles `json:"roles"` }
type ChannelModerationPatch ¶
type ChannelModerationPatch struct { Name *string `json:"name"` Roles *ChannelModeratedRolesPatch `json:"roles"` }
type ChannelOption ¶
type ChannelOption func(channel *Channel)
func WithID ¶
func WithID(ID string) ChannelOption
type ChannelPatch ¶
type ChannelSearch ¶
type ChannelSearch struct { Term string `json:"term"` ExcludeDefaultChannels bool `json:"exclude_default_channels"` NotAssociatedToGroup string `json:"not_associated_to_group"` TeamIds []string `json:"team_ids"` GroupConstrained bool `json:"group_constrained"` ExcludeGroupConstrained bool `json:"exclude_group_constrained"` ExcludePolicyConstrained bool `json:"exclude_policy_constrained"` Public bool `json:"public"` Private bool `json:"private"` IncludeDeleted bool `json:"include_deleted"` Deleted bool `json:"deleted"` Page *int `json:"page,omitempty"` PerPage *int `json:"per_page,omitempty"` }
type ChannelSearchOpts ¶
type ChannelSearchOpts struct { NotAssociatedToGroup string ExcludeDefaultChannels bool IncludeDeleted bool Deleted bool ExcludeChannelNames []string TeamIds []string GroupConstrained bool ExcludeGroupConstrained bool PolicyID string ExcludePolicyConstrained bool IncludePolicyID bool Public bool Private bool Page *int PerPage *int }
ChannelSearchOpts contains options for searching channels.
NotAssociatedToGroup will exclude channels that have associated, active GroupChannels records. ExcludeDefaultChannels will exclude the configured default channels (ex 'town-square' and 'off-topic'). IncludeDeleted will include channel records where DeleteAt != 0. ExcludeChannelNames will exclude channels 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 ChannelStats ¶
type ChannelType ¶
type ChannelType string
type ChannelUnread ¶
type ChannelUnread struct { TeamId string `json:"team_id"` ChannelId string `json:"channel_id"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` MentionCountRoot int64 `json:"mention_count_root"` MsgCountRoot int64 `json:"msg_count_root"` NotifyProps StringMap `json:"-"` }
type ChannelUnreadAt ¶
type ChannelUnreadAt struct { TeamId string `json:"team_id"` UserId string `json:"user_id"` ChannelId string `json:"channel_id"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` MentionCountRoot int64 `json:"mention_count_root"` MsgCountRoot int64 `json:"msg_count_root"` LastViewedAt int64 `json:"last_viewed_at"` NotifyProps StringMap `json:"-"` }
type ChannelView ¶
type ChannelViewResponse ¶
type ChannelWithTeamData ¶
type ChannelsWithCount ¶
type ChannelsWithCount struct { Channels ChannelListWithTeamData `json:"channels"` TotalCount int64 `json:"total_count"` }
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 // contains filtered or unexported fields }
func NewAPIv4Client ¶
func NewAPIv4SocketClient ¶
func (*Client4) AddChannelMember ¶
func (c *Client4) AddChannelMember(channelId, userId string) (*ChannelMember, *Response, error)
AddChannelMember adds user to channel and return a channel member.
func (*Client4) AddChannelMemberWithRootId ¶
func (c *Client4) AddChannelMemberWithRootId(channelId, userId, postRootId string) (*ChannelMember, *Response, error)
AddChannelMemberWithRootId adds user to channel and return a channel member. Post add to channel message has the postRootId.
func (*Client4) AddChannelsToRetentionPolicy ¶
func (c *Client4) AddChannelsToRetentionPolicy(policyID string, channelIDs []string) (*Response, error)
AddChannelsToRetentionPolicy will add the specified channels to the granular data retention policy with the specified ID.
func (*Client4) AddTeamMember ¶
func (c *Client4) AddTeamMember(teamId, userId string) (*TeamMember, *Response, error)
AddTeamMember adds user to a team and return a team member.
func (*Client4) AddTeamMemberFromInvite ¶
func (c *Client4) AddTeamMemberFromInvite(token, inviteId string) (*TeamMember, *Response, error)
AddTeamMemberFromInvite adds a user to a team and return a team member using an invite id or an invite token/data pair.
func (*Client4) AddTeamMembers ¶
AddTeamMembers adds a number of users to a team and returns the team members.
func (*Client4) AddTeamMembersGracefully ¶
func (c *Client4) AddTeamMembersGracefully(teamId string, userIds []string) ([]*TeamMemberWithError, *Response, error)
AddTeamMembers adds a number of users to a team and returns the team members.
func (*Client4) AddTeamsToRetentionPolicy ¶
AddTeamsToRetentionPolicy will add the specified teams to the granular data retention policy with the specified ID.
func (*Client4) AttachDeviceId ¶
AttachDeviceId attaches a mobile device ID to the current session.
func (*Client4) AuthorizeOAuthApp ¶
func (c *Client4) AuthorizeOAuthApp(authRequest *AuthorizeRequest) (string, *Response, error)
AuthorizeOAuthApp will authorize an OAuth 2.0 client application to access a user's account and provide a redirect link to follow.
func (*Client4) AutocompleteChannelsForTeam ¶
func (c *Client4) AutocompleteChannelsForTeam(teamId, name string) (ChannelList, *Response, error)
AutocompleteChannelsForTeam will return an ordered list of channels autocomplete suggestions.
func (*Client4) AutocompleteChannelsForTeamForSearch ¶
func (c *Client4) AutocompleteChannelsForTeamForSearch(teamId, name string) (ChannelList, *Response, error)
AutocompleteChannelsForTeamForSearch will return an ordered list of your channels autocomplete suggestions.
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, error)
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, error)
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, error)
AutocompleteUsersInTeam returns the users on a team based on search term.
func (*Client4) ChannelMembersMinusGroupMembers ¶
func (*Client4) CheckIntegrity ¶
func (c *Client4) CheckIntegrity() ([]IntegrityCheckResult, *Response, error)
CheckIntegrity performs a database integrity check.
func (*Client4) ClearOAuthToken ¶
func (c *Client4) ClearOAuthToken()
func (*Client4) ClearServerBusy ¶
ClearServerBusy will mark the server as not busy.
func (*Client4) ConfirmCustomerPayment ¶
func (c *Client4) ConfirmCustomerPayment(confirmRequest *ConfirmPaymentMethodRequest) (*Response, error)
func (*Client4) ConvertBotToUser ¶
func (c *Client4) ConvertBotToUser(userId string, userPatch *UserPatch, setSystemAdmin bool) (*User, *Response, error)
ConvertBotToUser converts a bot user to a user.
func (*Client4) ConvertUserToBot ¶
ConvertUserToBot converts a user to a bot user.
func (*Client4) CreateChannel ¶
CreateChannel creates a channel based on the provided channel struct.
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, error)
CreateComplianceReport creates an incoming webhook for a channel.
func (*Client4) CreateCustomerPayment ¶
func (c *Client4) CreateCustomerPayment() (*StripeSetupIntent, *Response, error)
func (*Client4) CreateDataRetentionPolicy ¶
func (c *Client4) CreateDataRetentionPolicy(policy *RetentionPolicyWithTeamAndChannelIDs) (*RetentionPolicyWithTeamAndChannelCounts, *Response, error)
CreateDataRetentionPolicy will create a new granular data retention policy which will be applied to the specified teams and channels. The Id field of `policy` must be empty.
func (*Client4) CreateDirectChannel ¶
CreateDirectChannel creates a direct message channel based on the two user ids provided.
func (*Client4) CreateEmoji ¶
func (c *Client4) CreateEmoji(emoji *Emoji, image []byte, filename string) (*Emoji, *Response, error)
CreateEmoji will save an emoji to the server if the current user has permission to do so. If successful, the provided emoji will be returned with its Id field filled in. Otherwise, an error will be returned.
func (*Client4) CreateGroupChannel ¶
CreateGroupChannel creates a group message channel based on userIds provided.
func (*Client4) CreateIncomingWebhook ¶
func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response, error)
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, error)
CreateOutgoingWebhook creates an outgoing webhook for a team or channel.
func (*Client4) CreatePost ¶
CreatePost creates a post based on the provided post struct.
func (*Client4) CreatePostEphemeral ¶
func (c *Client4) CreatePostEphemeral(post *PostEphemeral) (*Post, *Response, error)
CreatePostEphemeral creates a ephemeral post based on the provided post struct which is send to the given user id.
func (*Client4) CreateScheme ¶
CreateScheme creates a new Scheme.
func (*Client4) CreateSidebarCategoryForTeamForUser ¶
func (c *Client4) CreateSidebarCategoryForTeamForUser(userID, teamID string, category *SidebarCategoryWithChannels) (*SidebarCategoryWithChannels, *Response, error)
func (*Client4) CreateTeam ¶
CreateTeam creates a team in the system based on the provided team struct.
func (*Client4) CreateTermsOfService ¶
func (c *Client4) CreateTermsOfService(text, userId string) (*TermsOfService, *Response, error)
CreateTermsOfService creates new terms of service.
func (*Client4) CreateUpload ¶
func (c *Client4) CreateUpload(us *UploadSession) (*UploadSession, *Response, error)
CreateUpload creates a new upload session.
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, error)
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) DeleteChannel ¶
DeleteChannel deletes channel based on the provided channel id string.
func (*Client4) DeleteCommand ¶
DeleteCommand deletes a command based on the provided command id string.
func (*Client4) DeleteDataRetentionPolicy ¶
DeleteDataRetentionPolicy will delete the granular data retention policy with the specified ID.
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) DeleteLdapPrivateCertificate ¶
DeleteLDAPPrivateCertificate deletes the LDAP IDP certificate from the server and updates the config to not use it and disable LDAP.
func (*Client4) DeleteLdapPublicCertificate ¶
DeleteLdapPublicCertificate deletes the LDAP IDP certificate from the server and updates the config to not use it and disable LDAP.
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) DeletePost ¶
DeletePost deletes a post from the provided post id string.
func (*Client4) DeletePreferences ¶
func (c *Client4) DeletePreferences(userId string, preferences Preferences) (*Response, error)
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) DisableBot ¶
DisableBot disables the given bot in the system.
func (*Client4) DisablePlugin ¶
DisablePlugin will disable an enabled plugin.
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) DoAPIDeleteBytes ¶
func (*Client4) DoAPIPatchBytes ¶
func (*Client4) DoAPIPostBytes ¶
func (*Client4) DoAPIPutBytes ¶
func (*Client4) DoAPIRequest ¶
func (*Client4) DoAPIRequestBytes ¶
func (*Client4) DoAPIRequestReader ¶
func (*Client4) DoAPIRequestWithHeaders ¶
func (*Client4) DoEmojiUploadFile ¶
func (*Client4) DoPostAction ¶
DoPostAction performs a post action.
func (*Client4) DoPostActionWithCookie ¶
func (c *Client4) DoPostActionWithCookie(postId, actionId, selected, cookieStr string) (*Response, error)
DoPostActionWithCookie performs a post action with extra arguments
func (*Client4) DoUploadFile ¶
func (*Client4) DoUploadImportTeam ¶
func (*Client4) DownloadComplianceReport ¶
DownloadComplianceReport returns a full compliance report as a file.
func (*Client4) DownloadExport ¶
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) DownloadJob ¶
DownloadJob downloads the results of the job
func (*Client4) EnablePlugin ¶
EnablePlugin will enable an plugin installed.
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) ExecuteCommand ¶
func (c *Client4) ExecuteCommand(channelId, command string) (*CommandResponse, *Response, error)
ExecuteCommand executes a given slash command.
func (*Client4) ExecuteCommandWithTeam ¶
func (c *Client4) ExecuteCommandWithTeam(channelId, teamId, command string) (*CommandResponse, *Response, error)
ExecuteCommandWithTeam executes a given slash command against the specified team. Use this when executing slash commands in a DM/GM, since the team id cannot be inferred in that case.
func (*Client4) GenerateMfaSecret ¶
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) GenerateSupportPacket ¶
GenerateSupportPacket downloads the generated support packet
func (*Client4) GetActiveUsersInTeam ¶
func (c *Client4) GetActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
GetActiveUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetAllChannels ¶
func (c *Client4) GetAllChannels(page int, perPage int, etag string) (ChannelListWithTeamData, *Response, error)
GetAllChannels get all the channels. Must be a system administrator.
func (*Client4) GetAllChannelsExcludePolicyConstrained ¶
func (c *Client4) GetAllChannelsExcludePolicyConstrained(page, perPage int, etag string) (ChannelListWithTeamData, *Response, error)
GetAllChannelsExcludePolicyConstrained gets all channels which are not part of a data retention policy. Must be a system administrator.
func (*Client4) GetAllChannelsIncludeDeleted ¶
func (c *Client4) GetAllChannelsIncludeDeleted(page int, perPage int, etag string) (ChannelListWithTeamData, *Response, error)
GetAllChannelsIncludeDeleted get all the channels. Must be a system administrator.
func (*Client4) GetAllChannelsWithCount ¶
func (c *Client4) GetAllChannelsWithCount(page int, perPage int, etag string) (ChannelListWithTeamData, int64, *Response, error)
GetAllChannelsWithCount get all the channels including the total count. Must be a system administrator.
func (*Client4) GetAllRoles ¶ added in v6.2.0
GetAllRoles returns a list of all the roles.
func (*Client4) GetAllSharedChannels ¶
func (*Client4) GetAllTeams ¶
GetAllTeams returns all teams based on permissions.
func (*Client4) GetAllTeamsExcludePolicyConstrained ¶
func (c *Client4) GetAllTeamsExcludePolicyConstrained(etag string, page int, perPage int) ([]*Team, *Response, error)
GetAllTeamsExcludePolicyConstrained returns all teams which are not part of a data retention policy. Must be a system administrator.
func (*Client4) GetAllTeamsWithTotalCount ¶
func (c *Client4) GetAllTeamsWithTotalCount(etag string, page int, perPage int) ([]*Team, int64, *Response, error)
GetAllTeamsWithTotalCount returns all teams based on permissions.
func (*Client4) GetAnalyticsOld ¶
func (c *Client4) GetAnalyticsOld(name, teamId string) (AnalyticsRows, *Response, error)
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) GetAncillaryPermissions ¶
func (*Client4) GetAuthorizedOAuthAppsForUser ¶
func (c *Client4) GetAuthorizedOAuthAppsForUser(userId string, page, perPage int) ([]*OAuthApp, *Response, error)
GetAuthorizedOAuthAppsForUser gets a page of OAuth 2.0 client applications the user has authorized to use access their account.
func (*Client4) GetBotIncludeDeleted ¶
GetBotIncludeDeleted fetches the given bot, even if it is deleted.
func (*Client4) GetBotsIncludeDeleted ¶
GetBotsIncludeDeleted fetches the given page of bots, including deleted.
func (*Client4) GetBotsOrphaned ¶
GetBotsOrphaned fetches the given page of bots, only including orphaned bots.
func (*Client4) GetBrandImage ¶
GetBrandImage retrieves the previously uploaded brand image.
func (*Client4) GetBulkReactions ¶
FetchBulkReactions returns a map of postIds and corresponding reactions
func (*Client4) GetChannel ¶
GetChannel returns a channel based on the provided channel id string.
func (*Client4) GetChannelByName ¶
func (c *Client4) GetChannelByName(channelName, teamId string, etag string) (*Channel, *Response, error)
GetChannelByName returns a channel based on the provided channel name and team id strings.
func (*Client4) GetChannelByNameForTeamName ¶
func (c *Client4) GetChannelByNameForTeamName(channelName, teamName string, etag string) (*Channel, *Response, error)
GetChannelByNameForTeamName returns a channel based on the provided channel name and team name strings.
func (*Client4) GetChannelByNameForTeamNameIncludeDeleted ¶
func (c *Client4) GetChannelByNameForTeamNameIncludeDeleted(channelName, teamName string, etag string) (*Channel, *Response, error)
GetChannelByNameForTeamNameIncludeDeleted returns a channel based on the provided channel name and team name strings. Other then GetChannelByNameForTeamName it will also return deleted channels.
func (*Client4) GetChannelByNameIncludeDeleted ¶
func (c *Client4) GetChannelByNameIncludeDeleted(channelName, teamId string, etag string) (*Channel, *Response, error)
GetChannelByNameIncludeDeleted returns a channel based on the provided channel name and team id strings. Other then GetChannelByName it will also return deleted channels.
func (*Client4) GetChannelMember ¶
func (c *Client4) GetChannelMember(channelId, userId, etag string) (*ChannelMember, *Response, error)
GetChannelMember gets a channel member.
func (*Client4) GetChannelMemberCountsByGroup ¶
func (*Client4) GetChannelMembers ¶
func (c *Client4) GetChannelMembers(channelId string, page, perPage int, etag string) (ChannelMembers, *Response, error)
GetChannelMembers gets a page of channel members specific to a channel.
func (*Client4) GetChannelMembersByIds ¶
func (c *Client4) GetChannelMembersByIds(channelId string, userIds []string) (ChannelMembers, *Response, error)
GetChannelMembersByIds gets the channel members in a channel for a list of user ids.
func (*Client4) GetChannelMembersForUser ¶
func (c *Client4) GetChannelMembersForUser(userId, teamId, etag string) (ChannelMembers, *Response, error)
GetChannelMembersForUser gets all the channel members for a user on a team.
func (*Client4) GetChannelMembersTimezones ¶
GetChannelMembersTimezones gets a list of timezones for a channel.
func (*Client4) GetChannelMembersWithTeamData ¶ added in v6.2.0
func (c *Client4) GetChannelMembersWithTeamData(userID string, page, perPage int) (ChannelMembersWithTeamData, *Response, error)
GetChannelMembersWithTeamData gets a page of all channel members for a user.
func (*Client4) GetChannelModerations ¶
func (*Client4) GetChannelPoliciesForUser ¶
func (c *Client4) GetChannelPoliciesForUser(userID string, offset, limit int) (*RetentionPolicyForChannelList, *Response, error)
GetChannelPoliciesForUser will get the data retention policies for the channels to which a user belongs.
func (*Client4) GetChannelStats ¶
GetChannelStats returns statistics for a channel.
func (*Client4) GetChannelUnread ¶
func (c *Client4) GetChannelUnread(channelId, userId string) (*ChannelUnread, *Response, error)
GetChannelUnread will return a ChannelUnread object that contains the number of unread messages and mentions for a user.
func (*Client4) GetChannelsForRetentionPolicy ¶
func (c *Client4) GetChannelsForRetentionPolicy(policyID string, page, perPage int) (*ChannelsWithCount, *Response, error)
GetChannelsForRetentionPolicy will get the channels to which the specified policy is currently applied.
func (*Client4) GetChannelsForScheme ¶
func (c *Client4) GetChannelsForScheme(schemeId string, page int, perPage int) (ChannelList, *Response, error)
GetChannelsForScheme gets the channels using this scheme, sorted alphabetically by display name.
func (*Client4) GetChannelsForTeamAndUserWithLastDeleteAt ¶
func (c *Client4) GetChannelsForTeamAndUserWithLastDeleteAt(teamId, userId string, includeDeleted bool, lastDeleteAt int, etag string) ([]*Channel, *Response, error)
GetChannelsForTeamAndUserWithLastDeleteAt returns a list channels of a team for a user, additionally filtered with lastDeleteAt. This does not have any effect if includeDeleted is set to false.
func (*Client4) GetChannelsForTeamForUser ¶
func (c *Client4) GetChannelsForTeamForUser(teamId, userId string, includeDeleted bool, etag string) ([]*Channel, *Response, error)
GetChannelsForTeamForUser returns a list channels of on a team for a user.
func (*Client4) GetChannelsForUserWithLastDeleteAt ¶ added in v6.2.0
func (c *Client4) GetChannelsForUserWithLastDeleteAt(userID string, lastDeleteAt int) ([]*Channel, *Response, error)
GetChannelsForUserWithLastDeleteAt returns a list channels for a user, additionally filtered with lastDeleteAt.
func (*Client4) GetCloudCustomer ¶
func (c *Client4) GetCloudCustomer() (*CloudCustomer, *Response, error)
func (*Client4) GetCloudProducts ¶
func (*Client4) GetClusterStatus ¶
func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response, error)
GetClusterStatus returns the status of all the configured cluster nodes.
func (*Client4) GetCommandById ¶
GetCommandById will retrieve a command by id.
func (*Client4) GetComplianceReport ¶
func (c *Client4) GetComplianceReport(reportId string) (*Compliance, *Response, error)
GetComplianceReport returns a compliance report.
func (*Client4) GetComplianceReports ¶
func (c *Client4) GetComplianceReports(page, perPage int) (Compliances, *Response, error)
GetComplianceReports returns list of compliance reports.
func (*Client4) GetDataRetentionPolicies ¶
func (c *Client4) GetDataRetentionPolicies(page, perPage int) (*RetentionPolicyWithTeamAndChannelCountsList, *Response, error)
GetDataRetentionPolicies will get the current granular data retention policies' details.
func (*Client4) GetDataRetentionPoliciesCount ¶
GetDataRetentionPoliciesCount will get the total number of granular data retention policies.
func (*Client4) GetDataRetentionPolicy ¶
func (c *Client4) GetDataRetentionPolicy() (*GlobalRetentionPolicy, *Response, error)
GetDataRetentionPolicy will get the current global data retention policy details.
func (*Client4) GetDataRetentionPolicyByID ¶
func (c *Client4) GetDataRetentionPolicyByID(policyID string) (*RetentionPolicyWithTeamAndChannelCounts, *Response, error)
GetDataRetentionPolicyByID will get the details for the granular data retention policy with the specified ID.
func (*Client4) GetDefaultProfileImage ¶
GetDefaultProfileImage gets the default user's profile image. Must be logged in.
func (*Client4) GetDeletedChannelsForTeam ¶
func (c *Client4) GetDeletedChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response, error)
GetDeletedChannelsForTeam returns a list of public channels based on the provided team id string.
func (*Client4) GetEmojiByName ¶
GetEmojiByName returns a custom emoji based on the name string.
func (*Client4) GetEmojiImage ¶
GetEmojiImage returns the emoji image.
func (*Client4) GetEmojiList ¶
GetEmojiList returns a page of custom emoji on the system.
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) GetFileThumbnail ¶
GetFileThumbnail gets the bytes for a file by id.
func (*Client4) GetFlaggedPostsForUser ¶
func (c *Client4) GetFlaggedPostsForUser(userId string, page int, perPage int) (*PostList, *Response, error)
GetFlaggedPostsForUser returns flagged posts of a user based on user id string.
func (*Client4) GetFlaggedPostsForUserInChannel ¶
func (c *Client4) GetFlaggedPostsForUserInChannel(userId string, channelId string, page int, perPage int) (*PostList, *Response, error)
GetFlaggedPostsForUserInChannel returns flagged posts in channel of a user based on user id string.
func (*Client4) GetFlaggedPostsForUserInTeam ¶
func (c *Client4) GetFlaggedPostsForUserInTeam(userId string, teamId string, page int, perPage int) (*PostList, *Response, error)
GetFlaggedPostsForUserInTeam returns flagged posts in team of a user based on user id string.
func (*Client4) GetGroupStats ¶
func (c *Client4) GetGroupStats(groupID string) (*GroupStats, *Response, error)
GetGroupStats retrieves stats for a Mattermost Group
func (*Client4) GetGroupSyncable ¶
func (c *Client4) GetGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, etag string) (*GroupSyncable, *Response, error)
func (*Client4) GetGroupSyncables ¶
func (c *Client4) GetGroupSyncables(groupID string, syncableType GroupSyncableType, etag string) ([]*GroupSyncable, *Response, error)
func (*Client4) GetGroups ¶
func (c *Client4) GetGroups(opts GroupSearchOpts) ([]*Group, *Response, error)
GetGroups retrieves Mattermost Groups
func (*Client4) GetGroupsAssociatedToChannelsByTeam ¶
func (c *Client4) GetGroupsAssociatedToChannelsByTeam(teamId string, opts GroupSearchOpts) (map[string][]*GroupWithSchemeAdmin, *Response, error)
GetGroupsAssociatedToChannelsByTeam retrieves the Mattermost Groups associated with channels in a given team
func (*Client4) GetGroupsByChannel ¶
func (c *Client4) GetGroupsByChannel(channelId string, opts GroupSearchOpts) ([]*GroupWithSchemeAdmin, int, *Response, error)
GetGroupsByChannel retrieves the Mattermost Groups associated with a given channel
func (*Client4) GetGroupsByTeam ¶
func (c *Client4) GetGroupsByTeam(teamId string, opts GroupSearchOpts) ([]*GroupWithSchemeAdmin, int, *Response, error)
GetGroupsByTeam retrieves the Mattermost Groups associated with a given team
func (*Client4) GetGroupsByUserId ¶
GetGroupsByUserId retrieves Mattermost Groups for a user
func (*Client4) GetIncomingWebhook ¶
func (c *Client4) GetIncomingWebhook(hookID string, etag string) (*IncomingWebhook, *Response, error)
GetIncomingWebhook returns an Incoming webhook given the hook ID.
func (*Client4) GetIncomingWebhooks ¶
func (c *Client4) GetIncomingWebhooks(page int, perPage int, etag string) ([]*IncomingWebhook, *Response, error)
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, error)
GetIncomingWebhooksForTeam returns a page of incoming webhooks for a team. Page counting starts at 0.
func (*Client4) GetInvoicesForSubscription ¶
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) GetLdapGroups ¶
GetLdapGroups retrieves the immediate child groups of the given parent group.
func (*Client4) GetMarketplacePlugins ¶
func (c *Client4) GetMarketplacePlugins(filter *MarketplacePluginFilter) ([]*MarketplacePlugin, *Response, error)
GetMarketplacePlugins will return a list of plugins that an admin can install.
func (*Client4) GetNewUsersInTeam ¶
func (c *Client4) GetNewUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
GetNewUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetNotices ¶
func (c *Client4) GetNotices(lastViewed int64, teamId string, client NoticeClientType, clientVersion, locale, etag string) (NoticeMessages, *Response, error)
func (*Client4) GetOAuthAccessToken ¶
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) GetOAuthApps ¶
GetOAuthApps gets a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0 service provider.
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) GetOutgoingWebhook ¶
func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response, error)
GetOutgoingWebhook outgoing webhooks on the system requested by Hook Id.
func (*Client4) GetOutgoingWebhooks ¶
func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*OutgoingWebhook, *Response, error)
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, error)
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, error)
GetOutgoingWebhooksForTeam returns a page of outgoing webhooks for a team. Page counting starts at 0.
func (*Client4) GetPing ¶
GetPing will return ok if the running goRoutines are below the threshold and unhealthy for above.
func (*Client4) GetPingWithFullServerStatus ¶
GetPingWithFullServerStatus will return the full status if several basic server health checks all pass successfully.
func (*Client4) GetPingWithServerStatus ¶
GetPingWithServerStatus will return ok if several basic server health checks all pass successfully.
func (*Client4) GetPinnedPosts ¶
GetPinnedPosts gets a list of pinned posts.
func (*Client4) GetPluginStatuses ¶
func (c *Client4) GetPluginStatuses() (PluginStatuses, *Response, error)
GetPluginStatuses will return the plugins installed on any server in the cluster, for reporting to the administrator via the system console.
func (*Client4) GetPlugins ¶
func (c *Client4) GetPlugins() (*PluginsResponse, *Response, error)
GetPlugins will return a list of plugin manifests for currently active plugins.
func (*Client4) GetPostThread ¶
func (c *Client4) GetPostThread(postId string, etag string, collapsedThreads bool) (*PostList, *Response, error)
GetPostThread gets a post with all the other posts in the same thread.
func (*Client4) GetPostsAfter ¶
func (c *Client4) GetPostsAfter(channelId, postId string, page, perPage int, etag string, collapsedThreads bool) (*PostList, *Response, error)
GetPostsAfter gets a page of posts that were posted after the post provided.
func (*Client4) GetPostsAroundLastUnread ¶
func (c *Client4) GetPostsAroundLastUnread(userId, channelId string, limitBefore, limitAfter int, collapsedThreads bool) (*PostList, *Response, error)
GetPostsAroundLastUnread gets a list of posts around last unread post by a user in a channel.
func (*Client4) GetPostsBefore ¶
func (c *Client4) GetPostsBefore(channelId, postId string, page, perPage int, etag string, collapsedThreads bool) (*PostList, *Response, error)
GetPostsBefore gets a page of posts that were posted before the post provided.
func (*Client4) GetPostsByIds ¶ added in v6.2.0
GetPostsByIds gets a list of posts by taking an array of post ids
func (*Client4) GetPostsForChannel ¶
func (c *Client4) GetPostsForChannel(channelId string, page, perPage int, etag string, collapsedThreads bool) (*PostList, *Response, error)
GetPostsForChannel gets a page of posts with an array for ordering for a channel.
func (*Client4) GetPostsSince ¶
func (c *Client4) GetPostsSince(channelId string, time int64, collapsedThreads bool) (*PostList, *Response, error)
GetPostsSince gets posts created after a specified time as Unix time in milliseconds.
func (*Client4) GetPreferenceByCategoryAndName ¶
func (c *Client4) GetPreferenceByCategoryAndName(userId string, category string, preferenceName string) (*Preference, *Response, error)
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, error)
GetPreferences returns the user's preferences.
func (*Client4) GetPreferencesByCategory ¶
func (c *Client4) GetPreferencesByCategory(userId string, category string) (Preferences, *Response, error)
GetPreferencesByCategory returns the user's preferences from the provided category string.
func (*Client4) GetPrivateChannelsForTeam ¶
func (c *Client4) GetPrivateChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response, error)
GetPrivateChannelsForTeam returns a list of private channels based on the provided team id string.
func (*Client4) GetProfileImage ¶
GetProfileImage gets user's profile image. Must be logged in.
func (*Client4) GetPublicChannelsByIdsForTeam ¶
func (c *Client4) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) ([]*Channel, *Response, error)
GetPublicChannelsByIdsForTeam returns a list of public channels based on provided team id string.
func (*Client4) GetPublicChannelsForTeam ¶
func (c *Client4) GetPublicChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response, error)
GetPublicChannelsForTeam returns a list of public channels based on the provided team id string.
func (*Client4) GetReactions ¶
GetReactions returns a list of reactions to a post.
func (*Client4) GetRecentlyActiveUsersInTeam ¶
func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
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) GetRemoteClusterInfo ¶
func (c *Client4) GetRemoteClusterInfo(remoteID string) (RemoteClusterInfo, *Response, error)
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) GetSamlCertificateStatus ¶
func (c *Client4) GetSamlCertificateStatus() (*SamlCertificateStatus, *Response, error)
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, error)
func (*Client4) GetSchemes ¶
GetSchemes ets all schemes, sorted with the most recently created first, optionally filtered by scope.
func (*Client4) GetServerBusy ¶
func (c *Client4) GetServerBusy() (*ServerBusyState, *Response, error)
GetServerBusy returns the current ServerBusyState including the time when a server marked busy will automatically have the flag cleared.
func (*Client4) GetSessions ¶
GetSessions returns a list of sessions based on the provided user id string.
func (*Client4) GetSidebarCategoriesForTeamForUser ¶
func (c *Client4) GetSidebarCategoriesForTeamForUser(userID, teamID, etag string) (*OrderedSidebarCategories, *Response, error)
func (*Client4) GetSidebarCategoryForTeamForUser ¶
func (c *Client4) GetSidebarCategoryForTeamForUser(userID, teamID, categoryID, etag string) (*SidebarCategoryWithChannels, *Response, error)
func (*Client4) GetSidebarCategoryOrderForTeamForUser ¶
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) GetSubscription ¶
func (c *Client4) GetSubscription() (*Subscription, *Response, error)
func (*Client4) GetSubscriptionStats ¶
func (c *Client4) GetSubscriptionStats() (*SubscriptionStats, *Response, error)
func (*Client4) GetSupportedTimezone ¶
GetSupportedTimezone returns a page of supported timezones on the system.
func (*Client4) GetTeamByName ¶
GetTeamByName returns a team based on the provided team name string.
func (*Client4) GetTeamIcon ¶
GetTeamIcon gets the team icon of the team.
func (*Client4) GetTeamInviteInfo ¶
GetTeamInviteInfo returns a team object from an invite id containing sanitized information.
func (*Client4) GetTeamMember ¶
func (c *Client4) GetTeamMember(teamId, userId, etag string) (*TeamMember, *Response, error)
GetTeamMember returns a team member based on the provided team and user id strings.
func (*Client4) GetTeamMembers ¶
func (c *Client4) GetTeamMembers(teamId string, page int, perPage int, etag string) ([]*TeamMember, *Response, error)
GetTeamMembers returns team members based on the provided team id string.
func (*Client4) GetTeamMembersByIds ¶
func (c *Client4) GetTeamMembersByIds(teamId string, userIds []string) ([]*TeamMember, *Response, error)
GetTeamMembersByIds will return an array of team members based on the team id and a list of user ids provided. Must be authenticated.
func (*Client4) GetTeamMembersForUser ¶
func (c *Client4) GetTeamMembersForUser(userId string, etag string) ([]*TeamMember, *Response, error)
GetTeamMembersForUser returns the team members for a user.
func (*Client4) GetTeamMembersSortAndWithoutDeletedUsers ¶
func (c *Client4) GetTeamMembersSortAndWithoutDeletedUsers(teamId string, page int, perPage int, sort string, excludeDeletedUsers bool, etag string) ([]*TeamMember, *Response, error)
GetTeamMembersWithoutDeletedUsers returns team members based on the provided team id string. Additional parameters of sort and exclude_deleted_users accepted as well Could not add it to above function due to it be a breaking change.
func (*Client4) GetTeamPoliciesForUser ¶
func (c *Client4) GetTeamPoliciesForUser(userID string, offset, limit int) (*RetentionPolicyForTeamList, *Response, error)
GetTeamPoliciesForUser will get the data retention policies for the teams to which a user belongs.
func (*Client4) GetTeamStats ¶
GetTeamStats returns a team stats based on the team id string. Must be authenticated.
func (*Client4) GetTeamUnread ¶
func (c *Client4) GetTeamUnread(teamId, userId string) (*TeamUnread, *Response, error)
GetTeamUnread will return a TeamUnread object that contains the amount of unread messages and mentions the user has for the specified team. Must be authenticated.
func (*Client4) GetTeamsForRetentionPolicy ¶
func (c *Client4) GetTeamsForRetentionPolicy(policyID string, page, perPage int) (*TeamsWithCount, *Response, error)
GetTeamsForRetentionPolicy will get the teams to which the specified policy is currently applied.
func (*Client4) GetTeamsForScheme ¶
func (c *Client4) GetTeamsForScheme(schemeId string, page int, perPage int) ([]*Team, *Response, error)
GetTeamsForScheme gets the teams using this scheme, sorted alphabetically by display name.
func (*Client4) GetTeamsForUser ¶
GetTeamsForUser returns a list of teams a user is on. Must be logged in as the user or be a system administrator.
func (*Client4) GetTeamsUnreadForUser ¶
func (c *Client4) GetTeamsUnreadForUser(userId, teamIdToExclude string, includeCollapsedThreads bool) ([]*TeamUnread, *Response, error)
GetTeamsUnreadForUser will return an array with TeamUnread objects that contain the amount of unread messages and mentions the current user has for the teams it belongs to. An optional team ID can be set to exclude that team from the results. An optional boolean can be set to include collapsed thread unreads. Must be authenticated.
func (*Client4) GetTermsOfService ¶
func (c *Client4) GetTermsOfService(etag string) (*TermsOfService, *Response, error)
GetTermsOfService fetches the latest terms of service
func (*Client4) GetTotalUsersStats ¶
func (c *Client4) GetTotalUsersStats(etag string) (*UsersStats, *Response, error)
GetTotalUsersStats returns a total system user stats. Must be authenticated.
func (*Client4) GetUpload ¶
func (c *Client4) GetUpload(uploadId string) (*UploadSession, *Response, error)
GetUpload returns the upload session for the specified uploadId.
func (*Client4) GetUploadsForUser ¶
func (c *Client4) GetUploadsForUser(userId string) ([]*UploadSession, *Response, error)
GetUploadsForUser returns the upload sessions created by the specified userId.
func (*Client4) GetUserAccessToken ¶
func (c *Client4) GetUserAccessToken(tokenId string) (*UserAccessToken, *Response, error)
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) GetUserAccessTokens ¶
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, error)
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) GetUserAudits ¶
func (c *Client4) GetUserAudits(userId string, page int, perPage int, etag string) (Audits, *Response, error)
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) GetUserByUsername ¶
GetUserByUsername returns a user based on the provided user name string.
func (*Client4) GetUserStatus ¶
GetUserStatus returns a user based on the provided user id string.
func (*Client4) GetUserTermsOfService ¶
func (c *Client4) GetUserTermsOfService(userId, etag string) (*UserTermsOfService, *Response, error)
GetUserTermsOfService fetches user's latest terms of service action if the latest action was for acceptance.
func (*Client4) GetUserThread ¶
func (*Client4) GetUserThreads ¶
func (*Client4) GetUsers ¶
GetUsers returns a page of users on the system. Page counting starts at 0.
func (*Client4) GetUsersByGroupChannelIds ¶
func (c *Client4) GetUsersByGroupChannelIds(groupChannelIds []string) (map[string][]*User, *Response, error)
GetUsersByGroupChannelIds returns a map with channel ids as keys and a list of users as values based on the provided user ids.
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, error)
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, error)
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, error)
GetUsersInChannelByStatus returns a page of users in a channel. Page counting starts at 0. Sorted by Status
func (*Client4) GetUsersInGroup ¶
func (c *Client4) GetUsersInGroup(groupID string, page int, perPage int, etag string) ([]*User, *Response, error)
GetUsersInGroup returns a page of users in a group. Page counting starts at 0.
func (*Client4) GetUsersInTeam ¶
func (c *Client4) GetUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response, error)
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, error)
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, error)
GetUsersNotInTeam returns a page of users who are not in a team. Page counting starts at 0.
func (*Client4) GetUsersStatusesByIds ¶
GetUsersStatusesByIds returns a list of users status based on the provided user ids.
func (*Client4) GetUsersWithoutTeam ¶
func (c *Client4) GetUsersWithoutTeam(page int, perPage int, etag string) ([]*User, *Response, error)
GetUsersWithoutTeam returns a page of users on the system that aren't on any teams. Page counting starts at 0.
func (*Client4) GetWebappPlugins ¶
GetWebappPlugins will return a list of plugins that the webapp should download.
func (*Client4) ImportTeam ¶
func (c *Client4) ImportTeam(data []byte, filesize int, importFrom, filename, teamId string) (map[string]string, *Response, error)
ImportTeam will import an exported team from other app into a existing team.
func (*Client4) InstallMarketplacePlugin ¶
func (c *Client4) InstallMarketplacePlugin(request *InstallMarketplacePluginRequest) (*Manifest, *Response, error)
InstallMarketplacePlugin will install marketplace plugin.
func (*Client4) InstallPluginFromURL ¶
func (*Client4) InvalidateCaches ¶
InvalidateCaches will purge the cache and can affect the performance while is cleaning.
func (*Client4) InvalidateEmailInvites ¶
InvalidateEmailInvites will invalidate active email invitations that have not been accepted by the user.
func (*Client4) InviteGuestsToTeam ¶
func (c *Client4) InviteGuestsToTeam(teamId string, userEmails []string, channels []string, message string) (*Response, error)
InviteGuestsToTeam invite guest by email to some channels in a team.
func (*Client4) InviteGuestsToTeamGracefully ¶
func (c *Client4) InviteGuestsToTeamGracefully(teamId string, userEmails []string, channels []string, message string) ([]*EmailInviteWithError, *Response, error)
InviteGuestsToTeam invite guest by email to some channels in a team.
func (*Client4) InviteUsersToTeam ¶
InviteUsersToTeam invite users by email to the team.
func (*Client4) InviteUsersToTeamGracefully ¶
func (c *Client4) InviteUsersToTeamGracefully(teamId string, userEmails []string) ([]*EmailInviteWithError, *Response, error)
InviteUsersToTeam invite users by email to the team.
func (*Client4) LinkGroupSyncable ¶
func (c *Client4) LinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, patch *GroupSyncablePatch) (*GroupSyncable, *Response, error)
func (*Client4) LinkLdapGroup ¶
LinkLdapGroup creates or undeletes a Mattermost group and associates it to the given LDAP group DN.
func (*Client4) ListAutocompleteCommands ¶
ListAutocompleteCommands will retrieve a list of commands available in the team.
func (*Client4) ListCommandAutocompleteSuggestions ¶
func (c *Client4) ListCommandAutocompleteSuggestions(userInput, teamId string) ([]AutocompleteSuggestion, *Response, error)
ListCommandAutocompleteSuggestions will retrieve a list of suggestions for a userInput.
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, error)
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) MarkNoticesViewed ¶
func (*Client4) MigrateAuthToLdap ¶
func (*Client4) MigrateAuthToSaml ¶
func (*Client4) MigrateConfig ¶
MigrateConfig will migrate existing config to the new one. DEPRECATED: The config migrate API has been moved to be a purely mmctl --local endpoint. This method will be removed in a future major release.
func (*Client4) MigrateIdLdap ¶
MigrateIdLdap migrates the LDAP enabled users to given attribute
func (*Client4) MockSession ¶
MockSession is deprecated in favour of SetToken
func (*Client4) MoveChannel ¶
MoveChannel moves the channel to the destination team.
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) OpenInteractiveDialog ¶
func (c *Client4) OpenInteractiveDialog(request OpenDialogRequest) (*Response, error)
OpenInteractiveDialog sends a WebSocket event to a user's clients to open interactive dialogs, based on the provided trigger ID and other provided data. Used with interactive message buttons, menus and slash commands.
func (*Client4) PatchChannel ¶
PatchChannel partially updates a channel. Any missing fields are not updated.
func (*Client4) PatchChannelModerations ¶
func (c *Client4) PatchChannelModerations(channelID string, patch []*ChannelModerationPatch) ([]*ChannelModeration, *Response, error)
func (*Client4) PatchConfig ¶
func (*Client4) PatchDataRetentionPolicy ¶
func (c *Client4) PatchDataRetentionPolicy(patch *RetentionPolicyWithTeamAndChannelIDs) (*RetentionPolicyWithTeamAndChannelCounts, *Response, error)
PatchDataRetentionPolicy will patch the granular data retention policy with the specified ID. The Id field of `patch` must be non-empty.
func (*Client4) PatchGroup ¶
func (*Client4) PatchGroupSyncable ¶
func (c *Client4) PatchGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, patch *GroupSyncablePatch) (*GroupSyncable, *Response, error)
func (*Client4) PatchRole ¶
PatchRole partially updates a role in the system. Any missing fields are not updated.
func (*Client4) PatchScheme ¶
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) PermanentDeleteAllUsers ¶
PermanentDeleteAll permanently deletes all users in the system. This is a local only endpoint
func (*Client4) PermanentDeleteChannel ¶
PermanentDeleteChannel deletes a channel based on the provided channel id string.
func (*Client4) PermanentDeleteTeam ¶
PermanentDeleteTeam deletes the team, should only be used when needed for compliance and the like.
func (*Client4) PermanentDeleteUser ¶
PermanentDeleteUser deletes a user in the system based on the provided user id string.
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) PublishUserTyping ¶
func (c *Client4) PublishUserTyping(userID string, typingRequest TypingRequest) (*Response, error)
PublishUserTyping publishes a user is typing websocket event based on the provided TypingRequest.
func (*Client4) PurgeBleveIndexes ¶
PurgeBleveIndexes immediately deletes all Bleve indexes.
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, error)
RegenOutgoingHookToken regenerate the outgoing webhook token.
func (*Client4) RegenerateOAuthAppSecret ¶
RegenerateOAuthAppSecret regenerates the client secret for a registered OAuth 2.0 client application.
func (*Client4) RegenerateTeamInviteId ¶
RegenerateTeamInviteId requests a new invite ID to be generated.
func (*Client4) RegisterTermsOfServiceAction ¶
func (c *Client4) RegisterTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) (*Response, error)
RegisterTermsOfServiceAction saves action performed by a user against a specific terms of service.
func (*Client4) ReloadConfig ¶
ReloadConfig will reload the server configuration.
func (*Client4) RemoveChannelsFromRetentionPolicy ¶
func (c *Client4) RemoveChannelsFromRetentionPolicy(policyID string, channelIDs []string) (*Response, error)
RemoveChannelsFromRetentionPolicy will remove the specified channels from the granular data retention policy with the specified ID.
func (*Client4) RemoveLicenseFile ¶
RemoveLicenseFile will remove the server license it exists. Note that this will disable all enterprise features.
func (*Client4) RemovePlugin ¶
RemovePlugin will disable and delete a plugin.
func (*Client4) RemoveRecentUserCustomStatus ¶ added in v6.2.0
RemoveRecentUserCustomStatus remove a recent user's custom status based on the provided user id string.
func (*Client4) RemoveTeamIcon ¶
RemoveTeamIcon updates LastTeamIconUpdate to 0 which indicates team icon is removed.
func (*Client4) RemoveTeamMember ¶
RemoveTeamMember will remove a user from a team.
func (*Client4) RemoveTeamsFromRetentionPolicy ¶
func (c *Client4) RemoveTeamsFromRetentionPolicy(policyID string, teamIDs []string) (*Response, error)
RemoveTeamsFromRetentionPolicy will remove the specified teams from the granular data retention policy with the specified ID.
func (*Client4) RemoveUserCustomStatus ¶ added in v6.2.0
RemoveUserCustomStatus remove a user's custom status based on the provided user id string.
func (*Client4) RemoveUserFromChannel ¶
RemoveUserFromChannel will delete the channel member object for a user, effectively removing the user from a channel.
func (*Client4) RequestTrialLicense ¶
RequestTrialLicense will request a trial license and install it in the server
func (*Client4) ResetPassword ¶
ResetPassword uses a recovery code to update reset a user's password.
func (*Client4) ResetSamlAuthDataToEmail ¶
func (c *Client4) ResetSamlAuthDataToEmail(includeDeleted bool, dryRun bool, userIDs []string) (int64, *Response, error)
ResetSamlAuthDataToEmail resets the AuthData field of SAML users to their Email.
func (*Client4) RestoreChannel ¶
RestoreChannel restores a previously deleted channel. Any missing fields are not updated.
func (*Client4) RestoreTeam ¶
RestoreTeam restores a previously deleted team.
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) SearchAllChannels ¶
func (c *Client4) SearchAllChannels(search *ChannelSearch) (ChannelListWithTeamData, *Response, error)
SearchAllChannels search in all the channels. Must be a system administrator.
func (*Client4) SearchAllChannelsForUser ¶ added in v6.2.0
func (c *Client4) SearchAllChannelsForUser(term string) (ChannelListWithTeamData, *Response, error)
SearchAllChannelsForUser search in all the channels for a regular user.
func (*Client4) SearchAllChannelsPaged ¶
func (c *Client4) SearchAllChannelsPaged(search *ChannelSearch) (*ChannelsWithCount, *Response, error)
SearchAllChannelsPaged searches all the channels and returns the results paged with the total count.
func (*Client4) SearchArchivedChannels ¶
func (c *Client4) SearchArchivedChannels(teamId string, search *ChannelSearch) ([]*Channel, *Response, error)
SearchArchivedChannels returns the archived channels on a team matching the provided search term.
func (*Client4) SearchChannels ¶
func (c *Client4) SearchChannels(teamId string, search *ChannelSearch) ([]*Channel, *Response, error)
SearchChannels returns the channels on a team matching the provided search term.
func (*Client4) SearchChannelsForRetentionPolicy ¶
func (c *Client4) SearchChannelsForRetentionPolicy(policyID string, term string) (ChannelListWithTeamData, *Response, error)
SearchChannelsForRetentionPolicy will search the channels to which the specified policy is currently applied.
func (*Client4) SearchEmoji ¶
func (c *Client4) SearchEmoji(search *EmojiSearch) ([]*Emoji, *Response, error)
SearchEmoji returns a list of emoji matching some search criteria.
func (*Client4) SearchFiles ¶
func (c *Client4) SearchFiles(teamId string, terms string, isOrSearch bool) (*FileInfoList, *Response, error)
SearchFiles returns any posts with matching terms string.
func (*Client4) SearchFilesWithParams ¶
func (c *Client4) SearchFilesWithParams(teamId string, params *SearchParameter) (*FileInfoList, *Response, error)
SearchFilesWithParams returns any posts with matching terms string.
func (*Client4) SearchGroupChannels ¶
func (c *Client4) SearchGroupChannels(search *ChannelSearch) ([]*Channel, *Response, error)
SearchGroupChannels returns the group channels of the user whose members' usernames match the search term.
func (*Client4) SearchPosts ¶
func (c *Client4) SearchPosts(teamId string, terms string, isOrSearch bool) (*PostList, *Response, error)
SearchPosts returns any posts with matching terms string.
func (*Client4) SearchPostsWithMatches ¶
func (c *Client4) SearchPostsWithMatches(teamId string, terms string, isOrSearch bool) (*PostSearchResults, *Response, error)
SearchPostsWithMatches returns any posts with matching terms string, including.
func (*Client4) SearchPostsWithParams ¶
func (c *Client4) SearchPostsWithParams(teamId string, params *SearchParameter) (*PostList, *Response, error)
SearchPostsWithParams returns any posts with matching terms string.
func (*Client4) SearchTeams ¶
func (c *Client4) SearchTeams(search *TeamSearch) ([]*Team, *Response, error)
SearchTeams returns teams matching the provided search term.
func (*Client4) SearchTeamsForRetentionPolicy ¶
func (c *Client4) SearchTeamsForRetentionPolicy(policyID string, term string) ([]*Team, *Response, error)
SearchTeamsForRetentionPolicy will search the teams to which the specified policy is currently applied.
func (*Client4) SearchTeamsPaged ¶
SearchTeamsPaged returns a page of teams and the total count matching the provided search term.
func (*Client4) SearchUserAccessTokens ¶
func (c *Client4) SearchUserAccessTokens(search *UserAccessTokenSearch) ([]*UserAccessToken, *Response, error)
SearchUserAccessTokens returns user access tokens matching the provided search term.
func (*Client4) SearchUsers ¶
func (c *Client4) SearchUsers(search *UserSearch) ([]*User, *Response, error)
SearchUsers returns a list of users based on some search criteria.
func (*Client4) SendAdminUpgradeRequestEmail ¶
func (*Client4) SendAdminUpgradeRequestEmailOnJoin ¶
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) SetBoolString ¶
SetBoolString is a helper method for overriding how true and false query string parameters are sent to the server.
This method is only exposed for testing. It is never necessary to configure these values in production.
func (*Client4) SetDefaultProfileImage ¶
SetDefaultProfileImage resets the profile image to a default generated one.
func (*Client4) SetOAuthToken ¶
func (*Client4) SetPostUnread ¶
func (c *Client4) SetPostUnread(userId string, postId string, collapsedThreadsSupported bool) (*Response, error)
SetPostUnread marks channel where post belongs as unread on the time of the provided post.
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) SetTeamIcon ¶
SetTeamIcon sets team icon of the team.
func (*Client4) SoftDeleteTeam ¶
SoftDeleteTeam deletes the team softly (archive only, not permanent delete).
func (*Client4) SubmitInteractiveDialog ¶
func (c *Client4) SubmitInteractiveDialog(request SubmitDialogRequest) (*SubmitDialogResponse, *Response, error)
SubmitInteractiveDialog will submit the provided dialog data to the integration configured by the URL. Used with the interactive dialogs integration feature.
func (*Client4) SwitchAccountType ¶
func (c *Client4) SwitchAccountType(switchRequest *SwitchRequest) (string, *Response, error)
SwitchAccountType changes a user's login type from one type to another.
func (*Client4) SyncLdap ¶
SyncLdap will force a sync with the configured LDAP server. If includeRemovedMembers is true, then group members who left or were removed from a synced team/channel will be re-joined; otherwise, they will be excluded.
func (*Client4) TeamExists ¶
TeamExists returns true or false if the team exist or not.
func (*Client4) TeamMembersMinusGroupMembers ¶
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) UnlinkGroupSyncable ¶
func (c *Client4) UnlinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType) (*Response, error)
func (*Client4) UnlinkLdapGroup ¶
UnlinkLdapGroup deletes the Mattermost group associated with the given LDAP group DN.
func (*Client4) UpdateChannel ¶
UpdateChannel updates a channel based on the provided channel struct.
func (*Client4) UpdateChannelMemberSchemeRoles ¶
func (c *Client4) UpdateChannelMemberSchemeRoles(channelId string, userId string, schemeRoles *SchemeRoles) (*Response, error)
UpdateChannelMemberSchemeRoles will update the scheme-derived roles on a channel for a user.
func (*Client4) UpdateChannelNotifyProps ¶
func (c *Client4) UpdateChannelNotifyProps(channelId, userId string, props map[string]string) (*Response, error)
UpdateChannelNotifyProps will update the notification properties on a channel for a user.
func (*Client4) UpdateChannelPrivacy ¶
func (c *Client4) UpdateChannelPrivacy(channelId string, privacy ChannelType) (*Channel, *Response, error)
UpdateChannelPrivacy updates channel privacy
func (*Client4) UpdateChannelRoles ¶
UpdateChannelRoles will update the roles on a channel for a user.
func (*Client4) UpdateChannelScheme ¶
UpdateChannelScheme will update a channel's scheme.
func (*Client4) UpdateCloudCustomer ¶
func (c *Client4) UpdateCloudCustomer(customerInfo *CloudCustomerInfo) (*CloudCustomer, *Response, error)
func (*Client4) UpdateCloudCustomerAddress ¶
func (c *Client4) UpdateCloudCustomerAddress(address *Address) (*CloudCustomer, *Response, error)
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, error)
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, error)
UpdateOutgoingWebhook creates an outgoing webhook for a team or channel.
func (*Client4) UpdatePassword ¶
func (*Client4) UpdatePost ¶
UpdatePost updates a post based on the provided post struct.
func (*Client4) UpdatePreferences ¶
func (c *Client4) UpdatePreferences(userId string, preferences Preferences) (*Response, error)
UpdatePreferences saves the user's preferences.
func (*Client4) UpdateSidebarCategoriesForTeamForUser ¶
func (c *Client4) UpdateSidebarCategoriesForTeamForUser(userID, teamID string, categories []*SidebarCategoryWithChannels) ([]*SidebarCategoryWithChannels, *Response, error)
func (*Client4) UpdateSidebarCategoryForTeamForUser ¶
func (c *Client4) UpdateSidebarCategoryForTeamForUser(userID, teamID, categoryID string, category *SidebarCategoryWithChannels) (*SidebarCategoryWithChannels, *Response, error)
func (*Client4) UpdateSidebarCategoryOrderForTeamForUser ¶
func (*Client4) UpdateTeam ¶
UpdateTeam will update a team.
func (*Client4) UpdateTeamMemberRoles ¶
UpdateTeamMemberRoles will update the roles on a team for a user.
func (*Client4) UpdateTeamMemberSchemeRoles ¶
func (c *Client4) UpdateTeamMemberSchemeRoles(teamId string, userId string, schemeRoles *SchemeRoles) (*Response, error)
UpdateTeamMemberSchemeRoles will update the scheme-derived roles on a team for a user.
func (*Client4) UpdateTeamPrivacy ¶
UpdateTeamPrivacy modifies the team type (model.TeamOpen <--> model.TeamInvite) and sets the corresponding AllowOpenInvite appropriately.
func (*Client4) UpdateTeamScheme ¶
UpdateTeamScheme will update a team's scheme.
func (*Client4) UpdateThreadFollowForUser ¶
func (*Client4) UpdateThreadReadForUser ¶
func (*Client4) UpdateThreadsReadForUser ¶
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) UpdateUserCustomStatus ¶ added in v6.2.0
func (c *Client4) UpdateUserCustomStatus(userId string, userCustomStatus *CustomStatus) (*CustomStatus, *Response, error)
UpdateUserCustomStatus sets a user's custom status based on the provided user id string.
func (*Client4) UpdateUserHashedPassword ¶
UpdateUserHashedPassword updates a user's password with an already-hashed password. Must be a system administrator.
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 ¶
func (c *Client4) UpdateUserPassword(userId, currentPassword, newPassword string) (*Response, error)
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) UploadData ¶
UploadData performs an upload. On success it returns a FileInfo object.
func (*Client4) UploadFile ¶
func (c *Client4) UploadFile(data []byte, channelId string, filename string) (*FileUploadResponse, *Response, error)
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, error)
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) UploadLdapPrivateCertificate ¶
UploadLdapPrivateCertificate will upload a private key for LDAP and set the config to use it.
func (*Client4) UploadLdapPublicCertificate ¶
UploadLdapPublicCertificate will upload a public certificate for LDAP and set the config to use it.
func (*Client4) UploadLicenseFile ¶
UploadLicenseFile will add a license file to the system.
func (*Client4) UploadPlugin ¶
UploadPlugin takes an io.Reader stream pointing to the contents of a .tar.gz plugin.
func (*Client4) UploadPluginForced ¶
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.
func (*Client4) VerifyUserEmail ¶
VerifyUserEmail will verify a user's email using the supplied token.
func (*Client4) VerifyUserEmailWithoutToken ¶
VerifyUserEmailWithoutToken will verify a user's email by its Id. (Requires manage system role)
func (*Client4) ViewChannel ¶
func (c *Client4) ViewChannel(userId string, view *ChannelView) (*ChannelViewResponse, *Response, error)
ViewChannel performs a view action for a user. Synonymous with switching channels or marking channels as read by a user.
type ClientRequirements ¶
type ClientRequirements struct { AndroidLatestVersion string `access:"write_restrictable,cloud_restrictable"` AndroidMinVersion string `access:"write_restrictable,cloud_restrictable"` IosLatestVersion string `access:"write_restrictable,cloud_restrictable"` IosMinVersion string `access:"write_restrictable,cloud_restrictable"` }
type CloudCustomer ¶
type CloudCustomer struct { CloudCustomerInfo ID string `json:"id"` CreatorID string `json:"creator_id"` CreateAt int64 `json:"create_at"` BillingAddress *Address `json:"billing_address"` CompanyAddress *Address `json:"company_address"` PaymentMethod *PaymentMethod `json:"payment_method"` }
Customer model represents a customer on the system.
type CloudCustomerInfo ¶
type CloudCustomerInfo struct { Name string `json:"name"` Email string `json:"email,omitempty"` ContactFirstName string `json:"contact_first_name,omitempty"` ContactLastName string `json:"contact_last_name,omitempty"` NumEmployees int `json:"num_employees"` }
CloudCustomerInfo represents editable info of a customer.
type CloudSettings ¶
type CloudSettings struct { CWSURL *string `access:"write_restrictable"` CWSAPIURL *string `access:"write_restrictable"` }
func (*CloudSettings) SetDefaults ¶
func (s *CloudSettings) SetDefaults()
type CloudWorkspaceOwner ¶
type CloudWorkspaceOwner struct {
UserName string `json:"username"`
}
CloudWorkspaceOwner is part of the CWS Webhook payload that contains information about the user that created the workspace from the CWS
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 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()
type ClusterEvent ¶
type ClusterEvent string
const ( ClusterEventPublish ClusterEvent = "publish" ClusterEventUpdateStatus ClusterEvent = "update_status" ClusterEventInvalidateAllCaches ClusterEvent = "inv_all_caches" ClusterEventInvalidateCacheForReactions ClusterEvent = "inv_reactions" ClusterEventInvalidateCacheForChannelMembersNotifyProps ClusterEvent = "inv_channel_members_notify_props" ClusterEventInvalidateCacheForChannelByName ClusterEvent = "inv_channel_name" ClusterEventInvalidateCacheForChannel ClusterEvent = "inv_channel" ClusterEventInvalidateCacheForChannelGuestCount ClusterEvent = "inv_channel_guest_count" ClusterEventInvalidateCacheForUser ClusterEvent = "inv_user" ClusterEventInvalidateCacheForUserTeams ClusterEvent = "inv_user_teams" ClusterEventClearSessionCacheForUser ClusterEvent = "clear_session_user" ClusterEventInvalidateCacheForRoles ClusterEvent = "inv_roles" ClusterEventInvalidateCacheForRolePermissions ClusterEvent = "inv_role_permissions" ClusterEventInvalidateCacheForProfileByIds ClusterEvent = "inv_profile_ids" ClusterEventInvalidateCacheForProfileInChannel ClusterEvent = "inv_profile_in_channel" ClusterEventInvalidateCacheForSchemes ClusterEvent = "inv_schemes" ClusterEventInvalidateCacheForFileInfos ClusterEvent = "inv_file_infos" ClusterEventInvalidateCacheForWebhooks ClusterEvent = "inv_webhooks" ClusterEventInvalidateCacheForEmojisById ClusterEvent = "inv_emojis_by_id" ClusterEventInvalidateCacheForEmojisIdByName ClusterEvent = "inv_emojis_id_by_name" ClusterEventInvalidateCacheForChannelPinnedpostsCounts ClusterEvent = "inv_channel_pinnedposts_counts" ClusterEventInvalidateCacheForChannelMemberCounts ClusterEvent = "inv_channel_member_counts" ClusterEventInvalidateCacheForLastPosts ClusterEvent = "inv_last_posts" ClusterEventInvalidateCacheForLastPostTime ClusterEvent = "inv_last_post_time" ClusterEventInvalidateCacheForTeams ClusterEvent = "inv_teams" ClusterEventClearSessionCacheForAllUsers ClusterEvent = "inv_all_user_sessions" ClusterEventInstallPlugin ClusterEvent = "install_plugin" ClusterEventRemovePlugin ClusterEvent = "remove_plugin" ClusterEventPluginEvent ClusterEvent = "plugin_event" ClusterEventInvalidateCacheForTermsOfService ClusterEvent = "inv_terms_of_service" ClusterEventBusyStateChanged ClusterEvent = "busy_state_change" // Gossip communication ClusterGossipEventRequestGetLogs = "gossip_request_get_logs" ClusterGossipEventResponseGetLogs = "gossip_response_get_logs" ClusterGossipEventRequestGetClusterStats = "gossip_request_cluster_stats" ClusterGossipEventResponseGetClusterStats = "gossip_response_cluster_stats" ClusterGossipEventRequestGetPluginStatuses = "gossip_request_plugin_statuses" ClusterGossipEventResponseGetPluginStatuses = "gossip_response_plugin_statuses" ClusterGossipEventRequestSaveConfig = "gossip_request_save_config" ClusterGossipEventResponseSaveConfig = "gossip_response_save_config" // SendTypes for ClusterMessage. ClusterSendBestEffort = "best_effort" ClusterSendReliable = "reliable" )
type ClusterInfo ¶
type ClusterMessage ¶
type ClusterSettings ¶
type ClusterSettings struct { Enable *bool `access:"environment_high_availability,write_restrictable"` ClusterName *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none OverrideHostname *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none NetworkInterface *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` BindAddress *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` AdvertiseAddress *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` UseIPAddress *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` EnableGossipCompression *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` EnableExperimentalGossipEncryption *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` ReadOnlyConfig *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` GossipPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none StreamingPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none MaxIdleConns *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none MaxIdleConnsPerHost *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none IdleConnTimeoutMilliseconds *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none }
func (*ClusterSettings) SetDefaults ¶
func (s *ClusterSettings) SetDefaults()
type ClusterStats ¶
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"` // PluginId records the id of the plugin that created this Command. If it is blank, the Command // was not created by a plugin. PluginId string `json:"plugin_id"` AutocompleteData *AutocompleteData `db:"-" json:"autocomplete_data,omitempty"` // AutocompleteIconData is a base64 encoded svg AutocompleteIconData string `db:"-" json:"autocomplete_icon_data,omitempty"` }
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 i18n.TranslateFunc `json:"-"` UserMentions UserMentionMap `json:"-"` ChannelMentions ChannelMentionMap `json:"-"` // DO NOT USE Session field is deprecated. MM-26398 Session Session `json:"-"` }
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
type CommandMoveRequest ¶
type CommandMoveRequest struct {
TeamId string `json:"team_id"`
}
type CommandResponse ¶
type CommandResponse struct { ResponseType string `json:"response_type"` Text string `json:"text"` Username string `json:"username"` ChannelId string `json:"channel_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. Attachments []*SlackAttachment `json:"attachments"` 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
type CommandWebhook ¶
type CommandWebhook struct { Id string CreateAt int64 CommandId string UserId string ChannelId string RootId 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 (*Compliance) DeepCopy ¶
func (c *Compliance) DeepCopy() *Compliance
func (*Compliance) IsValid ¶
func (c *Compliance) IsValid() *AppError
func (*Compliance) JobName ¶
func (c *Compliance) JobName() string
func (*Compliance) PreSave ¶
func (c *Compliance) PreSave()
type ComplianceExportCursor ¶
type ComplianceExportCursor struct { LastChannelsQueryPostCreateAt int64 LastChannelsQueryPostID string ChannelsQueryCompleted bool LastDirectMessagesQueryPostCreateAt int64 LastDirectMessagesQueryPostID string DirectMessagesQueryCompleted bool }
ComplianceExportCursor is used for paginated iteration of posts for compliance export. We need to keep track of the last post ID in addition to the last post CreateAt to break ties when two posts have the same CreateAt.
type CompliancePost ¶
type CompliancePost struct { // From Team TeamName string TeamDisplayName string // From Channel ChannelName string ChannelDisplayName string ChannelType string // From User UserUsername string UserEmail string UserNickname string // From Post PostId string PostCreateAt int64 PostUpdateAt int64 PostDeleteAt int64 PostRootId string PostOriginalId string PostMessage string PostType string PostProps string PostFileIds string IsBot bool }
func (*CompliancePost) Row ¶
func (cp *CompliancePost) Row() []string
type ComplianceSettings ¶
type ComplianceSettings struct { Enable *bool `access:"compliance_compliance_monitoring"` Directory *string `access:"compliance_compliance_monitoring"` // telemetry: none EnableDaily *bool `access:"compliance_compliance_monitoring"` BatchSize *int `access:"compliance_compliance_monitoring"` // telemetry: none }
func (*ComplianceSettings) SetDefaults ¶
func (s *ComplianceSettings) SetDefaults()
type Compliances ¶
type Compliances []Compliance
type Conditions ¶
type Conditions struct { Audience *NoticeAudience `json:"audience,omitempty"` ClientType *NoticeClientType `json:"clientType,omitempty"` // Only show the notice on specific clients. Defaults to 'all' DesktopVersion []string `json:"desktopVersion,omitempty"` // What desktop client versions does this notice apply to.; Format: semver ranges (https://devhints.io/semver); Example: [">=1.2.3 < ~2.4.x"]; Example: ["<v5.19", "v5.20-v5.22"] DisplayDate *string `json:"displayDate,omitempty"` // When to display the notice.; Examples:; "2020-03-01T00:00:00Z" - show on specified date; ">= 2020-03-01T00:00:00Z" - show after specified date; "< 2020-03-01T00:00:00Z" - show before the specified date; "> 2020-03-01T00:00:00Z <= 2020-04-01T00:00:00Z" - show only between the specified dates InstanceType *NoticeInstanceType `json:"instanceType,omitempty"` MobileVersion []string `json:"mobileVersion,omitempty"` // What mobile client versions does this notice apply to.; Format: semver ranges (https://devhints.io/semver); Example: [">=1.2.3 < ~2.4.x"]; Example: ["<v5.19", "v5.20-v5.22"] NumberOfPosts *int64 `json:"numberOfPosts,omitempty"` // Only show the notice when server has more than specified number of posts NumberOfUsers *int64 `json:"numberOfUsers,omitempty"` // Only show the notice when server has more than specified number of users ServerConfig map[string]interface{} `json:"serverConfig,omitempty"` // Map of mattermost server config paths and their values. Notice will be displayed only if; the values match the target server config; Example: serverConfig: { "PluginSettings.Enable": true, "GuestAccountsSettings.Enable":; false } ServerVersion []string `json:"serverVersion,omitempty"` // What server versions does this notice apply to.; Format: semver ranges (https://devhints.io/semver); Example: [">=1.2.3 < ~2.4.x"]; Example: ["<v5.19", "v5.20-v5.22"] Sku *NoticeSKU `json:"sku,omitempty"` UserConfig map[string]interface{} `json:"userConfig,omitempty"` // Map of user's settings and their values. Notice will be displayed only if the values; match the viewing users' config; Example: userConfig: { "new_sidebar.disabled": true } DeprecatingDependency *ExternalDependency `json:"deprecating_dependency,omitempty"` // External dependency which is going to be deprecated }
type Config ¶
type Config struct { ServiceSettings ServiceSettings TeamSettings TeamSettings ClientRequirements ClientRequirements SqlSettings SqlSettings LogSettings LogSettings ExperimentalAuditSettings ExperimentalAuditSettings NotificationLogSettings NotificationLogSettings PasswordSettings PasswordSettings FileSettings FileSettings EmailSettings EmailSettings RateLimitSettings RateLimitSettings PrivacySettings PrivacySettings SupportSettings SupportSettings AnnouncementSettings AnnouncementSettings ThemeSettings ThemeSettings GitLabSettings SSOSettings GoogleSettings SSOSettings Office365Settings Office365Settings OpenIdSettings SSOSettings LdapSettings LdapSettings ComplianceSettings ComplianceSettings LocalizationSettings LocalizationSettings SamlSettings SamlSettings NativeAppSettings NativeAppSettings ClusterSettings ClusterSettings MetricsSettings MetricsSettings ExperimentalSettings ExperimentalSettings AnalyticsSettings AnalyticsSettings ElasticsearchSettings ElasticsearchSettings BleveSettings BleveSettings DataRetentionSettings DataRetentionSettings MessageExportSettings MessageExportSettings JobSettings JobSettings PluginSettings PluginSettings DisplaySettings DisplaySettings GuestAccountsSettings GuestAccountsSettings ImageProxySettings ImageProxySettings CloudSettings CloudSettings // telemetry: none FeatureFlags *FeatureFlags `access:"*_read" json:",omitempty"` ImportSettings ImportSettings // telemetry: none ExportSettings ExportSettings }
Config fields support the 'access' tag with the following values corresponding to the suffix of the associated PermissionSysconsole* permission Id: 'about', 'reporting', 'user_management_users', 'user_management_groups', 'user_management_teams', 'user_management_channels', 'user_management_permissions', 'environment_web_server', 'environment_database', 'environment_elasticsearch', 'environment_file_storage', 'environment_image_proxy', 'environment_smtp', 'environment_push_notification_server', 'environment_high_availability', 'environment_rate_limiting', 'environment_logging', 'environment_session_lengths', 'environment_performance_monitoring', 'environment_developer', 'site', 'authentication', 'plugins', 'integrations', 'compliance', 'plugins', and 'experimental'. They grant read and/or write access to the config field to roles without PermissionManageSystem.
The 'access' tag '*_read' checks for any Sysconsole read permission and grants access if any read permission is allowed.
By default config values can be written with PermissionManageSystem, but if ExperimentalSettings.RestrictSystemAdmin is true and the access tag contains the value 'write_restrictable', then even PermissionManageSystem, does not grant write access.
PermissionManageSystem always grants read access.
Config values with the access tag 'cloud_restrictable' mean that are marked to be filtered when it's used in a cloud licensed environment with ExperimentalSettings.RestrictedSystemAdmin set to true.
Example:
type HairSettings struct { // Colour is writeable with either PermissionSysconsoleWriteReporting or PermissionSysconsoleWriteUserManagementGroups. // It is readable by PermissionSysconsoleReadReporting and PermissionSysconsoleReadUserManagementGroups permissions. // PermissionManageSystem grants read and write access. Colour string `access:"reporting,user_management_groups"` // Length is only readable and writable via PermissionManageSystem. Length string // Product is only writeable by PermissionManageSystem if ExperimentalSettings.RestrictSystemAdmin is false. // PermissionManageSystem can always read the value. Product bool `access:write_restrictable` }
func ConfigFromJSON ¶
func (*Config) GetSSOService ¶
func (o *Config) GetSSOService(service string) *SSOSettings
func (*Config) GetSanitizeOptions ¶
func (*Config) SetDefaults ¶
func (o *Config) SetDefaults()
type ConfigFunc ¶
type ConfigFunc func() *Config
type ConfirmPaymentMethodRequest ¶
type ConfirmPaymentMethodRequest struct { StripeSetupIntentID string `json:"stripe_setup_intent_id"` SubscriptionID string `json:"subscription_id"` }
ConfirmPaymentMethodRequest contains the fields for the customer payment update API.
type ContactPerson ¶
type CustomStatus ¶
type CustomStatus struct { Emoji string `json:"emoji"` Text string `json:"text"` Duration string `json:"duration"` ExpiresAt time.Time `json:"expires_at"` }
func (*CustomStatus) AreDurationAndExpirationTimeValid ¶
func (cs *CustomStatus) AreDurationAndExpirationTimeValid() bool
func (*CustomStatus) PreSave ¶
func (cs *CustomStatus) PreSave()
type DataRetentionSettings ¶
type DataRetentionSettings struct { EnableMessageDeletion *bool `access:"compliance_data_retention_policy"` EnableFileDeletion *bool `access:"compliance_data_retention_policy"` EnableBoardsDeletion *bool `access:"compliance_data_retention_policy"` MessageRetentionDays *int `access:"compliance_data_retention_policy"` FileRetentionDays *int `access:"compliance_data_retention_policy"` BoardsRetentionDays *int `access:"compliance_data_retention_policy"` DeletionJobStartTime *string `access:"compliance_data_retention_policy"` BatchSize *int `access:"compliance_data_retention_policy"` }
func (*DataRetentionSettings) SetDefaults ¶
func (s *DataRetentionSettings) SetDefaults()
type Dialog ¶
type Dialog struct { CallbackId string `json:"callback_id"` Title string `json:"title"` IntroductionText string `json:"introduction_text"` IconURL string `json:"icon_url"` Elements []DialogElement `json:"elements"` SubmitLabel string `json:"submit_label"` NotifyOnCancel bool `json:"notify_on_cancel"` State string `json:"state"` }
type DialogElement ¶
type DialogElement struct { DisplayName string `json:"display_name"` Name string `json:"name"` Type string `json:"type"` SubType string `json:"subtype"` Default string `json:"default"` Placeholder string `json:"placeholder"` HelpText string `json:"help_text"` Optional bool `json:"optional"` MinLength int `json:"min_length"` MaxLength int `json:"max_length"` DataSource string `json:"data_source"` Options []*PostActionOptions `json:"options"` }
type DirectChannelForExport ¶
type DirectPostForExport ¶
type DisplaySettings ¶
type DisplaySettings struct { CustomURLSchemes []string `access:"site_customization"` ExperimentalTimezone *bool `access:"experimental_features"` }
func (*DisplaySettings) SetDefaults ¶
func (s *DisplaySettings) SetDefaults()
type DoPostActionRequest ¶
type ElasticsearchSettings ¶
type ElasticsearchSettings struct { ConnectionURL *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` Username *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` Password *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` EnableIndexing *bool `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` EnableSearching *bool `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` EnableAutocomplete *bool `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` Sniff *bool `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` PostIndexReplicas *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` PostIndexShards *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` ChannelIndexReplicas *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` ChannelIndexShards *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` UserIndexReplicas *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` UserIndexShards *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` AggregatePostsAfterDays *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` // telemetry: none PostsAggregatorJobStartTime *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` // telemetry: none IndexPrefix *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` LiveIndexingBatchSize *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` BulkIndexingTimeWindowSeconds *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` RequestTimeoutSeconds *int `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` SkipTLSVerification *bool `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` Trace *string `access:"environment_elasticsearch,write_restrictable,cloud_restrictable"` }
func (*ElasticsearchSettings) SetDefaults ¶
func (s *ElasticsearchSettings) SetDefaults()
type EmailInviteWithError ¶
type EmailSettings ¶
type EmailSettings struct { EnableSignUpWithEmail *bool `access:"authentication_email"` EnableSignInWithEmail *bool `access:"authentication_email"` EnableSignInWithUsername *bool `access:"authentication_email"` SendEmailNotifications *bool `access:"site_notifications"` UseChannelInEmailNotifications *bool `access:"experimental_features"` RequireEmailVerification *bool `access:"authentication_email"` FeedbackName *string `access:"site_notifications"` FeedbackEmail *string `access:"site_notifications,cloud_restrictable"` ReplyToAddress *string `access:"site_notifications,cloud_restrictable"` FeedbackOrganization *string `access:"site_notifications"` EnableSMTPAuth *bool `access:"environment_smtp,write_restrictable,cloud_restrictable"` SMTPUsername *string `access:"environment_smtp,write_restrictable,cloud_restrictable"` // telemetry: none SMTPPassword *string `access:"environment_smtp,write_restrictable,cloud_restrictable"` // telemetry: none SMTPServer *string `access:"environment_smtp,write_restrictable,cloud_restrictable"` // telemetry: none SMTPPort *string `access:"environment_smtp,write_restrictable,cloud_restrictable"` // telemetry: none SMTPServerTimeout *int `access:"cloud_restrictable"` ConnectionSecurity *string `access:"environment_smtp,write_restrictable,cloud_restrictable"` SendPushNotifications *bool `access:"environment_push_notification_server"` PushNotificationServer *string `access:"environment_push_notification_server"` // telemetry: none PushNotificationContents *string `access:"site_notifications"` PushNotificationBuffer *int // telemetry: none EnableEmailBatching *bool `access:"site_notifications"` EmailBatchingBufferSize *int `access:"experimental_features"` EmailBatchingInterval *int `access:"experimental_features"` EnablePreviewModeBanner *bool `access:"site_notifications"` SkipServerCertificateVerification *bool `access:"environment_smtp,write_restrictable,cloud_restrictable"` EmailNotificationContentsType *string `access:"site_notifications"` LoginButtonColor *string `access:"experimental_features"` LoginButtonBorderColor *string `access:"experimental_features"` LoginButtonTextColor *string `access:"experimental_features"` }
func (*EmailSettings) SetDefaults ¶
func (s *EmailSettings) SetDefaults(isUpdate bool)
type Emoji ¶
type EmojiSearch ¶
type EncryptionMethod ¶
type EncryptionMethod struct {
Algorithm string `xml:"Algorithm,attr"`
}
type EntityDescriptor ¶
type EntityDescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"` EntityID string `xml:"entityID,attr"` ID string `xml:",attr,omitempty"` ValidUntil time.Time `xml:"validUntil,attr,omitempty"` CacheDuration time.Duration `xml:"cacheDuration,attr,omitempty"` RoleDescriptors []RoleDescriptor `xml:"RoleDescriptor"` IDPSSODescriptors []IDPSSODescriptor `xml:"IDPSSODescriptor"` Organization Organization `xml:"Organization"` ContactPerson ContactPerson `xml:"ContactPerson"` }
type ExperimentalAuditSettings ¶
type ExperimentalAuditSettings struct { FileEnabled *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` FileName *string `access:"experimental_features,write_restrictable,cloud_restrictable"` // telemetry: none FileMaxSizeMB *int `access:"experimental_features,write_restrictable,cloud_restrictable"` FileMaxAgeDays *int `access:"experimental_features,write_restrictable,cloud_restrictable"` FileMaxBackups *int `access:"experimental_features,write_restrictable,cloud_restrictable"` FileCompress *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` FileMaxQueueSize *int `access:"experimental_features,write_restrictable,cloud_restrictable"` AdvancedLoggingConfig *string `access:"experimental_features,write_restrictable,cloud_restrictable"` }
func (*ExperimentalAuditSettings) SetDefaults ¶
func (s *ExperimentalAuditSettings) SetDefaults()
type ExperimentalSettings ¶
type ExperimentalSettings struct { ClientSideCertEnable *bool `access:"experimental_features,cloud_restrictable"` ClientSideCertCheck *string `access:"experimental_features,cloud_restrictable"` EnableClickToReply *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` LinkMetadataTimeoutMilliseconds *int64 `access:"experimental_features,write_restrictable,cloud_restrictable"` RestrictSystemAdmin *bool `access:"experimental_features,write_restrictable"` UseNewSAMLLibrary *bool `access:"experimental_features,cloud_restrictable"` CloudUserLimit *int64 `access:"experimental_features,write_restrictable"` CloudBilling *bool `access:"experimental_features,write_restrictable"` EnableRemoteClusterService *bool `access:"experimental_features"` }
func (*ExperimentalSettings) SetDefaults ¶
func (s *ExperimentalSettings) SetDefaults()
type ExportSettings ¶
type ExportSettings struct { // The directory where to store the exported files. Directory *string // telemetry: none // The number of days to retain the exported files before deleting them. RetentionDays *int }
ExportSettings defines configuration settings for file exports.
func (*ExportSettings) SetDefaults ¶
func (s *ExportSettings) SetDefaults()
SetDefaults applies the default settings to the struct.
type ExternalDependency ¶
type FailedPayment ¶
type FeatureFlags ¶
type FeatureFlags struct { // Exists only for unit and manual testing. // When set to a value, will be returned by the ping endpoint. TestFeature string // Exists only for testing bool functionality. Boolean feature flags interpret "on" or "true" as true and // all other values as false. TestBoolFeature bool // Toggle on and off scheduled jobs for cloud user limit emails see MM-29999 CloudDelinquentEmailJobsEnabled bool // Toggle on and off support for Collapsed Threads CollapsedThreads bool // Enable the remote cluster service for shared channels. EnableRemoteClusterService bool // AppsEnabled toggles the Apps framework functionalities both in server and client side AppsEnabled bool // AppBarEnabled toggles the App Bar component on client side AppBarEnabled bool // Feature flags to control plugin versions PluginPlaybooks string `plugin_id:"playbooks"` PluginApps string `plugin_id:"com.mattermost.apps"` PluginFocalboard string `plugin_id:"focalboard"` PermalinkPreviews bool // Enable the Global Header GlobalHeader bool // Enable different team menu button treatments, possible values = ("none", "by_team_name", "inverted_sidebar_bg_color") AddChannelButton string // Determine whether when a user gets created, they'll have noisy notifications e.g. Send desktop notifications for all activity NewAccountNoisy bool // Enable Calls plugin support in the mobile app CallsMobile bool // Start A/B tour tips automatically, possible values = ("none", "auto") AutoTour string // A dash separated list for feature flags to turn on for Boards BoardsFeatureFlags string // A/B test for the add members to channel button, possible values = ("top", "bottom") AddMembersToChannel string // Enable Create First Channel GuidedChannelCreation bool // Determine after which duration in hours to send a second invitation to someone that didn't join after the initial invite, possible values = ("48", "72") ResendInviteEmailInterval string // A/B test for whether radio buttons or toggle button is more effective in in-screen invite to team modal ("none", "toggle") InviteToTeam string // Enable inline post editing InlinePostEditing bool // Enable DataRetention for Boards BoardsDataRetention bool NormalizeLdapDNs bool }
func (*FeatureFlags) Plugins ¶
func (f *FeatureFlags) Plugins() map[string]string
func (*FeatureFlags) SetDefaults ¶
func (f *FeatureFlags) SetDefaults()
func (*FeatureFlags) ToMap ¶
func (f *FeatureFlags) ToMap() map[string]string
ToMap returns the feature flags as a map[string]string Supports boolean and string feature flags.
type Features ¶
type Features struct { Users *int `json:"users"` LDAP *bool `json:"ldap"` LDAPGroups *bool `json:"ldap_groups"` MFA *bool `json:"mfa"` GoogleOAuth *bool `json:"google_oauth"` Office365OAuth *bool `json:"office365_oauth"` OpenId *bool `json:"openid"` Compliance *bool `json:"compliance"` Cluster *bool `json:"cluster"` Metrics *bool `json:"metrics"` MHPNS *bool `json:"mhpns"` SAML *bool `json:"saml"` Elasticsearch *bool `json:"elastic_search"` Announcement *bool `json:"announcement"` ThemeManagement *bool `json:"theme_management"` EmailNotificationContents *bool `json:"email_notification_contents"` DataRetention *bool `json:"data_retention"` MessageExport *bool `json:"message_export"` CustomPermissionsSchemes *bool `json:"custom_permissions_schemes"` CustomTermsOfService *bool `json:"custom_terms_of_service"` GuestAccounts *bool `json:"guest_accounts"` GuestAccountsPermissions *bool `json:"guest_accounts_permissions"` IDLoadedPushNotifications *bool `json:"id_loaded"` LockTeammateNameDisplay *bool `json:"lock_teammate_name_display"` EnterprisePlugins *bool `json:"enterprise_plugins"` AdvancedLogging *bool `json:"advanced_logging"` Cloud *bool `json:"cloud"` RemoteClusterService *bool `json:"remote_cluster_service"` // after we enabled more features we'll need to control them with this FutureFeatures *bool `json:"future_features"` }
func (*Features) SetDefaults ¶
func (f *Features) SetDefaults()
type FileForIndexing ¶
type FileInfo ¶
type FileInfo struct { Id string `json:"id"` CreatorId string `json:"user_id"` PostId string `json:"post_id,omitempty"` ChannelId string `db:"-" json:"channel_id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` Path string `json:"-"` // not sent back to the client ThumbnailPath string `json:"-"` // not sent back to the client PreviewPath string `json:"-"` // not sent back to the client Name string `json:"name"` Extension string `json:"extension"` Size int64 `json:"size"` MimeType string `json:"mime_type"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` HasPreviewImage bool `json:"has_preview_image,omitempty"` MiniPreview *[]byte `json:"mini_preview"` // declared as *[]byte to avoid postgres/mysql differences in deserialization Content string `json:"-"` RemoteId *string `json:"remote_id"` }
type FileInfoList ¶
type FileInfoList struct { Order []string `json:"order"` FileInfos map[string]*FileInfo `json:"file_infos"` NextFileInfoId string `json:"next_file_info_id"` PrevFileInfoId string `json:"prev_file_info_id"` }
func NewFileInfoList ¶
func NewFileInfoList() *FileInfoList
func (*FileInfoList) AddFileInfo ¶
func (o *FileInfoList) AddFileInfo(fileInfo *FileInfo)
func (*FileInfoList) AddOrder ¶
func (o *FileInfoList) AddOrder(id string)
func (*FileInfoList) Etag ¶
func (o *FileInfoList) Etag() string
func (*FileInfoList) Extend ¶
func (o *FileInfoList) Extend(other *FileInfoList)
func (*FileInfoList) MakeNonNil ¶
func (o *FileInfoList) MakeNonNil()
func (*FileInfoList) SortByCreateAt ¶
func (o *FileInfoList) SortByCreateAt()
func (*FileInfoList) ToSlice ¶
func (o *FileInfoList) ToSlice() []*FileInfo
func (*FileInfoList) UniqueOrder ¶
func (o *FileInfoList) UniqueOrder()
type FileInfoSearchMatches ¶
type FileInfoSearchResults ¶
type FileInfoSearchResults struct { *FileInfoList Matches FileInfoSearchMatches `json:"matches"` }
func MakeFileInfoSearchResults ¶
func MakeFileInfoSearchResults(fileInfos *FileInfoList, matches FileInfoSearchMatches) *FileInfoSearchResults
type FileSettings ¶
type FileSettings struct { EnableFileAttachments *bool `access:"site_file_sharing_and_downloads,cloud_restrictable"` EnableMobileUpload *bool `access:"site_file_sharing_and_downloads,cloud_restrictable"` EnableMobileDownload *bool `access:"site_file_sharing_and_downloads,cloud_restrictable"` MaxFileSize *int64 `access:"environment_file_storage,cloud_restrictable"` MaxImageResolution *int64 `access:"environment_file_storage,cloud_restrictable"` DriverName *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` Directory *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` EnablePublicLink *bool `access:"site_public_links,cloud_restrictable"` ExtractContent *bool `access:"environment_file_storage,write_restrictable"` ArchiveRecursion *bool `access:"environment_file_storage,write_restrictable"` PublicLinkSalt *string `access:"site_public_links,cloud_restrictable"` // telemetry: none InitialFont *string `access:"environment_file_storage,cloud_restrictable"` // telemetry: none AmazonS3AccessKeyId *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none AmazonS3SecretAccessKey *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none AmazonS3Bucket *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none AmazonS3PathPrefix *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none AmazonS3Region *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none AmazonS3Endpoint *string `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none AmazonS3SSL *bool `access:"environment_file_storage,write_restrictable,cloud_restrictable"` AmazonS3SignV2 *bool `access:"environment_file_storage,write_restrictable,cloud_restrictable"` AmazonS3SSE *bool `access:"environment_file_storage,write_restrictable,cloud_restrictable"` AmazonS3Trace *bool `access:"environment_file_storage,write_restrictable,cloud_restrictable"` }
func (*FileSettings) SetDefaults ¶
func (s *FileSettings) SetDefaults(isUpdate bool)
func (*FileSettings) ToFileBackendSettings ¶
func (s *FileSettings) ToFileBackendSettings(enableComplianceFeature bool) filestore.FileBackendSettings
type FileUploadResponse ¶
type GetFileInfosOptions ¶
type GetFileInfosOptions struct { // UserIds optionally limits the FileInfos to those created by the given users. UserIds []string `json:"user_ids"` // ChannelIds optionally limits the FileInfos to those created in the given channels. ChannelIds []string `json:"channel_ids"` // Since optionally limits FileInfos to those created at or after the given time, specified as Unix time in milliseconds. Since int64 `json:"since"` // IncludeDeleted if set includes deleted FileInfos. IncludeDeleted bool `json:"include_deleted"` // SortBy sorts the FileInfos by this field. The default is to sort by date created. SortBy string `json:"sort_by"` // SortDescending changes the sort direction to descending order when true. SortDescending bool `json:"sort_descending"` }
GetFileInfosOptions contains options for getting FileInfos
type GetPostsOptions ¶
type GetPostsSinceOptions ¶
type GetUserThreadsOpts ¶
type GetUserThreadsOpts struct { // PageSize specifies the size of the returned chunk of results. Default = 30 PageSize uint64 // Extended will enrich the response with participant details. Default = false Extended bool // Deleted will specify that even deleted threads should be returned (For mobile sync). Default = false Deleted bool // Since filters the threads based on their LastUpdateAt timestamp. Since uint64 // Before specifies thread id as a cursor for pagination and will return `PageSize` threads before the cursor Before string // After specifies thread id as a cursor for pagination and will return `PageSize` threads after the cursor After string // Unread will make sure that only threads with unread replies are returned Unread bool // TotalsOnly will not fetch any threads and just fetch the total counts TotalsOnly bool // TeamOnly will only fetch threads and unreads for the specified team and excludes DMs/GMs TeamOnly bool }
type GetUsersForSyncFilter ¶
type GlobalRelayMessageExportSettings ¶
type GlobalRelayMessageExportSettings struct { CustomerType *string `access:"compliance_compliance_export"` // must be either A9 or A10, dictates SMTP server url SMTPUsername *string `access:"compliance_compliance_export"` SMTPPassword *string `access:"compliance_compliance_export"` EmailAddress *string `access:"compliance_compliance_export"` // the address to send messages to SMTPServerTimeout *int `access:"compliance_compliance_export"` }
func (*GlobalRelayMessageExportSettings) SetDefaults ¶
func (s *GlobalRelayMessageExportSettings) SetDefaults()
type GlobalRetentionPolicy ¶
type GlobalRetentionPolicy struct { MessageDeletionEnabled bool `json:"message_deletion_enabled"` FileDeletionEnabled bool `json:"file_deletion_enabled"` BoardsDeletionEnabled bool `json:"boards_deletion_enabled"` MessageRetentionCutoff int64 `json:"message_retention_cutoff"` FileRetentionCutoff int64 `json:"file_retention_cutoff"` BoardsRetentionCutoff int64 `json:"boards_retention_cutoff"` }
type Group ¶
type Group struct { Id string `json:"id"` Name *string `json:"name,omitempty"` DisplayName string `json:"display_name"` Description string `json:"description"` Source GroupSource `json:"source"` RemoteId string `json:"remote_id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` HasSyncables bool `db:"-" json:"has_syncables"` MemberCount *int `db:"-" json:"member_count,omitempty"` AllowReference bool `json:"allow_reference"` }
func (*Group) IsValidForCreate ¶
func (*Group) IsValidForUpdate ¶
func (*Group) IsValidName ¶
func (*Group) Patch ¶
func (group *Group) Patch(patch *GroupPatch)
type GroupMember ¶
type GroupMember struct { GroupId string `json:"group_id"` UserId string `json:"user_id"` CreateAt int64 `json:"create_at"` DeleteAt int64 `json:"delete_at"` }
func (*GroupMember) IsValid ¶
func (gm *GroupMember) IsValid() *AppError
type GroupPatch ¶
type GroupSearchOpts ¶
type GroupSearchOpts struct { Q string NotAssociatedToTeam string NotAssociatedToChannel string IncludeMemberCount bool FilterAllowReference bool PageOpts *PageOpts Since int64 // FilterParentTeamPermitted filters the groups to the intersect of the // set associated to the parent team and those returned by the query. // If the parent team is not group-constrained or if NotAssociatedToChannel // is not set then this option is ignored. FilterParentTeamPermitted bool }
type GroupSource ¶
type GroupSource string
type GroupStats ¶
type GroupSyncable ¶
type GroupSyncable struct { GroupId string `json:"group_id"` // SyncableId represents the Id of the model that is being synced with the group, for example a ChannelId or // TeamId. SyncableId string `db:"-" json:"-"` AutoAdd bool `json:"auto_add"` SchemeAdmin bool `json:"scheme_admin"` CreateAt int64 `json:"create_at"` DeleteAt int64 `json:"delete_at"` UpdateAt int64 `json:"update_at"` Type GroupSyncableType `db:"-" json:"-"` // Values joined in from the associated team and/or channel ChannelDisplayName string `db:"-" json:"-"` TeamDisplayName string `db:"-" json:"-"` TeamType string `db:"-" json:"-"` ChannelType string `db:"-" json:"-"` TeamID string `db:"-" json:"-"` }
func NewGroupChannel ¶
func NewGroupChannel(groupID, channelID string, autoAdd bool) *GroupSyncable
func NewGroupTeam ¶
func NewGroupTeam(groupID, teamID string, autoAdd bool) *GroupSyncable
func (*GroupSyncable) IsValid ¶
func (syncable *GroupSyncable) IsValid() *AppError
func (*GroupSyncable) MarshalJSON ¶
func (syncable *GroupSyncable) MarshalJSON() ([]byte, error)
func (*GroupSyncable) Patch ¶
func (syncable *GroupSyncable) Patch(patch *GroupSyncablePatch)
func (*GroupSyncable) UnmarshalJSON ¶
func (syncable *GroupSyncable) UnmarshalJSON(b []byte) error
type GroupSyncablePatch ¶
type GroupSyncableType ¶
type GroupSyncableType string
const ( GroupSyncableTypeTeam GroupSyncableType = "Team" GroupSyncableTypeChannel GroupSyncableType = "Channel" )
func (GroupSyncableType) String ¶
func (gst GroupSyncableType) String() string
type GroupWithSchemeAdmin ¶
type GroupsAssociatedToChannel ¶
type GroupsAssociatedToChannel struct { ChannelId string `json:"channel_id"` Groups []*GroupWithSchemeAdmin `json:"groups"` }
type GuestAccountsSettings ¶
type GuestAccountsSettings struct { Enable *bool `access:"authentication_guest_access"` AllowEmailAccounts *bool `access:"authentication_guest_access"` EnforceMultifactorAuthentication *bool `access:"authentication_guest_access"` RestrictCreationToDomains *string `access:"authentication_guest_access"` }
func (*GuestAccountsSettings) SetDefaults ¶
func (s *GuestAccountsSettings) SetDefaults()
type GuestsInvite ¶
type GuestsInvite struct { Emails []string `json:"emails"` Channels []string `json:"channels"` Message string `json:"message"` }
func (*GuestsInvite) IsValid ¶
func (i *GuestsInvite) IsValid() *AppError
IsValid validates the user and returns an error if it isn't configured correctly.
type IDPSSODescriptor ¶
type IDPSSODescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata IDPSSODescriptor"` SSODescriptor WantAuthnRequestsSigned *bool `xml:",attr"` SingleSignOnServices []Endpoint `xml:"SingleSignOnService"` NameIDMappingServices []Endpoint `xml:"NameIDMappingService"` AssertionIDRequestServices []Endpoint `xml:"AssertionIDRequestService"` AttributeProfiles []string `xml:"AttributeProfile"` Attributes []Attribute `xml:"Attribute"` }
type ImageProxySettings ¶
type ImageProxySettings struct { Enable *bool `access:"environment_image_proxy"` ImageProxyType *string `access:"environment_image_proxy"` RemoteImageProxyURL *string `access:"environment_image_proxy"` RemoteImageProxyOptions *string `access:"environment_image_proxy"` }
func (*ImageProxySettings) SetDefaults ¶
func (s *ImageProxySettings) SetDefaults()
type ImportSettings ¶
type ImportSettings struct { // The directory where to store the imported files. Directory *string // The number of days to retain the imported files before deleting them. RetentionDays *int }
ImportSettings defines configuration settings for file imports.
func (*ImportSettings) SetDefaults ¶
func (s *ImportSettings) SetDefaults()
SetDefaults applies the default settings to the struct.
type IncomingWebhook ¶
type IncomingWebhook struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` UserId string `json:"user_id"` ChannelId string `json:"channel_id"` TeamId string `json:"team_id"` DisplayName string `json:"display_name"` Description string `json:"description"` Username string `json:"username"` IconURL string `json:"icon_url"` ChannelLocked bool `json:"channel_locked"` }
func (*IncomingWebhook) IsValid ¶
func (o *IncomingWebhook) IsValid() *AppError
func (*IncomingWebhook) PreSave ¶
func (o *IncomingWebhook) PreSave()
func (*IncomingWebhook) PreUpdate ¶
func (o *IncomingWebhook) PreUpdate()
type IncomingWebhookRequest ¶
type IncomingWebhookRequest struct { Text string `json:"text"` Username string `json:"username"` IconURL string `json:"icon_url"` ChannelName string `json:"channel"` Props StringInterface `json:"props"` Attachments []*SlackAttachment `json:"attachments"` Type string `json:"type"` IconEmoji string `json:"icon_emoji"` }
type IndexedEndpoint ¶
type InitialLoad ¶
type InitialLoad struct { User *User `json:"user"` TeamMembers []*TeamMember `json:"team_members"` Teams []*Team `json:"teams"` Preferences Preferences `json:"preferences"` ClientCfg map[string]string `json:"client_cfg"` LicenseCfg map[string]string `json:"license_cfg"` NoAccounts bool `json:"no_accounts"` }
type InstallMarketplacePluginRequest ¶
type InstallMarketplacePluginRequest struct { Id string `json:"id"` Version string `json:"version"` }
InstallMarketplacePluginRequest struct describes parameters of the requested plugin.
func PluginRequestFromReader ¶
func PluginRequestFromReader(reader io.Reader) (*InstallMarketplacePluginRequest, error)
PluginRequestFromReader decodes a json-encoded plugin request from the given io.Reader.
type IntegrityCheckResult ¶
type IntegrityCheckResult struct { Data interface{} `json:"data"` Err error `json:"err"` }
func (*IntegrityCheckResult) UnmarshalJSON ¶
func (r *IntegrityCheckResult) UnmarshalJSON(b []byte) error
type Invites ¶
func (*Invites) ToEmailList ¶
type Invoice ¶
type Invoice struct { ID string `json:"id"` Number string `json:"number"` CreateAt int64 `json:"create_at"` Total int64 `json:"total"` Tax int64 `json:"tax"` Status string `json:"status"` Description string `json:"description"` PeriodStart int64 `json:"period_start"` PeriodEnd int64 `json:"period_end"` SubscriptionID string `json:"subscription_id"` Items []*InvoiceLineItem `json:"line_items"` CurrentProductName string `json:"current_product_name"` }
Invoice model represents a cloud invoice
type InvoiceLineItem ¶
type InvoiceLineItem struct { PriceID string `json:"price_id"` Total int64 `json:"total"` Quantity float64 `json:"quantity"` PricePerUnit int64 `json:"price_per_unit"` Description string `json:"description"` Type string `json:"type"` Metadata map[string]interface{} `json:"metadata"` }
InvoiceLineItem model represents a cloud invoice lineitem tied to an invoice.
type Job ¶
type Job struct { Id string `json:"id"` Type string `json:"type"` Priority int64 `json:"priority"` CreateAt int64 `json:"create_at"` StartAt int64 `json:"start_at"` LastActivityAt int64 `json:"last_activity_at"` Status string `json:"status"` Progress int64 `json:"progress"` Data StringMap `json:"data"` }
type JobSettings ¶
type JobSettings struct { RunJobs *bool `access:"write_restrictable,cloud_restrictable"` // telemetry: none RunScheduler *bool `access:"write_restrictable,cloud_restrictable"` // telemetry: none CleanupJobsThresholdDays *int `access:"write_restrictable,cloud_restrictable"` }
func (*JobSettings) SetDefaults ¶
func (s *JobSettings) SetDefaults()
type KeyDescriptor ¶
type LdapGroupSearchOpts ¶
type LdapSettings ¶
type LdapSettings struct { // Basic Enable *bool `access:"authentication_ldap"` EnableSync *bool `access:"authentication_ldap"` LdapServer *string `access:"authentication_ldap"` // telemetry: none LdapPort *int `access:"authentication_ldap"` // telemetry: none ConnectionSecurity *string `access:"authentication_ldap"` BaseDN *string `access:"authentication_ldap"` // telemetry: none BindUsername *string `access:"authentication_ldap"` // telemetry: none BindPassword *string `access:"authentication_ldap"` // telemetry: none // Filtering UserFilter *string `access:"authentication_ldap"` // telemetry: none GroupFilter *string `access:"authentication_ldap"` GuestFilter *string `access:"authentication_ldap"` EnableAdminFilter *bool AdminFilter *string // Group Mapping GroupDisplayNameAttribute *string `access:"authentication_ldap"` GroupIdAttribute *string `access:"authentication_ldap"` // User Mapping FirstNameAttribute *string `access:"authentication_ldap"` LastNameAttribute *string `access:"authentication_ldap"` EmailAttribute *string `access:"authentication_ldap"` UsernameAttribute *string `access:"authentication_ldap"` NicknameAttribute *string `access:"authentication_ldap"` IdAttribute *string `access:"authentication_ldap"` PositionAttribute *string `access:"authentication_ldap"` LoginIdAttribute *string `access:"authentication_ldap"` PictureAttribute *string `access:"authentication_ldap"` // Synchronization SyncIntervalMinutes *int `access:"authentication_ldap"` // Advanced SkipCertificateVerification *bool `access:"authentication_ldap"` PublicCertificateFile *string `access:"authentication_ldap"` PrivateKeyFile *string `access:"authentication_ldap"` QueryTimeout *int `access:"authentication_ldap"` MaxPageSize *int `access:"authentication_ldap"` // Customization LoginFieldName *string `access:"authentication_ldap"` LoginButtonColor *string `access:"experimental_features"` LoginButtonBorderColor *string `access:"experimental_features"` LoginButtonTextColor *string `access:"experimental_features"` Trace *bool `access:"authentication_ldap"` // telemetry: none }
func (*LdapSettings) SetDefaults ¶
func (s *LdapSettings) SetDefaults()
type License ¶
type License struct { Id string `json:"id"` IssuedAt int64 `json:"issued_at"` StartsAt int64 `json:"starts_at"` ExpiresAt int64 `json:"expires_at"` Customer *Customer `json:"customer"` Features *Features `json:"features"` SkuName string `json:"sku_name"` SkuShortName string `json:"sku_short_name"` IsTrial bool `json:"is_trial"` IsGovSku bool `json:"is_gov_sku"` }
func NewTestLicense ¶
NewTestLicense returns a license that expires in the future and has the given features.
func (*License) DaysToExpiration ¶
func (*License) HasEnterpriseMarketplacePlugins ¶
func (*License) IsPastGracePeriod ¶
func (*License) IsSanctionedTrial ¶
func (*License) IsTrialLicense ¶
func (*License) IsWithinExpirationPeriod ¶
type LicenseRecord ¶
type LicenseRecord struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` Bytes string `json:"-"` }
func (*LicenseRecord) IsValid ¶
func (lr *LicenseRecord) IsValid() *AppError
func (*LicenseRecord) PreSave ¶
func (lr *LicenseRecord) PreSave()
type LinkMetadata ¶
type LinkMetadata struct { // Hash is a value computed from the URL and Timestamp for use as a primary key in the database. Hash int64 URL string Timestamp int64 Type LinkMetadataType // Data is the actual metadata for the link. It should contain data of one of the following types: // - *model.PostImage if the linked content is an image // - *opengraph.OpenGraph if the linked content is an HTML document // - nil if the linked content has no metadata Data interface{} }
LinkMetadata stores arbitrary data about a link posted in a message. This includes dimensions of linked images and OpenGraph metadata.
func (*LinkMetadata) DeserializeDataToConcreteType ¶
func (o *LinkMetadata) DeserializeDataToConcreteType() error
DeserializeDataToConcreteType converts o.Data from JSON into properly structured data. This is intended to be used after getting a LinkMetadata object that has been stored in the database.
func (*LinkMetadata) IsValid ¶
func (o *LinkMetadata) IsValid() *AppError
func (*LinkMetadata) PreSave ¶
func (o *LinkMetadata) PreSave()
type LinkMetadataType ¶
type LinkMetadataType string
type LocalizationSettings ¶
type LocalizationSettings struct { DefaultServerLocale *string `access:"site_localization"` DefaultClientLocale *string `access:"site_localization"` AvailableLocales *string `access:"site_localization"` }
func (*LocalizationSettings) SetDefaults ¶
func (s *LocalizationSettings) SetDefaults()
type LocalizedName ¶
type LocalizedURI ¶
type LogSettings ¶
type LogSettings struct { EnableConsole *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` ConsoleLevel *string `access:"environment_logging,write_restrictable,cloud_restrictable"` ConsoleJson *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` EnableColor *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none EnableFile *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` FileLevel *string `access:"environment_logging,write_restrictable,cloud_restrictable"` FileJson *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` FileLocation *string `access:"environment_logging,write_restrictable,cloud_restrictable"` EnableWebhookDebugging *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` EnableDiagnostics *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none EnableSentry *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none AdvancedLoggingConfig *string `access:"environment_logging,write_restrictable,cloud_restrictable"` }
func NewLogSettings ¶
func NewLogSettings() *LogSettings
func (*LogSettings) SetDefaults ¶
func (s *LogSettings) SetDefaults()
type Manifest ¶
type Manifest struct { // The id is a globally unique identifier that represents your plugin. Ids must be at least // 3 characters, at most 190 characters and must match ^[a-zA-Z0-9-_\.]+$. // Reverse-DNS notation using a name you control is a good option, e.g. "com.mycompany.myplugin". Id string `json:"id" yaml:"id"` // The name to be displayed for the plugin. Name string `json:"name" yaml:"name"` // A description of what your plugin is and does. Description string `json:"description,omitempty" yaml:"description,omitempty"` // HomepageURL is an optional link to learn more about the plugin. HomepageURL string `json:"homepage_url,omitempty" yaml:"homepage_url,omitempty"` // SupportURL is an optional URL where plugin issues can be reported. SupportURL string `json:"support_url,omitempty" yaml:"support_url,omitempty"` // ReleaseNotesURL is an optional URL where a changelog for the release can be found. ReleaseNotesURL string `json:"release_notes_url,omitempty" yaml:"release_notes_url,omitempty"` // A relative file path in the bundle that points to the plugins svg icon for use with the Plugin Marketplace. // This should be relative to the root of your bundle and the location of the manifest file. Bitmap image formats are not supported. IconPath string `json:"icon_path,omitempty" yaml:"icon_path,omitempty"` // A version number for your plugin. Semantic versioning is recommended: http://semver.org Version string `json:"version" yaml:"version"` // The minimum Mattermost server version required for your plugin. // // Minimum server version: 5.6 MinServerVersion string `json:"min_server_version,omitempty" yaml:"min_server_version,omitempty"` // Server defines the server-side portion of your plugin. Server *ManifestServer `json:"server,omitempty" yaml:"server,omitempty"` // If your plugin extends the web app, you'll need to define webapp. Webapp *ManifestWebapp `json:"webapp,omitempty" yaml:"webapp,omitempty"` // To allow administrators to configure your plugin via the Mattermost system console, you can // provide your settings schema. SettingsSchema *PluginSettingsSchema `json:"settings_schema,omitempty" yaml:"settings_schema,omitempty"` // Plugins can store any kind of data in Props to allow other plugins to use it. Props map[string]interface{} `json:"props,omitempty" yaml:"props,omitempty"` // RequiredConfig defines any required server configuration fields for the plugin to function properly. // // Use the pluginapi.Configuration.CheckRequiredServerConfiguration method to enforce this. RequiredConfig *Config `json:"required_configuration,omitempty" yaml:"required_configuration,omitempty"` }
The plugin manifest defines the metadata required to load and present your plugin. The manifest file should be named plugin.json or plugin.yaml and placed in the top of your plugin bundle.
Example plugin.json:
{ "id": "com.mycompany.myplugin", "name": "My Plugin", "description": "This is my plugin", "homepage_url": "https://example.com", "support_url": "https://example.com/support", "release_notes_url": "https://example.com/releases/v0.0.1", "icon_path": "assets/logo.svg", "version": "0.1.0", "min_server_version": "5.6.0", "server": { "executables": { "linux-amd64": "server/dist/plugin-linux-amd64", "darwin-amd64": "server/dist/plugin-darwin-amd64", "windows-amd64": "server/dist/plugin-windows-amd64.exe" } }, "webapp": { "bundle_path": "webapp/dist/main.js" }, "settings_schema": { "header": "Some header text", "footer": "Some footer text", "settings": [{ "key": "someKey", "display_name": "Enable Extra Feature", "type": "bool", "help_text": "When true, an extra feature will be enabled!", "default": "false" }] }, "props": { "someKey": "someData" } }
func FindManifest ¶
FindManifest will find and parse the manifest in a given directory.
In all cases other than a does-not-exist error, path is set to the path of the manifest file that was found.
Manifests are JSON or YAML files named plugin.json, plugin.yaml, or plugin.yml.
func (*Manifest) ClientManifest ¶
func (*Manifest) GetExecutableForRuntime ¶
GetExecutableForRuntime returns the path to the executable for the given runtime architecture.
If the manifest defines multiple executables, but none match, or if only a single executable is defined, the Executable field will be returned. This method does not guarantee that the resulting binary can actually execute on the given platform.
type ManifestExecutables
deprecated
type ManifestExecutables struct { // LinuxAmd64 is the path to your executable binary for the corresponding platform LinuxAmd64 string `json:"linux-amd64,omitempty" yaml:"linux-amd64,omitempty"` // DarwinAmd64 is the path to your executable binary for the corresponding platform DarwinAmd64 string `json:"darwin-amd64,omitempty" yaml:"darwin-amd64,omitempty"` // WindowsAmd64 is the path to your executable binary for the corresponding platform // This file must have a ".exe" extension WindowsAmd64 string `json:"windows-amd64,omitempty" yaml:"windows-amd64,omitempty"` }
Deprecated: ManifestExecutables is a legacy structure capturing a subset of the known platform executables. It will be remove in v7.0: https://mattermost.atlassian.net/browse/MM-40531
type ManifestServer ¶
type ManifestServer struct { // Executables are the paths to your executable binaries, specifying multiple entry // points for different platforms when bundled together in a single plugin. Executables map[string]string `json:"executables,omitempty" yaml:"executables,omitempty"` // Executable is the path to your executable binary. This should be relative to the root // of your bundle and the location of the manifest file. // // On Windows, this file must have a ".exe" extension. // // If your plugin is compiled for multiple platforms, consider bundling them together // and using the Executables field instead. Executable string `json:"executable" yaml:"executable"` }
type ManifestWebapp ¶
type ManifestWebapp struct { // The path to your webapp bundle. This should be relative to the root of your bundle and the // location of the manifest file. BundlePath string `json:"bundle_path" yaml:"bundle_path"` // BundleHash is the 64-bit FNV-1a hash of the webapp bundle, computed when the plugin is loaded BundleHash []byte `json:"-"` }
type MarketplaceLabel ¶
type MarketplaceLabel struct { Name string `json:"name"` Description string `json:"description"` URL string `json:"url"` Color string `json:"color"` }
MarketplaceLabel represents a label shown in the Marketplace UI.
type MarketplacePlugin ¶
type MarketplacePlugin struct { *BaseMarketplacePlugin InstalledVersion string `json:"installed_version"` }
MarketplacePlugin is a state aware Marketplace plugin.
func MarketplacePluginsFromReader ¶
func MarketplacePluginsFromReader(reader io.Reader) ([]*MarketplacePlugin, error)
MarketplacePluginsFromReader decodes a json-encoded list of plugins from the given io.Reader.
type MarketplacePluginFilter ¶
type MarketplacePluginFilter struct { Page int PerPage int Filter string ServerVersion string BuildEnterpriseReady bool EnterprisePlugins bool Cloud bool LocalOnly bool Platform string PluginId string ReturnAllVersions bool }
MarketplacePluginFilter describes the parameters to request a list of plugins.
func (*MarketplacePluginFilter) ApplyToURL ¶
func (filter *MarketplacePluginFilter) ApplyToURL(u *url.URL)
ApplyToURL modifies the given url to include query string parameters for the request.
type MessageExport ¶
type MessageExport struct { TeamId *string TeamName *string TeamDisplayName *string ChannelId *string ChannelName *string ChannelDisplayName *string ChannelType *ChannelType UserId *string UserEmail *string Username *string IsBot bool PostId *string PostCreateAt *int64 PostUpdateAt *int64 PostDeleteAt *int64 PostMessage *string PostType *string PostRootId *string PostProps *string PostOriginalId *string PostFileIds StringArray }
func (*MessageExport) PreviewID ¶
func (m *MessageExport) PreviewID() string
PreviewID returns the value of the post's previewed_post prop, if present, or an empty string.
type MessageExportCursor ¶
type MessageExportSettings ¶
type MessageExportSettings struct { EnableExport *bool `access:"compliance_compliance_export"` ExportFormat *string `access:"compliance_compliance_export"` DailyRunTime *string `access:"compliance_compliance_export"` ExportFromTimestamp *int64 `access:"compliance_compliance_export"` BatchSize *int `access:"compliance_compliance_export"` DownloadExportResults *bool `access:"compliance_compliance_export"` // formatter-specific settings - these are only expected to be non-nil if ExportFormat is set to the associated format GlobalRelaySettings *GlobalRelayMessageExportSettings `access:"compliance_compliance_export"` }
func (*MessageExportSettings) SetDefaults ¶
func (s *MessageExportSettings) SetDefaults()
type MetricsSettings ¶
type MetricsSettings struct { Enable *bool `access:"environment_performance_monitoring,write_restrictable,cloud_restrictable"` BlockProfileRate *int `access:"environment_performance_monitoring,write_restrictable,cloud_restrictable"` ListenAddress *string `access:"environment_performance_monitoring,write_restrictable,cloud_restrictable"` // telemetry: none }
func (*MetricsSettings) SetDefaults ¶
func (s *MetricsSettings) SetDefaults()
type NameIDFormat ¶
type NativeAppSettings ¶
type NativeAppSettings struct { AppCustomURLSchemes []string `access:"site_customization,write_restrictable,cloud_restrictable"` // telemetry: none AppDownloadLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` AndroidAppDownloadLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` IosAppDownloadLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` }
func (*NativeAppSettings) SetDefaults ¶
func (s *NativeAppSettings) SetDefaults()
type NoticeAction ¶
type NoticeAction string
Optional action to perform on action button click. (defaults to closing the notice)
Possible actions to execute on button press
const (
URL NoticeAction = "url"
)
type NoticeAudience ¶
type NoticeAudience string
User role, i.e. who will see the notice. Defaults to "all"
const ( NoticeAudienceAll NoticeAudience = "all" NoticeAudienceMember NoticeAudience = "member" NoticeAudienceSysadmin NoticeAudience = "sysadmin" NoticeAudienceTeamAdmin NoticeAudience = "teamadmin" )
func NewNoticeAudience ¶
func NewNoticeAudience(s NoticeAudience) *NoticeAudience
type NoticeClientType ¶
type NoticeClientType string
Only show the notice on specific clients. Defaults to 'all'
Client type. Defaults to "all"
const ( NoticeClientTypeAll NoticeClientType = "all" NoticeClientTypeDesktop NoticeClientType = "desktop" NoticeClientTypeMobile NoticeClientType = "mobile" NoticeClientTypeMobileAndroid NoticeClientType = "mobile-android" NoticeClientTypeMobileIos NoticeClientType = "mobile-ios" NoticeClientTypeWeb NoticeClientType = "web" )
func NewNoticeClientType ¶
func NewNoticeClientType(s NoticeClientType) *NoticeClientType
func NoticeClientTypeFromString ¶
func NoticeClientTypeFromString(s string) (NoticeClientType, error)
func (*NoticeClientType) Matches ¶
func (c *NoticeClientType) Matches(other NoticeClientType) bool
type NoticeInstanceType ¶
type NoticeInstanceType string
Instance type. Defaults to "both"
const ( NoticeInstanceTypeBoth NoticeInstanceType = "both" NoticeInstanceTypeCloud NoticeInstanceType = "cloud" NoticeInstanceTypeOnPrem NoticeInstanceType = "onprem" )
func NewNoticeInstanceType ¶
func NewNoticeInstanceType(n NoticeInstanceType) *NoticeInstanceType
func (*NoticeInstanceType) Matches ¶
func (t *NoticeInstanceType) Matches(isCloud bool) bool
type NoticeMessage ¶
type NoticeMessage struct { NoticeMessageInternal ID string `json:"id"` SysAdminOnly bool `json:"sysAdminOnly"` TeamAdminOnly bool `json:"teamAdminOnly"` }
type NoticeMessageInternal ¶
type NoticeMessageInternal struct { Action *NoticeAction `json:"action,omitempty"` // Optional action to perform on action button click. (defaults to closing the notice) ActionParam *string `json:"actionParam,omitempty"` // Optional action parameter.; Example: {"action": "url", actionParam: "/console/some-page"} ActionText *string `json:"actionText,omitempty"` // Optional override for the action button text (defaults to OK) Description string `json:"description"` // Notice content. Use {{Mattermost}} instead of plain text to support white-labeling. Text; supports Markdown. Image *string `json:"image,omitempty"` Title string `json:"title"` // Notice title. Use {{Mattermost}} instead of plain text to support white-labeling. Text; supports Markdown. }
type NoticeMessages ¶
type NoticeMessages []NoticeMessage
func UnmarshalProductNoticeMessages ¶
func UnmarshalProductNoticeMessages(data io.Reader) (NoticeMessages, error)
func (*NoticeMessages) Marshal ¶
func (r *NoticeMessages) Marshal() ([]byte, error)
type NotificationLogSettings ¶
type NotificationLogSettings struct { EnableConsole *bool `access:"write_restrictable,cloud_restrictable"` ConsoleLevel *string `access:"write_restrictable,cloud_restrictable"` ConsoleJson *bool `access:"write_restrictable,cloud_restrictable"` EnableColor *bool `access:"write_restrictable,cloud_restrictable"` // telemetry: none EnableFile *bool `access:"write_restrictable,cloud_restrictable"` FileLevel *string `access:"write_restrictable,cloud_restrictable"` FileJson *bool `access:"write_restrictable,cloud_restrictable"` FileLocation *string `access:"write_restrictable,cloud_restrictable"` AdvancedLoggingConfig *string `access:"write_restrictable,cloud_restrictable"` }
func (*NotificationLogSettings) SetDefaults ¶
func (s *NotificationLogSettings) SetDefaults()
type OAuthApp ¶
type OAuthApp struct { Id string `json:"id"` CreatorId string `json:"creator_id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` ClientSecret string `json:"client_secret"` Name string `json:"name"` Description string `json:"description"` IconURL string `json:"icon_url"` CallbackUrls StringArray `json:"callback_urls"` Homepage string `json:"homepage"` IsTrusted bool `json:"is_trusted"` }
func (*OAuthApp) IsValid ¶
IsValid validates the app and returns an error if it isn't configured correctly.
func (*OAuthApp) IsValidRedirectURL ¶
func (*OAuthApp) PreSave ¶
func (a *OAuthApp) PreSave()
PreSave will set the Id and ClientSecret if missing. It will also fill in the CreateAt, UpdateAt times. It should be run before saving the app to the db.
type Office365Settings ¶
type Office365Settings struct { Enable *bool `access:"authentication_openid"` Secret *string `access:"authentication_openid"` // telemetry: none Id *string `access:"authentication_openid"` // telemetry: none Scope *string `access:"authentication_openid"` AuthEndpoint *string `access:"authentication_openid"` // telemetry: none TokenEndpoint *string `access:"authentication_openid"` // telemetry: none UserAPIEndpoint *string `access:"authentication_openid"` // telemetry: none DiscoveryEndpoint *string `access:"authentication_openid"` // telemetry: none DirectoryId *string `access:"authentication_openid"` // telemetry: none }
func (*Office365Settings) SSOSettings ¶
func (s *Office365Settings) SSOSettings() *SSOSettings
type OpenDialogRequest ¶
type OpenDialogRequest struct { TriggerId string `json:"trigger_id"` URL string `json:"url"` Dialog Dialog `json:"dialog"` }
func (*OpenDialogRequest) DecodeAndVerifyTriggerId ¶
func (r *OpenDialogRequest) DecodeAndVerifyTriggerId(s *ecdsa.PrivateKey) (string, string, *AppError)
type OrderedSidebarCategories ¶
type OrderedSidebarCategories struct { Categories SidebarCategoriesWithChannels `json:"categories"` Order SidebarCategoryOrder `json:"order"` }
OrderedSidebarCategories combines categories, their channel IDs and an array of Category IDs, sorted
type Organization ¶
type Organization struct { XMLName xml.Name OrganizationNames []LocalizedName `xml:"OrganizationName"` OrganizationDisplayNames []LocalizedName `xml:"OrganizationDisplayName"` OrganizationURLs []LocalizedURI `xml:"OrganizationURL"` }
type OrphanedRecord ¶
type OutgoingWebhook ¶
type OutgoingWebhook 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"` ChannelId string `json:"channel_id"` TeamId string `json:"team_id"` TriggerWords StringArray `json:"trigger_words"` TriggerWhen int `json:"trigger_when"` CallbackURLs StringArray `json:"callback_urls"` DisplayName string `json:"display_name"` Description string `json:"description"` ContentType string `json:"content_type"` Username string `json:"username"` IconURL string `json:"icon_url"` }
func (*OutgoingWebhook) GetTriggerWord ¶
func (o *OutgoingWebhook) GetTriggerWord(word string, isExactMatch bool) (triggerWord string)
func (*OutgoingWebhook) IsValid ¶
func (o *OutgoingWebhook) IsValid() *AppError
func (*OutgoingWebhook) PreSave ¶
func (o *OutgoingWebhook) PreSave()
func (*OutgoingWebhook) PreUpdate ¶
func (o *OutgoingWebhook) PreUpdate()
func (*OutgoingWebhook) TriggerWordExactMatch ¶
func (o *OutgoingWebhook) TriggerWordExactMatch(word string) bool
func (*OutgoingWebhook) TriggerWordStartsWith ¶
func (o *OutgoingWebhook) TriggerWordStartsWith(word string) bool
type OutgoingWebhookPayload ¶
type OutgoingWebhookPayload struct { Token string `json:"token"` TeamId string `json:"team_id"` TeamDomain string `json:"team_domain"` ChannelId string `json:"channel_id"` ChannelName string `json:"channel_name"` Timestamp int64 `json:"timestamp"` UserId string `json:"user_id"` UserName string `json:"user_name"` PostId string `json:"post_id"` Text string `json:"text"` TriggerWord string `json:"trigger_word"` FileIds string `json:"file_ids"` }
func (*OutgoingWebhookPayload) ToFormValues ¶
func (o *OutgoingWebhookPayload) ToFormValues() string
type OutgoingWebhookResponse ¶
type OutgoingWebhookResponse struct { Text *string `json:"text"` Username string `json:"username"` IconURL string `json:"icon_url"` Props StringInterface `json:"props"` Attachments []*SlackAttachment `json:"attachments"` Type string `json:"type"` ResponseType string `json:"response_type"` }
type PasswordSettings ¶
type PasswordSettings struct { MinimumLength *int `access:"authentication_password"` Lowercase *bool `access:"authentication_password"` Number *bool `access:"authentication_password"` Uppercase *bool `access:"authentication_password"` Symbol *bool `access:"authentication_password"` }
func (*PasswordSettings) SetDefaults ¶
func (s *PasswordSettings) SetDefaults()
type PaymentMethod ¶
type PaymentMethod struct { Type string `json:"type"` LastFour string `json:"last_four"` ExpMonth int `json:"exp_month"` ExpYear int `json:"exp_year"` CardBrand string `json:"card_brand"` Name string `json:"name"` }
PaymentMethod represents methods of payment for a customer.
type Permalink ¶
type Permalink struct {
PreviewPost *PreviewPost `json:"preview_post"`
}
type Permission ¶
type Permission struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Scope string `json:"scope"` }
var PermissionAddLdapPrivateCert *Permission
var PermissionAddLdapPublicCert *Permission
var PermissionAddReaction *Permission
var PermissionAddSamlIdpCert *Permission
var PermissionAddSamlPrivateCert *Permission
var PermissionAddSamlPublicCert *Permission
var PermissionAddUserToTeam *Permission
var PermissionAssignBot *Permission
var PermissionAssignSystemAdminRole *Permission
var PermissionConvertPrivateChannelToPublic *Permission
var PermissionConvertPublicChannelToPrivate *Permission
var PermissionCreateBot *Permission
var PermissionCreateComplianceExportJob *Permission
var PermissionCreateDataRetentionJob *Permission
var PermissionCreateDirectChannel *Permission
var PermissionCreateElasticsearchPostAggregationJob *Permission
var PermissionCreateElasticsearchPostIndexingJob *Permission
var PermissionCreateEmojis *Permission
var PermissionCreateGroupChannel *Permission
var PermissionCreateLdapSyncJob *Permission
var PermissionCreatePost *Permission
var PermissionCreatePostBleveIndexesJob *Permission
var PermissionCreatePostEphemeral *Permission
var PermissionCreatePostPublic *Permission
var PermissionCreatePrivateChannel *Permission
var PermissionCreatePublicChannel *Permission
var PermissionCreateTeam *Permission
var PermissionCreateUserAccessToken *Permission
var PermissionDeleteEmojis *Permission
var PermissionDeleteOthersEmojis *Permission
var PermissionDeleteOthersPosts *Permission
var PermissionDeletePost *Permission
var PermissionDeletePrivateChannel *Permission
var PermissionDeletePublicChannel *Permission
var PermissionDemoteToGuest *Permission
var PermissionDownloadComplianceExportResult *Permission
var PermissionEditBrand *Permission
var PermissionEditOtherUsers *Permission
var PermissionEditOthersPosts *Permission
var PermissionEditPost *Permission
var PermissionGetAnalytics *Permission
var PermissionGetLogs *Permission
var PermissionGetPublicLink *Permission
var PermissionGetSamlCertStatus *Permission
var PermissionGetSamlMetadataFromIdp *Permission
var PermissionImportTeam *Permission
var PermissionInvalidateCaches *Permission
var PermissionInvalidateEmailInvite *Permission
var PermissionInviteGuest *Permission
var PermissionInviteUser *Permission
var PermissionJoinPrivateTeams *Permission
var PermissionJoinPublicChannels *Permission
var PermissionJoinPublicTeams *Permission
var PermissionListPrivateTeams *Permission
var PermissionListPublicTeams *Permission
var PermissionListTeamChannels *Permission
var PermissionListUsersWithoutTeam *Permission
var PermissionManageBots *Permission
var PermissionManageChannelRoles *Permission
var PermissionManageEmojis *Permission
var PermissionManageIncomingWebhooks *Permission
var PermissionManageJobs *Permission
var PermissionManageLicenseInformation *Permission
var PermissionManageOAuth *Permission
var PermissionManageOthersBots *Permission
var PermissionManageOthersEmojis *Permission
var PermissionManageOthersIncomingWebhooks *Permission
var PermissionManageOthersOutgoingWebhooks *Permission
var PermissionManageOthersSlashCommands *Permission
var PermissionManageOthersWebhooks *Permission
var PermissionManageOutgoingWebhooks *Permission
var PermissionManagePrivateChannelMembers *Permission
var PermissionManagePrivateChannelProperties *Permission
var PermissionManagePublicChannelMembers *Permission
var PermissionManagePublicChannelProperties *Permission
var PermissionManageRoles *Permission
var PermissionManageSecureConnections *Permission
var PermissionManageSlashCommands *Permission
var PermissionManageSystem *Permission
General permission that encompasses all system admin functions in the future this could be broken up to allow access to some admin functions but not others
var PermissionManageSystemWideOAuth *Permission
var PermissionManageTeam *Permission
var PermissionManageTeamRoles *Permission
var PermissionManageWebhooks *Permission
var PermissionPermanentDeleteUser *Permission
var PermissionPrivatePlaybookCreate *Permission
var PermissionPrivatePlaybookMakePublic *Permission
var PermissionPrivatePlaybookManageMembers *Permission
var PermissionPrivatePlaybookManageProperties *Permission
var PermissionPrivatePlaybookView *Permission
var PermissionPromoteGuest *Permission
var PermissionPublicPlaybookCreate *Permission
var PermissionPublicPlaybookMakePrivate *Permission
var PermissionPublicPlaybookManageMembers *Permission
var PermissionPublicPlaybookManageProperties *Permission
var PermissionPublicPlaybookView *Permission
var PermissionPurgeBleveIndexes *Permission
var PermissionPurgeElasticsearchIndexes *Permission
var PermissionReadAudits *Permission
var PermissionReadBots *Permission
var PermissionReadChannel *Permission
var PermissionReadComplianceExportJob *Permission
var PermissionReadDataRetentionJob *Permission
var PermissionReadElasticsearchPostAggregationJob *Permission
var PermissionReadElasticsearchPostIndexingJob *Permission
var PermissionReadJobs *Permission
var PermissionReadLdapSyncJob *Permission
var PermissionReadLicenseInformation *Permission
var PermissionReadOtherUsersTeams *Permission
var PermissionReadOthersBots *Permission
var PermissionReadPrivateChannelGroups *Permission
var PermissionReadPublicChannel *Permission
var PermissionReadPublicChannelGroups *Permission
var PermissionReadUserAccessToken *Permission
var PermissionRecycleDatabaseConnections *Permission
var PermissionReloadConfig *Permission
var PermissionRemoveLdapPrivateCert *Permission
var PermissionRemoveLdapPublicCert *Permission
var PermissionRemoveOthersReactions *Permission
var PermissionRemoveReaction *Permission
var PermissionRemoveSamlIdpCert *Permission
var PermissionRemoveSamlPrivateCert *Permission
var PermissionRemoveSamlPublicCert *Permission
var PermissionRemoveUserFromTeam *Permission
var PermissionRevokeUserAccessToken *Permission
var PermissionRunCreate *Permission
var PermissionRunManageMembers *Permission
var PermissionRunManageProperties *Permission
var PermissionRunView *Permission
var PermissionSysconsoleReadAbout *Permission
var PermissionSysconsoleReadAboutEditionAndLicense *Permission
var PermissionSysconsoleReadAuthentication *Permission
var PermissionSysconsoleReadAuthenticationEmail *Permission
var PermissionSysconsoleReadAuthenticationGuestAccess *Permission
var PermissionSysconsoleReadAuthenticationLdap *Permission
var PermissionSysconsoleReadAuthenticationMfa *Permission
var PermissionSysconsoleReadAuthenticationOpenid *Permission
var PermissionSysconsoleReadAuthenticationPassword *Permission
var PermissionSysconsoleReadAuthenticationSaml *Permission
var PermissionSysconsoleReadAuthenticationSignup *Permission
var PermissionSysconsoleReadBilling *Permission
var PermissionSysconsoleReadCompliance *Permission
var PermissionSysconsoleReadComplianceComplianceExport *Permission
var PermissionSysconsoleReadComplianceComplianceMonitoring *Permission
var PermissionSysconsoleReadComplianceCustomTermsOfService *Permission
var PermissionSysconsoleReadComplianceDataRetentionPolicy *Permission
var PermissionSysconsoleReadEnvironment *Permission
DEPRECATED
var PermissionSysconsoleReadEnvironmentDatabase *Permission
var PermissionSysconsoleReadEnvironmentDeveloper *Permission
var PermissionSysconsoleReadEnvironmentElasticsearch *Permission
var PermissionSysconsoleReadEnvironmentFileStorage *Permission
var PermissionSysconsoleReadEnvironmentHighAvailability *Permission
var PermissionSysconsoleReadEnvironmentImageProxy *Permission
var PermissionSysconsoleReadEnvironmentLogging *Permission
var PermissionSysconsoleReadEnvironmentPerformanceMonitoring *Permission
var PermissionSysconsoleReadEnvironmentPushNotificationServer *Permission
var PermissionSysconsoleReadEnvironmentRateLimiting *Permission
var PermissionSysconsoleReadEnvironmentSMTP *Permission
var PermissionSysconsoleReadEnvironmentSessionLengths *Permission
var PermissionSysconsoleReadEnvironmentWebServer *Permission
var PermissionSysconsoleReadExperimental *Permission
var PermissionSysconsoleReadExperimentalBleve *Permission
var PermissionSysconsoleReadExperimentalFeatureFlags *Permission
var PermissionSysconsoleReadExperimentalFeatures *Permission
var PermissionSysconsoleReadIntegrations *Permission
var PermissionSysconsoleReadIntegrationsBotAccounts *Permission
var PermissionSysconsoleReadIntegrationsCors *Permission
var PermissionSysconsoleReadIntegrationsGif *Permission
var PermissionSysconsoleReadIntegrationsIntegrationManagement *Permission
var PermissionSysconsoleReadPlugins *Permission
var PermissionSysconsoleReadReporting *Permission
var PermissionSysconsoleReadReportingServerLogs *Permission
var PermissionSysconsoleReadReportingSiteStatistics *Permission
var PermissionSysconsoleReadReportingTeamStatistics *Permission
var PermissionSysconsoleReadSite *Permission
var PermissionSysconsoleReadSiteAnnouncementBanner *Permission
var PermissionSysconsoleReadSiteCustomization *Permission
var PermissionSysconsoleReadSiteEmoji *Permission
var PermissionSysconsoleReadSiteFileSharingAndDownloads *Permission
var PermissionSysconsoleReadSiteLocalization *Permission
var PermissionSysconsoleReadSiteNotices *Permission
var PermissionSysconsoleReadSiteNotifications *Permission
var PermissionSysconsoleReadSitePosts *Permission
var PermissionSysconsoleReadSitePublicLinks *Permission
var PermissionSysconsoleReadSiteUsersAndTeams *Permission
var PermissionSysconsoleReadUserManagementChannels *Permission
var PermissionSysconsoleReadUserManagementGroups *Permission
var PermissionSysconsoleReadUserManagementPermissions *Permission
var PermissionSysconsoleReadUserManagementSystemRoles *Permission
var PermissionSysconsoleReadUserManagementTeams *Permission
var PermissionSysconsoleReadUserManagementUsers *Permission
var PermissionSysconsoleWriteAbout *Permission
var PermissionSysconsoleWriteAboutEditionAndLicense *Permission
var PermissionSysconsoleWriteAuthentication *Permission
var PermissionSysconsoleWriteAuthenticationEmail *Permission
var PermissionSysconsoleWriteAuthenticationGuestAccess *Permission
var PermissionSysconsoleWriteAuthenticationLdap *Permission
var PermissionSysconsoleWriteAuthenticationMfa *Permission
var PermissionSysconsoleWriteAuthenticationOpenid *Permission
var PermissionSysconsoleWriteAuthenticationPassword *Permission
var PermissionSysconsoleWriteAuthenticationSaml *Permission
var PermissionSysconsoleWriteAuthenticationSignup *Permission
var PermissionSysconsoleWriteBilling *Permission
var PermissionSysconsoleWriteCompliance *Permission
var PermissionSysconsoleWriteComplianceComplianceExport *Permission
var PermissionSysconsoleWriteComplianceComplianceMonitoring *Permission
var PermissionSysconsoleWriteComplianceCustomTermsOfService *Permission
var PermissionSysconsoleWriteComplianceDataRetentionPolicy *Permission
var PermissionSysconsoleWriteEnvironment *Permission
DEPRECATED
var PermissionSysconsoleWriteEnvironmentDatabase *Permission
var PermissionSysconsoleWriteEnvironmentDeveloper *Permission
var PermissionSysconsoleWriteEnvironmentElasticsearch *Permission
var PermissionSysconsoleWriteEnvironmentFileStorage *Permission
var PermissionSysconsoleWriteEnvironmentHighAvailability *Permission
var PermissionSysconsoleWriteEnvironmentImageProxy *Permission
var PermissionSysconsoleWriteEnvironmentLogging *Permission
var PermissionSysconsoleWriteEnvironmentPerformanceMonitoring *Permission
var PermissionSysconsoleWriteEnvironmentPushNotificationServer *Permission
var PermissionSysconsoleWriteEnvironmentRateLimiting *Permission
var PermissionSysconsoleWriteEnvironmentSMTP *Permission
var PermissionSysconsoleWriteEnvironmentSessionLengths *Permission
var PermissionSysconsoleWriteEnvironmentWebServer *Permission
var PermissionSysconsoleWriteExperimental *Permission
var PermissionSysconsoleWriteExperimentalBleve *Permission
var PermissionSysconsoleWriteExperimentalFeatureFlags *Permission
var PermissionSysconsoleWriteExperimentalFeatures *Permission
var PermissionSysconsoleWriteIntegrations *Permission
var PermissionSysconsoleWriteIntegrationsBotAccounts *Permission
var PermissionSysconsoleWriteIntegrationsCors *Permission
var PermissionSysconsoleWriteIntegrationsGif *Permission
var PermissionSysconsoleWriteIntegrationsIntegrationManagement *Permission
var PermissionSysconsoleWritePlugins *Permission
var PermissionSysconsoleWriteReporting *Permission
var PermissionSysconsoleWriteReportingServerLogs *Permission
var PermissionSysconsoleWriteReportingSiteStatistics *Permission
var PermissionSysconsoleWriteReportingTeamStatistics *Permission
var PermissionSysconsoleWriteSite *Permission
var PermissionSysconsoleWriteSiteAnnouncementBanner *Permission
var PermissionSysconsoleWriteSiteCustomization *Permission
var PermissionSysconsoleWriteSiteEmoji *Permission
var PermissionSysconsoleWriteSiteFileSharingAndDownloads *Permission
var PermissionSysconsoleWriteSiteLocalization *Permission
var PermissionSysconsoleWriteSiteNotices *Permission
var PermissionSysconsoleWriteSiteNotifications *Permission
var PermissionSysconsoleWriteSitePosts *Permission
var PermissionSysconsoleWriteSitePublicLinks *Permission
var PermissionSysconsoleWriteSiteUsersAndTeams *Permission
var PermissionSysconsoleWriteUserManagementChannels *Permission
var PermissionSysconsoleWriteUserManagementGroups *Permission
var PermissionSysconsoleWriteUserManagementPermissions *Permission
var PermissionSysconsoleWriteUserManagementSystemRoles *Permission
var PermissionSysconsoleWriteUserManagementTeams *Permission
var PermissionSysconsoleWriteUserManagementUsers *Permission
var PermissionTestElasticsearch *Permission
var PermissionTestEmail *Permission
var PermissionTestLdap *Permission
var PermissionTestS3 *Permission
var PermissionTestSiteURL *Permission
var PermissionUploadFile *Permission
var PermissionUseChannelMentions *Permission
var PermissionUseGroupMentions *Permission
var PermissionUseSlashCommands *Permission
var PermissionViewMembers *Permission
var PermissionViewTeam *Permission
type PluginClusterEvent ¶
type PluginClusterEvent struct { // Id is the unique identifier for the event. Id string // Data is the event payload. Data []byte }
PluginClusterEvent is used to allow intra-cluster plugin communication.
type PluginClusterEventSendOptions ¶
type PluginClusterEventSendOptions struct { // SendType defines the type of communication channel used to send the event. SendType string // TargetId identifies the cluster node to which the event should be sent. // It should match the cluster id of the receiving instance. // If empty, the event gets broadcasted to all other nodes. TargetId string }
PluginClusterEventSendOptions defines some properties that apply when sending plugin events across a cluster.
type PluginEventData ¶
type PluginEventData struct {
Id string `json:"id"`
}
PluginEventData used to notify peers about plugin changes.
type PluginInfo ¶
type PluginInfo struct {
Manifest
}
type PluginKVSetOptions ¶
type PluginKVSetOptions struct { Atomic bool // Only store the value if the current value matches the oldValue OldValue []byte // The value to compare with the current value. Only used when Atomic is true ExpireInSeconds int64 // Set an expire counter }
PluginKVSetOptions contains information on how to store a value in the plugin KV store.
func (*PluginKVSetOptions) IsValid ¶
func (opt *PluginKVSetOptions) IsValid() *AppError
IsValid returns nil if the chosen options are valid.
type PluginKeyValue ¶
type PluginKeyValue struct { PluginId string `json:"plugin_id"` Key string `json:"key" db:"PKey"` Value []byte `json:"value" db:"PValue"` ExpireAt int64 `json:"expire_at"` }
func (*PluginKeyValue) IsValid ¶
func (kv *PluginKeyValue) IsValid() *AppError
type PluginOption ¶
type PluginSetting ¶
type PluginSetting struct { // The key that the setting will be assigned to in the configuration file. Key string `json:"key" yaml:"key"` // The display name for the setting. DisplayName string `json:"display_name" yaml:"display_name"` // The type of the setting. // // "bool" will result in a boolean true or false setting. // // "dropdown" will result in a string setting that allows the user to select from a list of // pre-defined options. // // "generated" will result in a string setting that is set to a random, cryptographically secure // string. // // "radio" will result in a string setting that allows the user to select from a short selection // of pre-defined options. // // "text" will result in a string setting that can be typed in manually. // // "longtext" will result in a multi line string that can be typed in manually. // // "number" will result in in integer setting that can be typed in manually. // // "username" will result in a text setting that will autocomplete to a username. // // "custom" will result in a custom defined setting and will load the custom component registered for the Web App System Console. Type string `json:"type" yaml:"type"` // The help text to display to the user. Supports Markdown formatting. HelpText string `json:"help_text" yaml:"help_text"` // The help text to display alongside the "Regenerate" button for settings of the "generated" type. RegenerateHelpText string `json:"regenerate_help_text,omitempty" yaml:"regenerate_help_text,omitempty"` // The placeholder to display for "generated", "text", "longtext", "number" and "username" types when blank. Placeholder string `json:"placeholder" yaml:"placeholder"` // The default value of the setting. Default interface{} `json:"default" yaml:"default"` // For "radio" or "dropdown" settings, this is the list of pre-defined options that the user can choose // from. Options []*PluginOption `json:"options,omitempty" yaml:"options,omitempty"` }
type PluginSettingType ¶
type PluginSettingType int
const ( Bool PluginSettingType = iota Dropdown Generated Radio Text LongText Number Username Custom )
type PluginSettings ¶
type PluginSettings struct { Enable *bool `access:"plugins,write_restrictable"` EnableUploads *bool `access:"plugins,write_restrictable,cloud_restrictable"` AllowInsecureDownloadURL *bool `access:"plugins,write_restrictable,cloud_restrictable"` EnableHealthCheck *bool `access:"plugins,write_restrictable,cloud_restrictable"` Directory *string `access:"plugins,write_restrictable,cloud_restrictable"` // telemetry: none ClientDirectory *string `access:"plugins,write_restrictable,cloud_restrictable"` // telemetry: none Plugins map[string]map[string]interface{} `access:"plugins"` // telemetry: none PluginStates map[string]*PluginState `access:"plugins"` // telemetry: none EnableMarketplace *bool `access:"plugins,write_restrictable,cloud_restrictable"` EnableRemoteMarketplace *bool `access:"plugins,write_restrictable,cloud_restrictable"` AutomaticPrepackagedPlugins *bool `access:"plugins,write_restrictable,cloud_restrictable"` RequirePluginSignature *bool `access:"plugins,write_restrictable,cloud_restrictable"` MarketplaceURL *string `access:"plugins,write_restrictable,cloud_restrictable"` SignaturePublicKeyFiles []string `access:"plugins,write_restrictable,cloud_restrictable"` ChimeraOAuthProxyURL *string `access:"plugins,write_restrictable,cloud_restrictable"` }
func (*PluginSettings) SetDefaults ¶
func (s *PluginSettings) SetDefaults(ls LogSettings)
type PluginSettingsSchema ¶
type PluginSettingsSchema struct { // Optional text to display above the settings. Supports Markdown formatting. Header string `json:"header" yaml:"header"` Footer string `json:"footer" yaml:"footer"` // A list of setting definitions. Settings []*PluginSetting `json:"settings" yaml:"settings"` }
type PluginState ¶
type PluginState struct {
Enable bool
}
type PluginStatus ¶
type PluginStatus struct { PluginId string `json:"plugin_id"` ClusterId string `json:"cluster_id"` PluginPath string `json:"plugin_path"` State int `json:"state"` Name string `json:"name"` Description string `json:"description"` Version string `json:"version"` }
PluginStatus provides a cluster-aware view of installed plugins.
type PluginStatuses ¶
type PluginStatuses []*PluginStatus
type PluginsResponse ¶
type PluginsResponse struct { Active []*PluginInfo `json:"active"` Inactive []*PluginInfo `json:"inactive"` }
type Post ¶
type Post struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` EditAt int64 `json:"edit_at"` DeleteAt int64 `json:"delete_at"` IsPinned bool `json:"is_pinned"` UserId string `json:"user_id"` ChannelId string `json:"channel_id"` RootId string `json:"root_id"` OriginalId string `json:"original_id"` Message string `json:"message"` // MessageSource will contain the message as submitted by the user if Message has been modified // by Mattermost for presentation (e.g if an image proxy is being used). It should be used to // populate edit boxes if present. MessageSource string `json:"message_source,omitempty" db:"-"` Type string `json:"type"` Props StringInterface `json:"props"` // Deprecated: use GetProps() Filenames StringArray `json:"-"` // Deprecated, do not use this field any more FileIds StringArray `json:"file_ids,omitempty"` PendingPostId string `json:"pending_post_id" db:"-"` HasReactions bool `json:"has_reactions,omitempty"` RemoteId *string `json:"remote_id,omitempty"` // Transient data populated before sending a post to the client ReplyCount int64 `json:"reply_count" db:"-"` LastReplyAt int64 `json:"last_reply_at" db:"-"` Participants []*User `json:"participants" db:"-"` IsFollowing *bool `json:"is_following,omitempty" db:"-"` // for root posts in collapsed thread mode indicates if the current user is following this thread Metadata *PostMetadata `json:"metadata,omitempty" db:"-"` // contains filtered or unexported fields }
func AddPostActionCookies ¶
func (*Post) Attachments ¶
func (o *Post) Attachments() []*SlackAttachment
func (*Post) AttachmentsEqual ¶
func (*Post) ChannelMentions ¶
func (*Post) DisableMentionHighlights ¶
DisableMentionHighlights disables a posts mention highlighting and returns the first channel mention that was present in the message.
func (*Post) GenerateActionIds ¶
func (o *Post) GenerateActionIds()
func (*Post) GetAction ¶
func (o *Post) GetAction(id string) *PostAction
func (*Post) GetPreviewPost ¶
func (o *Post) GetPreviewPost() *PreviewPost
func (*Post) GetPreviewedPostProp ¶
func (*Post) GetProps ¶
func (o *Post) GetProps() StringInterface
func (*Post) GetRemoteID ¶
GetRemoteID safely returns the remoteID or empty string if not remote.
func (*Post) IsFromOAuthBot ¶
func (*Post) IsJoinLeaveMessage ¶
func (*Post) IsSystemMessage ¶
func (*Post) MakeNonNil ¶
func (o *Post) MakeNonNil()
func (*Post) RemovePreviewPost ¶
func (o *Post) RemovePreviewPost()
func (*Post) SanitizeProps ¶
func (o *Post) SanitizeProps()
func (*Post) SetProps ¶
func (o *Post) SetProps(props StringInterface)
func (*Post) ShallowCopy ¶
ShallowCopy is an utility function to shallow copy a Post to the given destination without touching the internal RWMutex.
func (*Post) StripActionIntegrations ¶
func (o *Post) StripActionIntegrations()
func (*Post) ToNilIfInvalid ¶
type PostAction ¶
type PostAction struct { // A unique Action ID. If not set, generated automatically. Id string `json:"id,omitempty"` // The type of the interactive element. Currently supported are // "select" and "button". Type string `json:"type,omitempty"` // The text on the button, or in the select placeholder. Name string `json:"name,omitempty"` // If the action is disabled. Disabled bool `json:"disabled,omitempty"` // Style defines a text and border style. // Supported values are "default", "primary", "success", "good", "warning", "danger" // and any hex color. Style string `json:"style,omitempty"` // DataSource indicates the data source for the select action. If left // empty, the select is populated from Options. Other supported values // are "users" and "channels". DataSource string `json:"data_source,omitempty"` // Options contains the values listed in a select dropdown on the post. Options []*PostActionOptions `json:"options,omitempty"` // DefaultOption contains the option, if any, that will appear as the // default selection in a select box. It has no effect when used with // other types of actions. DefaultOption string `json:"default_option,omitempty"` // Defines the interaction with the backend upon a user action. // Integration contains Context, which is private plugin data; // Integrations are stripped from Posts when they are sent to the // client, or are encrypted in a Cookie. Integration *PostActionIntegration `json:"integration,omitempty"` Cookie string `json:"cookie,omitempty" db:"-"` }
func (*PostAction) Equals ¶
func (p *PostAction) Equals(input *PostAction) bool
type PostActionAPIResponse ¶
type PostActionCookie ¶
type PostActionCookie struct { Type string `json:"type,omitempty"` PostId string `json:"post_id,omitempty"` RootPostId string `json:"root_post_id,omitempty"` ChannelId string `json:"channel_id,omitempty"` DataSource string `json:"data_source,omitempty"` Integration *PostActionIntegration `json:"integration,omitempty"` RetainProps map[string]interface{} `json:"retain_props,omitempty"` RemoveProps []string `json:"remove_props,omitempty"` }
PostActionCookie is set by the server, serialized and encrypted into PostAction.Cookie. The clients should hold on to it, and include it with subsequent DoPostAction requests. This allows the server to access the action metadata even when it's not available in the database, for ephemeral posts.
type PostActionIntegration ¶
type PostActionIntegrationRequest ¶
type PostActionIntegrationRequest struct { UserId string `json:"user_id"` UserName string `json:"user_name"` ChannelId string `json:"channel_id"` ChannelName string `json:"channel_name"` TeamId string `json:"team_id"` TeamName string `json:"team_domain"` PostId string `json:"post_id"` TriggerId string `json:"trigger_id"` Type string `json:"type"` DataSource string `json:"data_source"` Context map[string]interface{} `json:"context,omitempty"` }
func (*PostActionIntegrationRequest) GenerateTriggerId ¶
type PostActionOptions ¶
type PostEmbed ¶
type PostEmbed struct { Type PostEmbedType `json:"type"` // The URL of the embedded content. Used for image and OpenGraph embeds. URL string `json:"url,omitempty"` // Any additional data for the embedded content. Only used for OpenGraph embeds. Data interface{} `json:"data,omitempty"` }
type PostEmbedType ¶
type PostEmbedType string
const ( PostEmbedImage PostEmbedType = "image" PostEmbedMessageAttachment PostEmbedType = "message_attachment" PostEmbedOpengraph PostEmbedType = "opengraph" PostEmbedLink PostEmbedType = "link" PostEmbedPermalink PostEmbedType = "permalink" PostEmbedBoards PostEmbedType = "boards" )
type PostEphemeral ¶
type PostForExport ¶
type PostForIndexing ¶
type PostImage ¶
type PostImage struct { Width int `json:"width"` Height int `json:"height"` // Format is the name of the image format as used by image/go such as "png", "gif", or "jpeg". Format string `json:"format"` // FrameCount stores the number of frames in this image, if it is an animated gif. It will be 0 for other formats. FrameCount int `json:"frame_count"` }
type PostList ¶
type PostList struct { Order []string `json:"order"` Posts map[string]*Post `json:"posts"` NextPostId string `json:"next_post_id"` PrevPostId string `json:"prev_post_id"` }
func NewPostList ¶
func NewPostList() *PostList
func (*PostList) IsChannelId ¶
func (*PostList) MakeNonNil ¶
func (o *PostList) MakeNonNil()
func (*PostList) SortByCreateAt ¶
func (o *PostList) SortByCreateAt()
func (*PostList) StripActionIntegrations ¶
func (o *PostList) StripActionIntegrations()
func (*PostList) UniqueOrder ¶
func (o *PostList) UniqueOrder()
type PostMetadata ¶
type PostMetadata struct { // Embeds holds information required to render content embedded in the post. This includes the OpenGraph metadata // for links in the post. Embeds []*PostEmbed `json:"embeds,omitempty"` // Emojis holds all custom emojis used in the post or used in reaction to the post. Emojis []*Emoji `json:"emojis,omitempty"` // Files holds information about the file attachments on the post. Files []*FileInfo `json:"files,omitempty"` // Images holds the dimensions of all external images in the post as a map of the image URL to its dimensions. // This includes image embeds (when the message contains a plaintext link to an image), Markdown images, images // contained in the OpenGraph metadata, and images contained in message attachments. It does not contain // the dimensions of any file attachments as those are stored in FileInfos. Images map[string]*PostImage `json:"images,omitempty"` // Reactions holds reactions made to the post. Reactions []*Reaction `json:"reactions,omitempty"` }
type PostPatch ¶
type PostPatch struct { IsPinned *bool `json:"is_pinned"` Message *string `json:"message"` Props *StringInterface `json:"props"` FileIds *StringArray `json:"file_ids"` HasReactions *bool `json:"has_reactions"` }
func (*PostPatch) DisableMentionHighlights ¶
func (o *PostPatch) DisableMentionHighlights()
DisableMentionHighlights disables mention highlighting for a post patch if required.
type PostSearchMatches ¶
type PostSearchResults ¶
type PostSearchResults struct { *PostList Matches PostSearchMatches `json:"matches"` }
func MakePostSearchResults ¶
func MakePostSearchResults(posts *PostList, matches PostSearchMatches) *PostSearchResults
func (*PostSearchResults) EncodeJSON ¶ added in v6.4.0
func (o *PostSearchResults) EncodeJSON(w io.Writer) error
func (*PostSearchResults) ToJSON ¶
func (o *PostSearchResults) ToJSON() (string, error)
type Preference ¶
type Preference struct { UserId string `json:"user_id"` Category string `json:"category"` Name string `json:"name"` Value string `json:"value"` }
func (*Preference) IsValid ¶
func (o *Preference) IsValid() *AppError
func (*Preference) PreUpdate ¶
func (o *Preference) PreUpdate()
type Preferences ¶
type Preferences []Preference
type PreviewPost ¶
type PreviewPost struct { PostID string `json:"post_id"` Post *Post `json:"post"` TeamName string `json:"team_name"` ChannelDisplayName string `json:"channel_display_name"` }
func NewPreviewPost ¶
func NewPreviewPost(post *Post, team *Team, channel *Channel) *PreviewPost
type PrivacySettings ¶
type Product ¶
type Product struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` PricePerSeat float64 `json:"price_per_seat"` AddOns []*AddOn `json:"add_ons"` SKU string `json:"sku"` PriceID string `json:"price_id"` Family SubscriptionFamily `json:"product_family"` RecurringInterval RecurringInterval `json:"recurring_interval"` BillingScheme BillingScheme `json:"billing_scheme"` }
Product model represents a product on the cloud system.
type ProductNotice ¶
type ProductNotice struct { Conditions Conditions `json:"conditions"` ID string `json:"id"` // Unique identifier for this notice. Can be a running number. Used for storing 'viewed'; state on the server. LocalizedMessages map[string]NoticeMessageInternal `json:"localizedMessages"` // Notice message data, organized by locale.; Example:; "localizedMessages": {; "en": { "title": "English", description: "English description"},; "frFR": { "title": "Frances", description: "French description"}; } Repeatable *bool `json:"repeatable,omitempty"` // Configurable flag if the notice should reappear after it’s seen and dismissed }
List of product notices. Order is important and is used to resolve priorities. Each notice will only be show if conditions are met.
func (*ProductNotice) SysAdminOnly ¶
func (n *ProductNotice) SysAdminOnly() bool
func (*ProductNotice) TeamAdminOnly ¶
func (n *ProductNotice) TeamAdminOnly() bool
type ProductNoticeViewState ¶
Definition of the table keeping the 'viewed' state of each in-product notice per user
type ProductNotices ¶
type ProductNotices []ProductNotice
func UnmarshalProductNotices ¶
func UnmarshalProductNotices(data []byte) (ProductNotices, error)
func (*ProductNotices) Marshal ¶
func (r *ProductNotices) Marshal() ([]byte, error)
type PushNotification ¶
type PushNotification struct { AckId string `json:"ack_id"` Platform string `json:"platform"` ServerId string `json:"server_id"` DeviceId string `json:"device_id"` PostId string `json:"post_id"` Category string `json:"category,omitempty"` Sound string `json:"sound,omitempty"` Message string `json:"message,omitempty"` Badge int `json:"badge,omitempty"` ContentAvailable int `json:"cont_ava,omitempty"` TeamId string `json:"team_id,omitempty"` ChannelId string `json:"channel_id,omitempty"` RootId string `json:"root_id,omitempty"` ChannelName string `json:"channel_name,omitempty"` Type string `json:"type,omitempty"` SenderId string `json:"sender_id,omitempty"` SenderName string `json:"sender_name,omitempty"` OverrideUsername string `json:"override_username,omitempty"` OverrideIconURL string `json:"override_icon_url,omitempty"` FromWebhook string `json:"from_webhook,omitempty"` Version string `json:"version,omitempty"` IsCRTEnabled bool `json:"is_crt_enabled"` IsIdLoaded bool `json:"is_id_loaded"` }
func (*PushNotification) DeepCopy ¶
func (pn *PushNotification) DeepCopy() *PushNotification
func (*PushNotification) SetDeviceIdAndPlatform ¶
func (pn *PushNotification) SetDeviceIdAndPlatform(deviceId string)
type PushNotificationAck ¶
type PushResponse ¶
func NewErrorPushResponse ¶
func NewErrorPushResponse(message string) PushResponse
func NewOkPushResponse ¶
func NewOkPushResponse() PushResponse
func NewRemovePushResponse ¶
func NewRemovePushResponse() PushResponse
type RateLimitSettings ¶
type RateLimitSettings struct { Enable *bool `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` PerSec *int `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` MaxBurst *int `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` MemoryStoreSize *int `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` VaryByRemoteAddr *bool `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` VaryByUser *bool `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` VaryByHeader string `access:"environment_rate_limiting,write_restrictable,cloud_restrictable"` }
func (*RateLimitSettings) SetDefaults ¶
func (s *RateLimitSettings) SetDefaults()
type Reaction ¶
type RecentCustomStatuses ¶
type RecentCustomStatuses []CustomStatus
func (RecentCustomStatuses) Add ¶
func (rcs RecentCustomStatuses) Add(cs *CustomStatus) RecentCustomStatuses
func (RecentCustomStatuses) Contains ¶
func (rcs RecentCustomStatuses) Contains(cs *CustomStatus) (bool, error)
func (RecentCustomStatuses) Remove ¶
func (rcs RecentCustomStatuses) Remove(cs *CustomStatus) (RecentCustomStatuses, error)
type RecurringInterval ¶
type RecurringInterval string
type RelationalIntegrityCheckData ¶
type RelationalIntegrityCheckData struct { ParentName string `json:"parent_name"` ChildName string `json:"child_name"` ParentIdAttr string `json:"parent_id_attr"` ChildIdAttr string `json:"child_id_attr"` Records []OrphanedRecord `json:"records"` }
type RemoteCluster ¶
type RemoteCluster struct { RemoteId string `json:"remote_id"` RemoteTeamId string `json:"remote_team_id"` Name string `json:"name"` DisplayName string `json:"display_name"` SiteURL string `json:"site_url"` CreateAt int64 `json:"create_at"` LastPingAt int64 `json:"last_ping_at"` Token string `json:"token"` RemoteToken string `json:"remote_token"` Topics string `json:"topics"` CreatorId string `json:"creator_id"` }
func (*RemoteCluster) IsOnline ¶
func (rc *RemoteCluster) IsOnline() bool
func (*RemoteCluster) IsValid ¶
func (rc *RemoteCluster) IsValid() *AppError
func (*RemoteCluster) PreSave ¶
func (rc *RemoteCluster) PreSave()
func (*RemoteCluster) PreUpdate ¶
func (rc *RemoteCluster) PreUpdate()
func (*RemoteCluster) ToRemoteClusterInfo ¶
func (rc *RemoteCluster) ToRemoteClusterInfo() RemoteClusterInfo
type RemoteClusterFrame ¶
type RemoteClusterFrame struct { RemoteId string `json:"remote_id"` Msg RemoteClusterMsg `json:"msg"` }
RemoteClusterFrame wraps a `RemoteClusterMsg` with credentials specific to a remote cluster.
func (*RemoteClusterFrame) IsValid ¶
func (f *RemoteClusterFrame) IsValid() *AppError
type RemoteClusterInfo ¶
type RemoteClusterInfo struct { Name string `json:"name"` DisplayName string `json:"display_name"` CreateAt int64 `json:"create_at"` LastPingAt int64 `json:"last_ping_at"` }
RemoteClusterInfo provides a subset of RemoteCluster fields suitable for sending to clients.
type RemoteClusterInvite ¶
type RemoteClusterInvite struct { RemoteId string `json:"remote_id"` RemoteTeamId string `json:"remote_team_id"` SiteURL string `json:"site_url"` Token string `json:"token"` }
RemoteClusterInvite represents an invitation to establish a simple trust with a remote cluster.
type RemoteClusterMsg ¶
type RemoteClusterMsg struct { Id string `json:"id"` Topic string `json:"topic"` CreateAt int64 `json:"create_at"` Payload json.RawMessage `json:"payload"` }
RemoteClusterMsg represents a message that is sent and received between clusters. These are processed and routed via the RemoteClusters service.
func NewRemoteClusterMsg ¶
func NewRemoteClusterMsg(topic string, payload json.RawMessage) RemoteClusterMsg
func (RemoteClusterMsg) IsValid ¶
func (m RemoteClusterMsg) IsValid() *AppError
type RemoteClusterPing ¶
RemoteClusterPing represents a ping that is sent and received between clusters to indicate a connection is alive. This is the payload for a `RemoteClusterMsg`.
type RemoteClusterQueryFilter ¶
type RemoteClusterQueryFilter struct { ExcludeOffline bool InChannel string NotInChannel string Topic string CreatorId string OnlyConfirmed bool }
RemoteClusterQueryFilter provides filter criteria for RemoteClusterStore.GetAll
type ReplicaLagSettings ¶
type ReplicaLagSettings struct { DataSource *string `access:"environment,write_restrictable,cloud_restrictable"` // telemetry: none QueryAbsoluteLag *string `access:"environment,write_restrictable,cloud_restrictable"` // telemetry: none QueryTimeLag *string `access:"environment,write_restrictable,cloud_restrictable"` // telemetry: none }
type ReplyForExport ¶
type Response ¶
type Response struct { StatusCode int RequestId string Etag string ServerVersion string Header http.Header }
func BuildResponse ¶
type RetentionPolicy ¶
type RetentionPolicyChannel ¶
type RetentionPolicyCursor ¶
type RetentionPolicyForChannelList ¶
type RetentionPolicyForChannelList struct { Policies []*RetentionPolicyForChannel `json:"policies"` TotalCount int64 `json:"total_count"` }
type RetentionPolicyForTeam ¶
type RetentionPolicyForTeamList ¶
type RetentionPolicyForTeamList struct { Policies []*RetentionPolicyForTeam `json:"policies"` TotalCount int64 `json:"total_count"` }
type RetentionPolicyTeam ¶
type RetentionPolicyWithTeamAndChannelCounts ¶
type RetentionPolicyWithTeamAndChannelCounts struct { RetentionPolicy ChannelCount int64 `json:"channel_count"` TeamCount int64 `json:"team_count"` }
type RetentionPolicyWithTeamAndChannelCountsList ¶
type RetentionPolicyWithTeamAndChannelCountsList struct { Policies []*RetentionPolicyWithTeamAndChannelCounts `json:"policies"` TotalCount int64 `json:"total_count"` }
type RetentionPolicyWithTeamAndChannelIDs ¶
type RetentionPolicyWithTeamAndChannelIDs struct { RetentionPolicy TeamIDs []string `json:"team_ids"` ChannelIDs []string `json:"channel_ids"` }
type Role ¶
type Role struct { Id string `json:"id"` Name string `json:"name"` DisplayName string `json:"display_name"` Description string `json:"description"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` Permissions []string `json:"permissions"` SchemeManaged bool `json:"scheme_managed"` BuiltIn bool `json:"built_in"` }
func (*Role) GetChannelModeratedPermissions ¶
func (r *Role) GetChannelModeratedPermissions(channelType ChannelType) map[string]bool
GetChannelModeratedPermissions returns a map of channel moderated permissions that the role has access to
func (*Role) IsValidWithoutId ¶
func (*Role) MergeChannelHigherScopedPermissions ¶
func (r *Role) MergeChannelHigherScopedPermissions(higherScopedPermissions *RolePermissions)
MergeChannelHigherScopedPermissions is meant to be invoked on a channel scheme's role and merges the higher-scoped channel role's permissions.
func (*Role) RolePatchFromChannelModerationsPatch ¶
func (r *Role) RolePatchFromChannelModerationsPatch(channelModerationsPatch []*ChannelModerationPatch, roleName string) *RolePatch
RolePatchFromChannelModerationsPatch Creates and returns a RolePatch based on a slice of ChannelModerationPatches, roleName is expected to be either "members" or "guests".
type RoleDescriptor ¶
type RoleDescriptor struct { XMLName xml.Name ID string `xml:",attr,omitempty"` ValidUntil time.Time `xml:"validUntil,attr,omitempty"` CacheDuration time.Duration `xml:"cacheDuration,attr,omitempty"` ProtocolSupportEnumeration string `xml:"protocolSupportEnumeration,attr"` ErrorURL string `xml:"errorURL,attr,omitempty"` KeyDescriptors []KeyDescriptor `xml:"KeyDescriptor,omitempty"` Organization *Organization `xml:"Organization,omitempty"` ContactPersons []ContactPerson `xml:"ContactPerson,omitempty"` }
type RolePermissions ¶
type SSODescriptor ¶
type SSODescriptor struct { XMLName xml.Name RoleDescriptor ArtifactResolutionServices []IndexedEndpoint `xml:"ArtifactResolutionService"` SingleLogoutServices []Endpoint `xml:"SingleLogoutService"` ManageNameIDServices []Endpoint `xml:"ManageNameIDService"` NameIDFormats []NameIDFormat `xml:"NameIDFormat"` }
type SSOSettings ¶
type SSOSettings struct { Enable *bool `access:"authentication_openid"` Secret *string `access:"authentication_openid"` // telemetry: none Id *string `access:"authentication_openid"` // telemetry: none Scope *string `access:"authentication_openid"` // telemetry: none AuthEndpoint *string `access:"authentication_openid"` // telemetry: none TokenEndpoint *string `access:"authentication_openid"` // telemetry: none UserAPIEndpoint *string `access:"authentication_openid"` // telemetry: none DiscoveryEndpoint *string `access:"authentication_openid"` // telemetry: none ButtonText *string `access:"authentication_openid"` // telemetry: none ButtonColor *string `access:"authentication_openid"` // telemetry: none }
type SamlAuthRequest ¶
type SamlCertificateStatus ¶
type SamlMetadataResponse ¶
type SamlSettings ¶
type SamlSettings struct { // Basic Enable *bool `access:"authentication_saml"` EnableSyncWithLdap *bool `access:"authentication_saml"` EnableSyncWithLdapIncludeAuth *bool `access:"authentication_saml"` IgnoreGuestsLdapSync *bool `access:"authentication_saml"` Verify *bool `access:"authentication_saml"` Encrypt *bool `access:"authentication_saml"` SignRequest *bool `access:"authentication_saml"` IdpURL *string `access:"authentication_saml"` // telemetry: none IdpDescriptorURL *string `access:"authentication_saml"` // telemetry: none IdpMetadataURL *string `access:"authentication_saml"` // telemetry: none ServiceProviderIdentifier *string `access:"authentication_saml"` // telemetry: none AssertionConsumerServiceURL *string `access:"authentication_saml"` // telemetry: none SignatureAlgorithm *string `access:"authentication_saml"` CanonicalAlgorithm *string `access:"authentication_saml"` ScopingIDPProviderId *string `access:"authentication_saml"` ScopingIDPName *string `access:"authentication_saml"` IdpCertificateFile *string `access:"authentication_saml"` // telemetry: none PublicCertificateFile *string `access:"authentication_saml"` // telemetry: none PrivateKeyFile *string `access:"authentication_saml"` // telemetry: none // User Mapping IdAttribute *string `access:"authentication_saml"` GuestAttribute *string `access:"authentication_saml"` EnableAdminAttribute *bool AdminAttribute *string FirstNameAttribute *string `access:"authentication_saml"` LastNameAttribute *string `access:"authentication_saml"` EmailAttribute *string `access:"authentication_saml"` UsernameAttribute *string `access:"authentication_saml"` NicknameAttribute *string `access:"authentication_saml"` LocaleAttribute *string `access:"authentication_saml"` PositionAttribute *string `access:"authentication_saml"` LoginButtonText *string `access:"authentication_saml"` LoginButtonColor *string `access:"experimental_features"` LoginButtonBorderColor *string `access:"experimental_features"` LoginButtonTextColor *string `access:"experimental_features"` }
func (*SamlSettings) SetDefaults ¶
func (s *SamlSettings) SetDefaults()
type ScheduledTask ¶
type ScheduledTask struct { Name string `json:"name"` Interval time.Duration `json:"interval"` Recurring bool `json:"recurring"` // contains filtered or unexported fields }
func CreateRecurringTask ¶
func CreateRecurringTask(name string, function TaskFunc, interval time.Duration) *ScheduledTask
func CreateRecurringTaskFromNextIntervalTime ¶
func CreateRecurringTaskFromNextIntervalTime(name string, function TaskFunc, interval time.Duration) *ScheduledTask
func CreateTask ¶
func CreateTask(name string, function TaskFunc, timeToExecution time.Duration) *ScheduledTask
func (*ScheduledTask) Cancel ¶
func (task *ScheduledTask) Cancel()
func (*ScheduledTask) String ¶
func (task *ScheduledTask) String() string
type Scheme ¶
type Scheme struct { Id string `json:"id"` Name string `json:"name"` DisplayName string `json:"display_name"` Description string `json:"description"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` Scope string `json:"scope"` DefaultTeamAdminRole string `json:"default_team_admin_role"` DefaultTeamUserRole string `json:"default_team_user_role"` DefaultChannelAdminRole string `json:"default_channel_admin_role"` DefaultChannelUserRole string `json:"default_channel_user_role"` DefaultTeamGuestRole string `json:"default_team_guest_role"` DefaultChannelGuestRole string `json:"default_channel_guest_role"` DefaultPlaybookAdminRole string `json:"default_playbook_admin_role"` DefaultPlaybookMemberRole string `json:"default_playbook_member_role"` DefaultRunAdminRole string `json:"default_run_admin_role"` DefaultRunMemberRole string `json:"default_run_member_role"` }
func (*Scheme) IsValidForCreate ¶
func (*Scheme) Patch ¶
func (scheme *Scheme) Patch(patch *SchemePatch)
type SchemeConveyor ¶
type SchemeConveyor struct { Name string `json:"name"` DisplayName string `json:"display_name"` Description string `json:"description"` Scope string `json:"scope"` TeamAdmin string `json:"default_team_admin_role"` TeamUser string `json:"default_team_user_role"` TeamGuest string `json:"default_team_guest_role"` ChannelAdmin string `json:"default_channel_admin_role"` ChannelUser string `json:"default_channel_user_role"` ChannelGuest string `json:"default_channel_guest_role"` PlaybookAdmin string `json:"default_playbook_admin_role"` PlaybookMember string `json:"default_playbook_member_role"` RunAdmin string `json:"default_run_admin_role"` RunMember string `json:"default_run_member_role"` Roles []*Role `json:"roles"` }
SchemeConveyor is used for importing and exporting a Scheme and its associated Roles.
func (*SchemeConveyor) Scheme ¶
func (sc *SchemeConveyor) Scheme() *Scheme
type SchemeIDPatch ¶
type SchemeIDPatch struct {
SchemeID *string `json:"scheme_id"`
}
type SchemePatch ¶
type SchemeRoles ¶
type SearchParameter ¶
type SearchParams ¶
type SearchParams struct { Terms string ExcludedTerms string IsHashtag bool InChannels []string ExcludedChannels []string FromUsers []string ExcludedUsers []string AfterDate string ExcludedAfterDate string BeforeDate string ExcludedBeforeDate string Extensions []string ExcludedExtensions []string OnDate string ExcludedDate string OrTerms bool IncludeDeletedChannels bool TimeZoneOffset int // True if this search doesn't originate from a "current user". SearchWithoutUserId bool }
func ParseSearchParams ¶
func ParseSearchParams(text string, timeZoneOffset int) []*SearchParams
func (*SearchParams) GetAfterDateMillis ¶
func (p *SearchParams) GetAfterDateMillis() int64
Returns the epoch timestamp of the start of the day specified by SearchParams.AfterDate
func (*SearchParams) GetBeforeDateMillis ¶
func (p *SearchParams) GetBeforeDateMillis() int64
Returns the epoch timestamp of the end of the day specified by SearchParams.BeforeDate
func (*SearchParams) GetExcludedAfterDateMillis ¶
func (p *SearchParams) GetExcludedAfterDateMillis() int64
Returns the epoch timestamp of the start of the day specified by SearchParams.ExcludedAfterDate
func (*SearchParams) GetExcludedBeforeDateMillis ¶
func (p *SearchParams) GetExcludedBeforeDateMillis() int64
Returns the epoch timestamp of the end of the day specified by SearchParams.ExcludedBeforeDate
func (*SearchParams) GetExcludedDateMillis ¶
func (p *SearchParams) GetExcludedDateMillis() (int64, int64)
Returns the epoch timestamps of the start and end of the day specified by SearchParams.ExcludedDate
func (*SearchParams) GetOnDateMillis ¶
func (p *SearchParams) GetOnDateMillis() (int64, int64)
Returns the epoch timestamps of the start and end of the day specified by SearchParams.OnDate
type SecurityBulletin ¶
type SecurityBulletins ¶
type SecurityBulletins []SecurityBulletin
type SendWarnMetricAck ¶
type SendWarnMetricAck struct {
ForceAck bool `json:"forceAck"`
}
type ServerBusyState ¶
type ServerBusyState struct { Busy bool `json:"busy"` Expires int64 `json:"expires"` ExpiresTS string `json:"expires_ts,omitempty"` }
ServerBusyState provides serialization for app.Busy.
type ServiceSettings ¶
type ServiceSettings struct { SiteURL *string `access:"environment_web_server,authentication_saml,write_restrictable"` WebsocketURL *string `access:"write_restrictable,cloud_restrictable"` LicenseFileLocation *string `access:"write_restrictable,cloud_restrictable"` // telemetry: none ListenAddress *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` // telemetry: none ConnectionSecurity *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` TLSCertFile *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` TLSKeyFile *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` TLSMinVer *string `access:"write_restrictable,cloud_restrictable"` // telemetry: none TLSStrictTransport *bool `access:"write_restrictable,cloud_restrictable"` TLSStrictTransportMaxAge *int64 `access:"write_restrictable,cloud_restrictable"` // telemetry: none TLSOverwriteCiphers []string `access:"write_restrictable,cloud_restrictable"` // telemetry: none UseLetsEncrypt *bool `access:"environment_web_server,write_restrictable,cloud_restrictable"` LetsEncryptCertificateCacheFile *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` // telemetry: none Forward80To443 *bool `access:"environment_web_server,write_restrictable,cloud_restrictable"` TrustedProxyIPHeader []string `access:"write_restrictable,cloud_restrictable"` // telemetry: none ReadTimeout *int `access:"environment_web_server,write_restrictable,cloud_restrictable"` WriteTimeout *int `access:"environment_web_server,write_restrictable,cloud_restrictable"` IdleTimeout *int `access:"write_restrictable,cloud_restrictable"` MaximumLoginAttempts *int `access:"authentication_password,write_restrictable,cloud_restrictable"` GoroutineHealthThreshold *int `access:"write_restrictable,cloud_restrictable"` // telemetry: none EnableOAuthServiceProvider *bool `access:"integrations_integration_management"` EnableIncomingWebhooks *bool `access:"integrations_integration_management"` EnableOutgoingWebhooks *bool `access:"integrations_integration_management"` EnableCommands *bool `access:"integrations_integration_management"` EnablePostUsernameOverride *bool `access:"integrations_integration_management"` EnablePostIconOverride *bool `access:"integrations_integration_management"` GoogleDeveloperKey *string `access:"site_posts,write_restrictable,cloud_restrictable"` EnableLinkPreviews *bool `access:"site_posts"` EnablePermalinkPreviews *bool `access:"site_posts"` RestrictLinkPreviews *string `access:"site_posts"` EnableTesting *bool `access:"environment_developer,write_restrictable,cloud_restrictable"` EnableDeveloper *bool `access:"environment_developer,write_restrictable,cloud_restrictable"` DeveloperFlags *string `access:"environment_developer"` EnableOpenTracing *bool `access:"write_restrictable,cloud_restrictable"` EnableSecurityFixAlert *bool `access:"environment_smtp,write_restrictable,cloud_restrictable"` EnableInsecureOutgoingConnections *bool `access:"environment_web_server,write_restrictable,cloud_restrictable"` AllowedUntrustedInternalConnections *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` EnableMultifactorAuthentication *bool `access:"authentication_mfa"` EnforceMultifactorAuthentication *bool `access:"authentication_mfa"` EnableUserAccessTokens *bool `access:"integrations_integration_management"` AllowCorsFrom *string `access:"integrations_cors,write_restrictable,cloud_restrictable"` CorsExposedHeaders *string `access:"integrations_cors,write_restrictable,cloud_restrictable"` CorsAllowCredentials *bool `access:"integrations_cors,write_restrictable,cloud_restrictable"` CorsDebug *bool `access:"integrations_cors,write_restrictable,cloud_restrictable"` AllowCookiesForSubdomains *bool `access:"write_restrictable,cloud_restrictable"` ExtendSessionLengthWithActivity *bool `access:"environment_session_lengths,write_restrictable,cloud_restrictable"` SessionLengthWebInDays *int `access:"environment_session_lengths,write_restrictable,cloud_restrictable"` SessionLengthMobileInDays *int `access:"environment_session_lengths,write_restrictable,cloud_restrictable"` SessionLengthSSOInDays *int `access:"environment_session_lengths,write_restrictable,cloud_restrictable"` SessionCacheInMinutes *int `access:"environment_session_lengths,write_restrictable,cloud_restrictable"` SessionIdleTimeoutInMinutes *int `access:"environment_session_lengths,write_restrictable,cloud_restrictable"` WebsocketSecurePort *int `access:"write_restrictable,cloud_restrictable"` // telemetry: none WebsocketPort *int `access:"write_restrictable,cloud_restrictable"` // telemetry: none WebserverMode *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` EnableGifPicker *bool `access:"integrations_gif"` GfycatAPIKey *string `access:"integrations_gif"` GfycatAPISecret *string `access:"integrations_gif"` EnableCustomEmoji *bool `access:"site_emoji"` EnableEmojiPicker *bool `access:"site_emoji"` PostEditTimeLimit *int `access:"user_management_permissions"` TimeBetweenUserTypingUpdatesMilliseconds *int64 `access:"experimental_features,write_restrictable,cloud_restrictable"` EnablePostSearch *bool `access:"write_restrictable,cloud_restrictable"` EnableFileSearch *bool `access:"write_restrictable"` MinimumHashtagLength *int `access:"environment_database,write_restrictable,cloud_restrictable"` EnableUserTypingMessages *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` EnableChannelViewedMessages *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` EnableUserStatuses *bool `access:"write_restrictable,cloud_restrictable"` ExperimentalEnableAuthenticationTransfer *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` ClusterLogTimeoutMilliseconds *int `access:"write_restrictable,cloud_restrictable"` EnablePreviewFeatures *bool `access:"experimental_features"` EnableTutorial *bool `access:"experimental_features"` EnableOnboardingFlow *bool `access:"experimental_features"` ExperimentalEnableDefaultChannelLeaveJoinMessages *bool `access:"experimental_features"` ExperimentalGroupUnreadChannels *string `access:"experimental_features"` EnableAPITeamDeletion *bool EnableAPIUserDeletion *bool ExperimentalEnableHardenedMode *bool `access:"experimental_features"` ExperimentalStrictCSRFEnforcement *bool `access:"experimental_features,write_restrictable,cloud_restrictable"` EnableEmailInvitations *bool `access:"authentication_signup"` DisableBotsWhenOwnerIsDeactivated *bool `access:"integrations_bot_accounts,write_restrictable,cloud_restrictable"` EnableBotAccountCreation *bool `access:"integrations_bot_accounts"` EnableSVGs *bool `access:"site_posts"` EnableLatex *bool `access:"site_posts"` EnableInlineLatex *bool `access:"site_posts"` EnableAPIChannelDeletion *bool EnableLocalMode *bool LocalModeSocketLocation *string // telemetry: none EnableAWSMetering *bool // telemetry: none SplitKey *string `access:"experimental_feature_flags,write_restrictable"` // telemetry: none FeatureFlagSyncIntervalSeconds *int `access:"experimental_feature_flags,write_restrictable"` // telemetry: none DebugSplit *bool `access:"experimental_feature_flags,write_restrictable"` // telemetry: none ThreadAutoFollow *bool `access:"experimental_features"` CollapsedThreads *string `access:"experimental_features"` ManagedResourcePaths *string `access:"environment_web_server,write_restrictable,cloud_restrictable"` }
func (*ServiceSettings) SetDefaults ¶
func (s *ServiceSettings) SetDefaults(isUpdate bool)
type Session ¶
type Session struct { Id string `json:"id"` Token string `json:"token"` CreateAt int64 `json:"create_at"` ExpiresAt int64 `json:"expires_at"` LastActivityAt int64 `json:"last_activity_at"` UserId string `json:"user_id"` DeviceId string `json:"device_id"` Roles string `json:"roles"` IsOAuth bool `json:"is_oauth"` ExpiredNotify bool `json:"expired_notify"` Props StringMap `json:"props"` TeamMembers []*TeamMember `json:"team_members" db:"-"` Local bool `json:"local" db:"-"` }
Session contains the user session details. This struct's serializer methods are auto-generated. If a new field is added/removed, please run make gen-serialized.
func (*Session) GenerateCSRF ¶
func (*Session) GetTeamByTeamId ¶
func (s *Session) GetTeamByTeamId(teamId string) *TeamMember
func (*Session) GetUserRoles ¶
func (*Session) IsMobileApp ¶
func (*Session) IsOAuthUser ¶
func (*Session) IsSSOLogin ¶
func (*Session) IsUnrestricted ¶
Returns true if the session is unrestricted, which should grant it with all permissions. This is used for local mode sessions
func (*Session) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type SharedChannel ¶
type SharedChannel struct {}
SharedChannel represents a channel that can be synchronized with a remote cluster. If "home" is true, then the shared channel is homed locally and "SharedChannelRemote" table contains the remote clusters that have been invited. If "home" is false, then the shared channel is homed remotely, and "RemoteId" field points to the remote cluster connection in "RemoteClusters" table.
func (*SharedChannel) IsValid ¶
func (sc *SharedChannel) IsValid() *AppError
func (*SharedChannel) PreSave ¶
func (sc *SharedChannel) PreSave()
func (*SharedChannel) PreUpdate ¶
func (sc *SharedChannel) PreUpdate()
type SharedChannelAttachment ¶
type SharedChannelAttachment struct {}
SharedChannelAttachment stores a lastSyncAt timestamp on behalf of a remote cluster for each file attachment that has been synchronized.
func (*SharedChannelAttachment) IsValid ¶
func (scf *SharedChannelAttachment) IsValid() *AppError
func (*SharedChannelAttachment) PreSave ¶
func (scf *SharedChannelAttachment) PreSave()
type SharedChannelFilterOpts ¶
type SharedChannelFilterOpts struct {}
type SharedChannelRemote ¶
type SharedChannelRemote struct {}
SharedChannelRemote represents a remote cluster that has been invited to a shared channel.
func (*SharedChannelRemote) IsValid ¶
func (sc *SharedChannelRemote) IsValid() *AppError
func (*SharedChannelRemote) PreSave ¶
func (sc *SharedChannelRemote) PreSave()
func (*SharedChannelRemote) PreUpdate ¶
func (sc *SharedChannelRemote) PreUpdate()
type SharedChannelRemoteFilterOpts ¶
type SharedChannelRemoteFilterOpts struct {}
type SharedChannelRemoteStatus ¶
type SharedChannelRemoteStatus struct {}
type SharedChannelUser ¶
type SharedChannelUser struct {}
SharedChannelUser stores a lastSyncAt timestamp on behalf of a remote cluster for each user that has been synchronized.
func (*SharedChannelUser) IsValid ¶
func (scu *SharedChannelUser) IsValid() *AppError
func (*SharedChannelUser) PreSave ¶
func (scu *SharedChannelUser) PreSave()
type SidebarCategoriesWithChannels ¶
type SidebarCategoriesWithChannels []*SidebarCategoryWithChannels
type SidebarCategory ¶
type SidebarCategory struct { Id string `json:"id"` UserId string `json:"user_id"` TeamId string `json:"team_id"` SortOrder int64 `json:"-"` Sorting SidebarCategorySorting `json:"sorting"` Type SidebarCategoryType `json:"type"` DisplayName string `json:"display_name"` Muted bool `json:"muted"` Collapsed bool `json:"collapsed"` }
SidebarCategory represents the corresponding DB table SortOrder is never returned to the user and only used for queries
type SidebarCategoryOrder ¶
type SidebarCategoryOrder []string
type SidebarCategorySorting ¶
type SidebarCategorySorting string
type SidebarCategoryType ¶
type SidebarCategoryType string
type SidebarCategoryWithChannels ¶
type SidebarCategoryWithChannels struct { SidebarCategory Channels []string `json:"channel_ids"` }
SidebarCategoryWithChannels combines data from SidebarCategory table with the Channel IDs that belong to that category
type SidebarChannel ¶
type SidebarChannels ¶
type SidebarChannels []*SidebarChannel
type SlackAttachment ¶
type SlackAttachment struct { Id int64 `json:"id"` Fallback string `json:"fallback"` Color string `json:"color"` Pretext string `json:"pretext"` AuthorName string `json:"author_name"` AuthorLink string `json:"author_link"` AuthorIcon string `json:"author_icon"` Title string `json:"title"` TitleLink string `json:"title_link"` Text string `json:"text"` Fields []*SlackAttachmentField `json:"fields"` ImageURL string `json:"image_url"` ThumbURL string `json:"thumb_url"` Timestamp interface{} `json:"ts"` // This is either a string or an int64 Actions []*PostAction `json:"actions,omitempty"` }
func StringifySlackFieldValue ¶
func StringifySlackFieldValue(a []*SlackAttachment) []*SlackAttachment
func (*SlackAttachment) Equals ¶
func (s *SlackAttachment) Equals(input *SlackAttachment) bool
type SlackAttachmentField ¶
type SlackAttachmentField struct { Title string `json:"title"` Value interface{} `json:"value"` Short SlackCompatibleBool `json:"short"` }
func (*SlackAttachmentField) Equals ¶
func (s *SlackAttachmentField) Equals(input *SlackAttachmentField) bool
type SlackCompatibleBool ¶
type SlackCompatibleBool bool
SlackCompatibleBool is an alias for bool that implements json.Unmarshaler
func (*SlackCompatibleBool) UnmarshalJSON ¶
func (b *SlackCompatibleBool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
Slack allows bool values to be represented as strings ("true"/"false") or literals (true/false). To maintain compatibility, we define an Unmarshaler that supports both.
type SqlSettings ¶
type SqlSettings struct { DriverName *string `access:"environment_database,write_restrictable,cloud_restrictable"` DataSource *string `access:"environment_database,write_restrictable,cloud_restrictable"` // telemetry: none DataSourceReplicas []string `access:"environment_database,write_restrictable,cloud_restrictable"` DataSourceSearchReplicas []string `access:"environment_database,write_restrictable,cloud_restrictable"` MaxIdleConns *int `access:"environment_database,write_restrictable,cloud_restrictable"` ConnMaxLifetimeMilliseconds *int `access:"environment_database,write_restrictable,cloud_restrictable"` ConnMaxIdleTimeMilliseconds *int `access:"environment_database,write_restrictable,cloud_restrictable"` MaxOpenConns *int `access:"environment_database,write_restrictable,cloud_restrictable"` Trace *bool `access:"environment_database,write_restrictable,cloud_restrictable"` AtRestEncryptKey *string `access:"environment_database,write_restrictable,cloud_restrictable"` // telemetry: none QueryTimeout *int `access:"environment_database,write_restrictable,cloud_restrictable"` DisableDatabaseSearch *bool `access:"environment_database,write_restrictable,cloud_restrictable"` MigrationsStatementTimeoutSeconds *int `access:"environment_database,write_restrictable,cloud_restrictable"` ReplicaLagSettings []*ReplicaLagSettings `access:"environment_database,write_restrictable,cloud_restrictable"` // telemetry: none }
func (*SqlSettings) SetDefaults ¶
func (s *SqlSettings) SetDefaults(isUpdate bool)
type Status ¶
type StringArray ¶
type StringArray []string
func (StringArray) Contains ¶
func (sa StringArray) Contains(input string) bool
func (StringArray) Equals ¶
func (sa StringArray) Equals(input StringArray) bool
func (StringArray) Remove ¶
func (sa StringArray) Remove(input string) StringArray
func (*StringArray) Scan ¶ added in v6.1.0
func (sa *StringArray) Scan(value interface{}) error
Scan converts database column value to StringArray
type StringInterface ¶
type StringInterface map[string]interface{}
func (*StringInterface) Scan ¶ added in v6.3.0
func (si *StringInterface) Scan(value interface{}) error
type StringMap ¶
msgp StringMap
func GetDefaultChannelNotifyProps ¶
func GetDefaultChannelNotifyProps() StringMap
func (StringMap) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (StringMap) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*StringMap) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
type StripeSetupIntent ¶
StripeSetupIntent represents the SetupIntent model from Stripe for updating payment methods.
type SubmitDialogRequest ¶
type SubmitDialogRequest struct { Type string `json:"type"` URL string `json:"url,omitempty"` CallbackId string `json:"callback_id"` State string `json:"state"` UserId string `json:"user_id"` ChannelId string `json:"channel_id"` TeamId string `json:"team_id"` Submission map[string]interface{} `json:"submission"` Cancelled bool `json:"cancelled"` }
type SubmitDialogResponse ¶
type Subscription ¶
type Subscription struct { ID string `json:"id"` CustomerID string `json:"customer_id"` ProductID string `json:"product_id"` AddOns []string `json:"add_ons"` StartAt int64 `json:"start_at"` EndAt int64 `json:"end_at"` CreateAt int64 `json:"create_at"` Seats int `json:"seats"` Status string `json:"status"` DNS string `json:"dns"` IsPaidTier string `json:"is_paid_tier"` LastInvoice *Invoice `json:"last_invoice"` IsFreeTrial string `json:"is_free_trial"` TrialEndAt int64 `json:"trial_end_at"` }
Subscription model represents a subscription on the system.
func (*Subscription) GetWorkSpaceNameFromDNS ¶
func (s *Subscription) GetWorkSpaceNameFromDNS() string
GetWorkSpaceNameFromDNS returns the work space name. For example from test.mattermost.cloud.com, it returns test
type SubscriptionChange ¶
type SubscriptionChange struct {
ProductID string `json:"product_id"`
}
type SubscriptionFamily ¶
type SubscriptionFamily string
type SubscriptionStats ¶
type SuggestCommand ¶
type SupportPacket ¶
type SupportPacket struct { ServerOS string `yaml:"server_os"` ServerArchitecture string `yaml:"server_architecture"` DatabaseType string `yaml:"database_type"` DatabaseVersion string `yaml:"database_version"` LdapVendorName string `yaml:"ldap_vendor_name,omitempty"` LdapVendorVersion string `yaml:"ldap_vendor_version,omitempty"` ElasticServerVersion string `yaml:"elastic_server_version,omitempty"` ElasticServerPlugins []string `yaml:"elastic_server_plugins,omitempty"` }
type SupportSettings ¶
type SupportSettings struct { TermsOfServiceLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` PrivacyPolicyLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` AboutLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` HelpLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` ReportAProblemLink *string `access:"site_customization,write_restrictable,cloud_restrictable"` SupportEmail *string `access:"site_customization"` CustomTermsOfServiceEnabled *bool `access:"compliance_custom_terms_of_service"` CustomTermsOfServiceReAcceptancePeriod *int `access:"compliance_custom_terms_of_service"` EnableAskCommunityLink *bool `access:"site_customization"` }
func (*SupportSettings) SetDefaults ¶
func (s *SupportSettings) SetDefaults()
type SwitchRequest ¶
type SwitchRequest struct { CurrentService string `json:"current_service"` NewService string `json:"new_service"` Email string `json:"email"` Password string `json:"password"` NewPassword string `json:"new_password"` MfaCode string `json:"mfa_code"` LdapLoginId string `json:"ldap_id"` }
func (*SwitchRequest) EmailToLdap ¶
func (o *SwitchRequest) EmailToLdap() bool
func (*SwitchRequest) EmailToOAuth ¶
func (o *SwitchRequest) EmailToOAuth() bool
func (*SwitchRequest) LdapToEmail ¶
func (o *SwitchRequest) LdapToEmail() bool
func (*SwitchRequest) OAuthToEmail ¶
func (o *SwitchRequest) OAuthToEmail() bool
type SystemAsymmetricSigningKey ¶
type SystemAsymmetricSigningKey struct {
ECDSAKey *SystemECDSAKey `json:"ecdsa_key,omitempty"`
}
type SystemECDSAKey ¶
type SystemPostActionCookieSecret ¶
type SystemPostActionCookieSecret struct {
Secret []byte `json:"key,omitempty"`
}
type Team ¶
type Team 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"` Type string `json:"type"` CompanyName string `json:"company_name"` AllowedDomains string `json:"allowed_domains"` InviteId string `json:"invite_id"` AllowOpenInvite bool `json:"allow_open_invite"` LastTeamIconUpdate int64 `json:"last_team_icon_update,omitempty"` SchemeId *string `json:"scheme_id"` GroupConstrained *bool `json:"group_constrained"` PolicyID *string `json:"policy_id" db:"-"` }
func (*Team) IsGroupConstrained ¶
type TeamForExport ¶
type TeamInviteReminderData ¶ added in v6.2.0
type TeamInviteReminderData struct {
Interval string
}
type TeamMember ¶
type TeamMember struct { TeamId string `json:"team_id"` UserId string `json:"user_id"` Roles string `json:"roles"` DeleteAt int64 `json:"delete_at"` SchemeGuest bool `json:"scheme_guest"` SchemeUser bool `json:"scheme_user"` SchemeAdmin bool `json:"scheme_admin"` ExplicitRoles string `json:"explicit_roles"` }
This struct's serializer methods are auto-generated. If a new field is added/removed, please run make gen-serialized.
func TeamMembersWithErrorToTeamMembers ¶
func TeamMembersWithErrorToTeamMembers(o []*TeamMemberWithError) []*TeamMember
func (*TeamMember) DecodeMsg ¶
func (z *TeamMember) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*TeamMember) EncodeMsg ¶
func (z *TeamMember) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*TeamMember) GetRoles ¶
func (o *TeamMember) GetRoles() []string
func (*TeamMember) IsValid ¶
func (o *TeamMember) IsValid() *AppError
func (*TeamMember) MarshalMsg ¶
func (z *TeamMember) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*TeamMember) Msgsize ¶
func (z *TeamMember) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TeamMember) PreUpdate ¶
func (o *TeamMember) PreUpdate()
func (*TeamMember) UnmarshalMsg ¶
func (z *TeamMember) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type TeamMemberForExport ¶
type TeamMemberForExport struct { TeamMember TeamName string }
type TeamMemberWithError ¶
type TeamMemberWithError struct { UserId string `json:"user_id"` Member *TeamMember `json:"member"` Error *AppError `json:"error"` }
type TeamMembersGetOptions ¶
type TeamMembersGetOptions struct { // Sort the team members. Accepts "Username", but defaults to "Id". Sort string // If true, exclude team members whose corresponding user is deleted. ExcludeDeletedUsers bool // Restrict to search in a list of teams and channels ViewRestrictions *ViewUsersRestrictions }
type TeamSearch ¶
type TeamSearch struct { Term string `json:"term"` Page *int `json:"page,omitempty"` PerPage *int `json:"per_page,omitempty"` AllowOpenInvite *bool `json:"allow_open_invite,omitempty"` GroupConstrained *bool `json:"group_constrained,omitempty"` IncludeGroupConstrained *bool `json:"include_group_constrained,omitempty"` PolicyID *string `json:"policy_id,omitempty"` ExcludePolicyConstrained *bool `json:"exclude_policy_constrained,omitempty"` IncludePolicyID *bool `json:"-"` IncludeDeleted *bool `json:"-"` TeamType *string `json:"-"` }
func (*TeamSearch) IsPaginated ¶
func (t *TeamSearch) IsPaginated() bool
type TeamSettings ¶
type TeamSettings struct { SiteName *string `access:"site_customization"` MaxUsersPerTeam *int `access:"site_users_and_teams"` EnableUserCreation *bool `access:"authentication_signup"` EnableOpenServer *bool `access:"authentication_signup"` EnableUserDeactivation *bool `access:"experimental_features"` RestrictCreationToDomains *string `access:"authentication_signup"` // telemetry: none EnableCustomUserStatuses *bool `access:"site_users_and_teams"` EnableCustomBrand *bool `access:"site_customization"` CustomBrandText *string `access:"site_customization"` CustomDescriptionText *string `access:"site_customization"` RestrictDirectMessage *string `access:"site_users_and_teams"` UserStatusAwayTimeout *int64 `access:"experimental_features"` MaxChannelsPerTeam *int64 `access:"site_users_and_teams"` MaxNotificationsPerChannel *int64 `access:"environment_push_notification_server"` EnableConfirmNotificationsToChannel *bool `access:"site_notifications"` TeammateNameDisplay *string `access:"site_users_and_teams"` ExperimentalViewArchivedChannels *bool `access:"experimental_features,site_users_and_teams"` ExperimentalEnableAutomaticReplies *bool `access:"experimental_features"` LockTeammateNameDisplay *bool `access:"site_users_and_teams"` ExperimentalPrimaryTeam *string `access:"experimental_features"` ExperimentalDefaultChannels []string `access:"experimental_features"` }
func (*TeamSettings) SetDefaults ¶
func (s *TeamSettings) SetDefaults()
type TeamUnread ¶
type TeamUnread struct { TeamId string `json:"team_id"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` MentionCountRoot int64 `json:"mention_count_root"` MsgCountRoot int64 `json:"msg_count_root"` ThreadCount int64 `json:"thread_count"` ThreadMentionCount int64 `json:"thread_mention_count"` }
type TeamsWithCount ¶
type TermsOfService ¶
type TermsOfService struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UserId string `json:"user_id"` Text string `json:"text"` }
func (*TermsOfService) IsValid ¶
func (t *TermsOfService) IsValid() *AppError
func (*TermsOfService) PreSave ¶
func (t *TermsOfService) PreSave()
type ThemeSettings ¶
type ThemeSettings struct { EnableThemeSelection *bool `access:"experimental_features"` DefaultTheme *string `access:"experimental_features"` AllowCustomThemes *bool `access:"experimental_features"` AllowedThemes []string }
func (*ThemeSettings) SetDefaults ¶
func (s *ThemeSettings) SetDefaults()
type Thread ¶
type Thread struct { PostId string `json:"id"` ChannelId string `json:"channel_id"` ReplyCount int64 `json:"reply_count"` LastReplyAt int64 `json:"last_reply_at"` Participants StringArray `json:"participants"` }
type ThreadMembership ¶
type ThreadResponse ¶
type ThreadResponse struct { PostId string `json:"id"` ReplyCount int64 `json:"reply_count"` LastReplyAt int64 `json:"last_reply_at"` LastViewedAt int64 `json:"last_viewed_at"` Participants []*User `json:"participants"` Post *Post `json:"post"` UnreadReplies int64 `json:"unread_replies"` UnreadMentions int64 `json:"unread_mentions"` }
type Threads ¶
type Threads struct { Total int64 `json:"total"` TotalUnreadThreads int64 `json:"total_unread_threads"` TotalUnreadMentions int64 `json:"total_unread_mentions"` Threads []*ThreadResponse `json:"threads"` }
type TrialLicenseRequest ¶
type TrialLicenseRequest struct { ServerID string `json:"server_id"` Email string `json:"email"` Name string `json:"name"` SiteURL string `json:"site_url"` SiteName string `json:"site_name"` Users int `json:"users"` TermsAccepted bool `json:"terms_accepted"` ReceiveEmailsAccepted bool `json:"receive_emails_accepted"` }
type TypingRequest ¶
type UploadSession ¶
type UploadSession struct { // The unique identifier for the session. Id string `json:"id"` // The type of the upload. Type UploadType `json:"type"` // The timestamp of creation. CreateAt int64 `json:"create_at"` // The id of the user performing the upload. UserId string `json:"user_id"` // The id of the channel to upload to. ChannelId string `json:"channel_id,omitempty"` // The name of the file to upload. Filename string `json:"filename"` // The path where the file is stored. Path string `json:"-"` // The size of the file to upload. FileSize int64 `json:"file_size"` // The amount of received data in bytes. If equal to FileSize it means the // upload has finished. FileOffset int64 `json:"file_offset"` // Id of remote cluster if uploading for shared channel RemoteId string `json:"remote_id"` // Requested file id if uploading for shared channel ReqFileId string `json:"req_file_id"` }
UploadSession contains information used to keep track of a file upload.
func (*UploadSession) IsValid ¶
func (us *UploadSession) IsValid() *AppError
IsValid validates an UploadSession. It returns an error in case of failure.
func (*UploadSession) PreSave ¶
func (us *UploadSession) PreSave()
PreSave is a utility function used to fill required information.
type UploadType ¶
type UploadType string
UploadType defines the type of an upload.
const ( UploadTypeAttachment UploadType = "attachment" UploadTypeImport UploadType = "import" )
func (UploadType) IsValid ¶
func (t UploadType) IsValid() error
IsValid validates an UploadType. It returns an error in case of failure.
type User ¶
type User struct { Id string `json:"id"` CreateAt int64 `json:"create_at,omitempty"` UpdateAt int64 `json:"update_at,omitempty"` DeleteAt int64 `json:"delete_at"` Username string `json:"username"` Password string `json:"password,omitempty"` AuthData *string `json:"auth_data,omitempty"` AuthService string `json:"auth_service"` Email string `json:"email"` EmailVerified bool `json:"email_verified,omitempty"` Nickname string `json:"nickname"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Position string `json:"position"` Roles string `json:"roles"` AllowMarketing bool `json:"allow_marketing,omitempty"` Props StringMap `json:"props,omitempty"` NotifyProps StringMap `json:"notify_props,omitempty"` LastPasswordUpdate int64 `json:"last_password_update,omitempty"` LastPictureUpdate int64 `json:"last_picture_update,omitempty"` FailedAttempts int `json:"failed_attempts,omitempty"` Locale string `json:"locale"` Timezone StringMap `json:"timezone"` MfaActive bool `json:"mfa_active,omitempty"` MfaSecret string `json:"mfa_secret,omitempty"` RemoteId *string `json:"remote_id,omitempty"` LastActivityAt int64 `db:"-" json:"last_activity_at,omitempty"` IsBot bool `db:"-" json:"is_bot,omitempty"` BotDescription string `db:"-" json:"bot_description,omitempty"` BotLastIconUpdate int64 `db:"-" json:"bot_last_icon_update,omitempty"` TermsOfServiceId string `db:"-" json:"terms_of_service_id,omitempty"` TermsOfServiceCreateAt int64 `db:"-" json:"terms_of_service_create_at,omitempty"` DisableWelcomeEmail bool `db:"-" json:"disable_welcome_email"` }
User contains the details about the user. This struct's serializer methods are auto-generated. If a new field is added/removed, please run make gen-serialized.
func UserFromBot ¶
UserFromBot returns a user model describing the bot fields stored in the User store.
func (*User) AddNotifyProp ¶
func (*User) ClearCustomStatus ¶
func (u *User) ClearCustomStatus()
func (*User) ClearNonProfileFields ¶
func (u *User) ClearNonProfileFields()
func (*User) GetCustomStatus ¶ added in v6.2.0
func (u *User) GetCustomStatus() *CustomStatus
func (*User) GetDisplayName ¶
func (*User) GetDisplayNameWithPrefix ¶
func (*User) GetFullName ¶
func (*User) GetMentionKeys ¶
func (*User) GetPreferredTimezone ¶
func (*User) GetRawRoles ¶
func (*User) GetRemoteID ¶
GetRemoteID returns the remote id for this user or "" if not a remote user.
func (*User) IsGuest ¶
Make sure you actually want to use this function. In context.go there are functions to check permissions This function should not be used to check permissions.
func (*User) IsInRole ¶
Make sure you actually want to use this function. In context.go there are functions to check permissions This function should not be used to check permissions.
func (*User) IsLDAPUser ¶
func (*User) IsOAuthUser ¶
func (*User) IsRemote ¶
IsRemote returns true if the user belongs to a remote cluster (has RemoteId).
func (*User) IsSAMLUser ¶
func (*User) IsSystemAdmin ¶
func (*User) IsValid ¶
IsValid validates the user and returns an error if it isn't configured correctly.
func (*User) MakeNonNil ¶
func (u *User) MakeNonNil()
func (*User) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*User) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*User) PreSave ¶
func (u *User) PreSave()
PreSave will set the Id and Username if missing. It will also fill in the CreateAt, UpdateAt times. It will also hash the password. It should be run before saving the user to the db.
func (*User) PreUpdate ¶
func (u *User) PreUpdate()
PreUpdate should be run before updating the user in the db.
func (*User) SanitizeInput ¶
Remove any input data from the user object that is not user controlled
func (*User) SanitizeProfile ¶
func (*User) SetCustomStatus ¶
func (u *User) SetCustomStatus(cs *CustomStatus) error
func (*User) SetDefaultNotifications ¶
func (u *User) SetDefaultNotifications()
func (*User) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*User) UpdateMentionKeysFromUsername ¶
type UserAccessToken ¶
type UserAccessToken struct { Id string `json:"id"` Token string `json:"token,omitempty"` UserId string `json:"user_id"` Description string `json:"description"` IsActive bool `json:"is_active"` }
func (*UserAccessToken) IsValid ¶
func (t *UserAccessToken) IsValid() *AppError
func (*UserAccessToken) PreSave ¶
func (t *UserAccessToken) PreSave()
type UserAccessTokenSearch ¶
type UserAccessTokenSearch struct {
Term string `json:"term"`
}
type UserAutocomplete ¶
type UserAutocompleteInTeam ¶
type UserAutocompleteInTeam struct {
InTeam []*User `json:"in_team"`
}
type UserChannelIDPair ¶
type UserCountOptions ¶
type UserCountOptions struct { // Should include users that are bots IncludeBotAccounts bool // Should include deleted users (of any type) IncludeDeleted bool // Exclude regular users ExcludeRegularUsers bool // Only include users on a specific team. "" for any team. TeamId string // Only include users on a specific channel. "" for any channel. ChannelId string // Restrict to search in a list of teams and channels ViewRestrictions *ViewUsersRestrictions // Only include users matching any of the given system wide roles. Roles []string // Only include users matching any of the given channel roles, must be used with ChannelId. ChannelRoles []string // Only include users matching any of the given team roles, must be used with TeamId. TeamRoles []string }
Options for counting users
type UserForIndexing ¶
type UserForIndexing struct { Id string `json:"id"` Username string `json:"username"` Nickname string `json:"nickname"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Roles string `json:"roles"` CreateAt int64 `json:"create_at"` DeleteAt int64 `json:"delete_at"` TeamsIds []string `json:"team_id"` ChannelsIds []string `json:"channel_id"` }
type UserGetByIdsOptions ¶
type UserGetByIdsOptions struct { // Since filters the users based on their UpdateAt timestamp. Since int64 }
type UserGetOptions ¶
type UserGetOptions struct { // Filters the users in the team InTeamId string // Filters the users not in the team NotInTeamId string // Filters the users in the channel InChannelId string // Filters the users not in the channel NotInChannelId string // Filters the users in the group InGroupId string // Filters the users group constrained GroupConstrained bool // Filters the users without a team WithoutTeam bool // Filters the inactive users Inactive bool // Filters the active users Active bool // Filters for the given role Role string // Filters for users matching any of the given system wide roles Roles []string // Filters for users matching any of the given channel roles, must be used with InChannelId ChannelRoles []string // Filters for users matching any of the given team roles, must be used with InTeamId TeamRoles []string // Sorting option Sort string // Restrict to search in a list of teams and channels ViewRestrictions *ViewUsersRestrictions // Page Page int // Page size PerPage int }
type UserMap ¶
UserMap is a map from a userId to a user object. It is used to generate methods which can be used for fast serialization/de-serialization.
func (UserMap) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type UserMentionMap ¶
func UserMentionMapFromURLValues ¶
func UserMentionMapFromURLValues(values url.Values) (UserMentionMap, error)
func (UserMentionMap) ToURLValues ¶
func (m UserMentionMap) ToURLValues() url.Values
type UserPatch ¶
type UserPatch struct { Username *string `json:"username"` Password *string `json:"password,omitempty"` Nickname *string `json:"nickname"` FirstName *string `json:"first_name"` LastName *string `json:"last_name"` Position *string `json:"position"` Email *string `json:"email"` Props StringMap `json:"props,omitempty"` NotifyProps StringMap `json:"notify_props,omitempty"` Locale *string `json:"locale"` Timezone StringMap `json:"timezone"` RemoteId *string `json:"remote_id"` }
type UserSearch ¶
type UserSearch struct { Term string `json:"term"` TeamId string `json:"team_id"` NotInTeamId string `json:"not_in_team_id"` InChannelId string `json:"in_channel_id"` NotInChannelId string `json:"not_in_channel_id"` InGroupId string `json:"in_group_id"` GroupConstrained bool `json:"group_constrained"` AllowInactive bool `json:"allow_inactive"` WithoutTeam bool `json:"without_team"` Limit int `json:"limit"` Role string `json:"role"` Roles []string `json:"roles"` ChannelRoles []string `json:"channel_roles"` TeamRoles []string `json:"team_roles"` }
UserSearch captures the parameters provided by a client for initiating a user search.
type UserSearchOptions ¶
type UserSearchOptions struct { // IsAdmin tracks whether or not the search is being conducted by an administrator. IsAdmin bool // AllowEmails allows search to examine the emails of users. AllowEmails bool // AllowFullNames allows search to examine the full names of users, vs. just usernames and nicknames. AllowFullNames bool // AllowInactive configures whether or not to return inactive users in the search results. AllowInactive bool // Narrows the search to the group constrained users GroupConstrained bool // Limit limits the total number of results returned. Limit int // Filters for the given role Role string // Filters for users that have any of the given system roles Roles []string // Filters for users that have the given channel roles to be used when searching in a channel ChannelRoles []string // Filters for users that have the given team roles to be used when searching in a team TeamRoles []string // Restrict to search in a list of teams and channels ViewRestrictions *ViewUsersRestrictions // List of allowed channels ListOfAllowedChannels []string }
UserSearchOptions captures internal parameters derived from the user's permissions and a UserSearch request.
type UserSlice ¶
type UserSlice []*User
func (UserSlice) FilterByActive ¶
func (UserSlice) FilterByID ¶
func (UserSlice) FilterWithoutBots ¶
func (UserSlice) FilterWithoutID ¶
type UserTeamIDPair ¶
type UserTermsOfService ¶
type UserTermsOfService struct { UserId string `json:"user_id"` TermsOfServiceId string `json:"terms_of_service_id"` CreateAt int64 `json:"create_at"` }
func (*UserTermsOfService) IsValid ¶
func (ut *UserTermsOfService) IsValid() *AppError
func (*UserTermsOfService) PreSave ¶
func (ut *UserTermsOfService) PreSave()
type UserUpdate ¶
type UserWithGroups ¶
type UserWithGroups struct { User GroupIDs *string `json:"-"` Groups []*Group `json:"groups"` SchemeGuest bool `json:"scheme_guest"` SchemeUser bool `json:"scheme_user"` SchemeAdmin bool `json:"scheme_admin"` }
func (*UserWithGroups) GetGroupIDs ¶
func (u *UserWithGroups) GetGroupIDs() []string
type UsersStats ¶
type UsersStats struct {
TotalUsersCount int64 `json:"total_users_count"`
}
type UsersWithGroupsAndCount ¶
type UsersWithGroupsAndCount struct { Users []*UserWithGroups `json:"users"` Count int64 `json:"total_count"` }
type ViewUsersRestrictions ¶
func (*ViewUsersRestrictions) Hash ¶
func (r *ViewUsersRestrictions) Hash() string
type WarnMetric ¶
type WarnMetricDisplayTexts ¶
type WarnMetricStatus ¶
type WebSocketClient ¶
type WebSocketClient struct { URL string // The location of the server like "ws://localhost:8065" APIURL string // The API location of the server like "ws://localhost:8065/api/v3" ConnectURL string // The WebSocket URL to connect to like "ws://localhost:8065/api/v3/path/to/websocket" Conn *websocket.Conn // The WebSocket connection AuthToken string // The token used to open the WebSocket connection Sequence int64 // The ever-incrementing sequence attached to each WebSocket action PingTimeoutChannel chan bool // The channel used to signal ping timeouts EventChannel chan *WebSocketEvent // The channel used to receive various events pushed from the server. For example: typing, posted ResponseChannel chan *WebSocketResponse // The channel used to receive responses for requests made to the server ListenError *AppError // A field that is set if there was an abnormal closure of the WebSocket connection // contains filtered or unexported fields }
WebSocketClient stores the necessary information required to communicate with a WebSocket endpoint. A client must read from PingTimeoutChannel, EventChannel and ResponseChannel to prevent deadlocks from occurring in the program.
func NewReliableWebSocketClientWithDialer ¶ added in v6.2.0
func NewWebSocketClient ¶
func NewWebSocketClient(url, authToken string) (*WebSocketClient, error)
NewWebSocketClient constructs a new WebSocket client with convenience methods for talking to the server.
func NewWebSocketClient4 ¶
func NewWebSocketClient4(url, authToken string) (*WebSocketClient, error)
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, error)
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, error)
NewWebSocketClientWithDialer constructs a new WebSocket client with convenience methods for talking to the server using a custom dialer.
func (*WebSocketClient) Close ¶
func (wsc *WebSocketClient) Close()
Close closes the websocket client. It is recommended that a closed client should not be reused again. Rather a new client should be created anew.
func (*WebSocketClient) Connect ¶
func (wsc *WebSocketClient) Connect() *AppError
Connect creates a websocket connection with the given ConnectURL. This is racy and error-prone should not be used. Use any of the New* functions to create a websocket.
func (*WebSocketClient) ConnectWithDialer ¶
func (wsc *WebSocketClient) ConnectWithDialer(dialer *websocket.Dialer) *AppError
ConnectWithDialer creates a websocket connection with the given ConnectURL using the dialer. This is racy and error-prone and should not be used. Use any of the New* functions to create a websocket.
func (*WebSocketClient) GetStatuses ¶
func (wsc *WebSocketClient) GetStatuses()
GetStatuses will return a map of string statuses using user id as the key
func (*WebSocketClient) GetStatusesByIds ¶
func (wsc *WebSocketClient) GetStatusesByIds(userIds []string)
GetStatusesByIds will fetch certain user statuses based on ids and return a map of string statuses using user id as the key
func (*WebSocketClient) Listen ¶
func (wsc *WebSocketClient) Listen()
Listen starts the read loop of the websocket client.
func (*WebSocketClient) SendBinaryMessage ¶ added in v6.3.0
func (wsc *WebSocketClient) SendBinaryMessage(action string, data map[string]interface{}) error
func (*WebSocketClient) SendMessage ¶
func (wsc *WebSocketClient) SendMessage(action string, data map[string]interface{})
func (*WebSocketClient) UserTyping ¶
func (wsc *WebSocketClient) UserTyping(channelId, parentId string)
UserTyping will push a user_typing event out to all connected users who are in the specified channel
type WebSocketEvent ¶
type WebSocketEvent struct {
// contains filtered or unexported fields
}
func NewWebSocketEvent ¶
func NewWebSocketEvent(event, teamId, channelId, userId string, omitUsers map[string]bool) *WebSocketEvent
func WebSocketEventFromJSON ¶
func WebSocketEventFromJSON(data io.Reader) (*WebSocketEvent, error)
func (*WebSocketEvent) Add ¶
func (ev *WebSocketEvent) Add(key string, value interface{})
func (*WebSocketEvent) Copy ¶
func (ev *WebSocketEvent) Copy() *WebSocketEvent
func (*WebSocketEvent) DeepCopy ¶ added in v6.2.0
func (ev *WebSocketEvent) DeepCopy() *WebSocketEvent
func (*WebSocketEvent) Encode ¶
func (ev *WebSocketEvent) Encode(enc *json.Encoder) error
Encode encodes the event to the given encoder.
func (*WebSocketEvent) EventType ¶
func (ev *WebSocketEvent) EventType() string
func (*WebSocketEvent) GetBroadcast ¶
func (ev *WebSocketEvent) GetBroadcast() *WebsocketBroadcast
func (*WebSocketEvent) GetData ¶
func (ev *WebSocketEvent) GetData() map[string]interface{}
func (*WebSocketEvent) GetSequence ¶
func (ev *WebSocketEvent) GetSequence() int64
func (*WebSocketEvent) IsValid ¶
func (ev *WebSocketEvent) IsValid() bool
func (*WebSocketEvent) PrecomputeJSON ¶
func (ev *WebSocketEvent) PrecomputeJSON() *WebSocketEvent
PrecomputeJSON precomputes and stores the serialized JSON for all fields other than Sequence. This makes ToJSON much more efficient when sending the same event to multiple connections.
func (*WebSocketEvent) SetBroadcast ¶
func (ev *WebSocketEvent) SetBroadcast(broadcast *WebsocketBroadcast) *WebSocketEvent
func (*WebSocketEvent) SetData ¶
func (ev *WebSocketEvent) SetData(data map[string]interface{}) *WebSocketEvent
func (*WebSocketEvent) SetEvent ¶
func (ev *WebSocketEvent) SetEvent(event string) *WebSocketEvent
func (*WebSocketEvent) SetSequence ¶
func (ev *WebSocketEvent) SetSequence(seq int64) *WebSocketEvent
func (*WebSocketEvent) ToJSON ¶
func (ev *WebSocketEvent) ToJSON() ([]byte, error)
type WebSocketMessage ¶
type WebSocketRequest ¶
type WebSocketRequest struct { // Client-provided fields Seq int64 `json:"seq" msgpack:"seq"` // A counter which is incremented for every request made. Action string `json:"action" msgpack:"action"` // The action to perform for a request. For example: get_statuses, user_typing. Data map[string]interface{} `json:"data" msgpack:"data"` // The metadata for an action. // Server-provided fields Session Session `json:"-" msgpack:"-"` T i18n.TranslateFunc `json:"-" msgpack:"-"` Locale string `json:"-" msgpack:"-"` }
WebSocketRequest represents a request made to the server through a websocket.
func (*WebSocketRequest) Clone ¶
func (o *WebSocketRequest) Clone() (*WebSocketRequest, error)
type WebSocketResponse ¶
type WebSocketResponse struct { Status string `json:"status"` // The status of the response. For example: OK, FAIL. SeqReply int64 `json:"seq_reply,omitempty"` // A counter which is incremented for every response sent. Data map[string]interface{} `json:"data,omitempty"` // The data contained in the response. Error *AppError `json:"error,omitempty"` // A field that is set if any error has occurred. }
WebSocketResponse represents a response received through the WebSocket for a request made to the server. This is available through the ResponseChannel channel in WebSocketClient.
func NewWebSocketError ¶
func NewWebSocketError(seqReply int64, err *AppError) *WebSocketResponse
func NewWebSocketResponse ¶
func NewWebSocketResponse(status string, seqReply int64, data map[string]interface{}) *WebSocketResponse
func WebSocketResponseFromJSON ¶
func WebSocketResponseFromJSON(data io.Reader) (*WebSocketResponse, error)
func (*WebSocketResponse) Add ¶
func (m *WebSocketResponse) Add(key string, value interface{})
func (*WebSocketResponse) EventType ¶
func (m *WebSocketResponse) EventType() string
func (*WebSocketResponse) IsValid ¶
func (m *WebSocketResponse) IsValid() bool
func (*WebSocketResponse) ToJSON ¶
func (m *WebSocketResponse) ToJSON() ([]byte, error)
type WebsocketBroadcast ¶
type WebsocketBroadcast struct { OmitUsers map[string]bool `json:"omit_users"` // broadcast is omitted for users listed here UserId string `json:"user_id"` // broadcast only occurs for this user ChannelId string `json:"channel_id"` // broadcast only occurs for users in this channel TeamId string `json:"team_id"` // broadcast only occurs for users in this team ContainsSanitizedData bool `json:"-"` ContainsSensitiveData bool `json:"-"` }
type X509Certificate ¶
type X509Data ¶
type X509Data struct { XMLName xml.Name X509Certificate X509Certificate `xml:"X509Certificate"` }
Source Files ¶
- access.go
- analytics_row.go
- audit.go
- auditconv.go
- audits.go
- authorize.go
- bot.go
- builtin.go
- bundle_info.go
- channel.go
- channel_count.go
- channel_data.go
- channel_list.go
- channel_member.go
- channel_member_history.go
- channel_member_history_result.go
- channel_mentions.go
- channel_search.go
- channel_sidebar.go
- channel_stats.go
- channel_view.go
- client4.go
- cloud.go
- cluster_discovery.go
- cluster_info.go
- cluster_message.go
- cluster_stats.go
- command.go
- command_args.go
- command_autocomplete.go
- command_request.go
- command_response.go
- command_webhook.go
- compliance.go
- compliance_post.go
- config.go
- custom_status.go
- data_retention_policy.go
- emoji.go
- emoji_data.go
- emoji_search.go
- feature_flags.go
- file.go
- file_info.go
- file_info_list.go
- file_info_search_results.go
- gitlab.go
- group.go
- group_member.go
- group_syncable.go
- guest_invite.go
- incoming_webhook.go
- initial_load.go
- integration_action.go
- integrity.go
- job.go
- ldap.go
- license.go
- link_metadata.go
- manifest.go
- marketplace_plugin.go
- mention_map.go
- message_export.go
- mfa_secret.go
- migration.go
- oauth.go
- outgoing_webhook.go
- permalink.go
- permission.go
- plugin_cluster_event.go
- plugin_event_data.go
- plugin_key_value.go
- plugin_kvset_options.go
- plugin_status.go
- plugin_valid.go
- plugins_response.go
- post.go
- post_embed.go
- post_list.go
- post_metadata.go
- post_search_results.go
- preference.go
- product_notices.go
- push_notification.go
- push_response.go
- reaction.go
- remote_cluster.go
- role.go
- saml.go
- scheduled_task.go
- scheme.go
- search_params.go
- security_bulletin.go
- session.go
- session_serial_gen.go
- shared_channel.go
- slack_attachment.go
- slack_compatibility.go
- status.go
- suggest_command.go
- switch_request.go
- system.go
- team.go
- team_member.go
- team_member_serial_gen.go
- team_search.go
- team_stats.go
- terms_of_service.go
- thread.go
- token.go
- typing_request.go
- upload_session.go
- user.go
- user_access_token.go
- user_access_token_search.go
- user_autocomplete.go
- user_count.go
- user_get.go
- user_search.go
- user_serial_gen.go
- user_terms_of_service.go
- users_stats.go
- utils.go
- version.go
- websocket_client.go
- websocket_message.go
- websocket_request.go