Documentation ¶
Index ¶
- Constants
- Variables
- func AppErrorInit(t goi18n.TranslateFunc)
- func ArrayFromInterface(data interface{}) []string
- func ArrayFromJson(data io.Reader) []string
- func ArrayToJson(objmap []string) string
- func ChannelMentions(message string) []string
- func CheckStatusOK(r *http.Response) bool
- func CleanTeamName(s string) string
- func CleanUsername(s string) string
- func ClearMentionTags(post string) string
- func ClusterInfosToJson(objmap []*ClusterInfo) string
- func CommandListToJson(l []*Command) string
- func ComparePassword(hash string, password string) bool
- func CompliancePostHeader() []string
- func CopyStringMap(originalMap map[string]string) map[string]string
- func EmojiListToJson(emojiList []*Emoji) string
- func Etag(parts ...interface{}) string
- func FileInfosToJson(infos []*FileInfo) string
- func FloorToNearestHour(ms int64) int64
- func GenerateLinkMetadataHash(url string, timestamp int64) int64
- func GetDMNameFromIds(userId1, userId2 string) string
- func GetEndOfDayMillis(thisTime time.Time, timeZoneOffset int) int64
- func GetEtagForFileInfos(infos []*FileInfo) string
- func GetGroupDisplayNameFromUsers(users []*User, truncate bool) string
- func GetGroupNameFromUserIds(userIds []string) string
- func GetImageMimeType(ext string) string
- func GetInfoForBytes(name string, data []byte) (*FileInfo, *AppError)
- func GetMillis() int64
- func GetMillisForTime(thisTime time.Time) int64
- func GetPreferredTimezone(timezone StringMap) string
- func GetPreviousVersion(version string) string
- func GetServerIpAddress() string
- func GetStartOfDayMillis(thisTime time.Time, timeZoneOffset int) int64
- func HashPassword(password string) string
- func IncomingWebhookListToJson(l []*IncomingWebhook) string
- func IncomingWebhookRequestFromJson(data io.Reader) (*IncomingWebhookRequest, *AppError)
- func IsChannelMarkUnreadLevelValid(markUnreadLevel string) bool
- func IsChannelNotifyLevelValid(notifyLevel string) bool
- func IsCurrentVersion(versionToCheck string) bool
- func IsDomainName(s string) bool
- func IsFileExtImage(ext string) bool
- func IsIgnoreChannelMentionsValid(ignoreChannelMentions string) bool
- func IsInRole(userRoles string, inRole string) bool
- func IsLower(s string) bool
- func IsPreviousVersionsSupported(versionToCheck string) bool
- func IsReservedTeamName(s string) bool
- func IsSafeLink(link *string) bool
- func IsSendEmailValid(sendEmail string) bool
- func IsValidAlphaNum(s string) bool
- func IsValidAlphaNumHyphenUnderscore(s string, withFormat bool) bool
- func IsValidChannelIdentifier(s string) bool
- func IsValidCommentsNotifyLevel(notifyLevel string) bool
- func IsValidEmail(email string) bool
- func IsValidEmailBatchingInterval(emailInterval string) bool
- func IsValidHttpUrl(rawUrl string) bool
- func IsValidId(value string) bool
- func IsValidLocale(locale string) bool
- func IsValidNumberString(value string) bool
- func IsValidPushStatusNotifyLevel(notifyLevel string) bool
- func IsValidRoleName(roleName string) bool
- func IsValidSchemeName(name string) bool
- func IsValidTeamName(s string) bool
- func IsValidTrueOrFalseString(value string) bool
- func IsValidTurnOrStunServer(rawUri string) bool
- func IsValidUserNotifyLevel(notifyLevel string) bool
- func IsValidUserRoles(userRoles string) bool
- func IsValidUsername(s string) bool
- func IsValidWebsocketUrl(rawUrl string) bool
- func JobsToJson(jobs []*Job) string
- func MakeDefaultRoles() map[string]*Role
- func ManifestListToJson(m []*Manifest) string
- func MapBoolFromJson(data io.Reader) map[string]bool
- func MapBoolToJson(objmap map[string]bool) string
- func MapFromJson(data io.Reader) map[string]string
- func MapPostIdToReactionsFromJson(data io.Reader) map[string][]*Reaction
- func MapPostIdToReactionsToJson(o map[string][]*Reaction) string
- func MapToJson(objmap map[string]string) string
- func NewBool(b bool) *bool
- func NewId() string
- func NewInt(n int) *int
- func NewInt64(n int64) *int64
- func NewRandomString(length int) string
- func NewString(s string) *string
- func NewWebSocketClient(url, authToken string) (*WebSocketClient, *AppError)
- func NewWebSocketClient4(url, authToken string) (*WebSocketClient, *AppError)
- func NewWebSocketClient4WithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)
- func NewWebSocketClientWithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)
- func NormalizeEmail(email string) string
- func NormalizeUsername(username string) string
- func OAuthAppListToJson(l []*OAuthApp) string
- func OutgoingWebhookListToJson(l []*OutgoingWebhook) string
- func PadDateStringZeros(dateString string) string
- func ParseHashtags(text string) (string, string)
- func ParseSlackAttachment(post *Post, attachments []*SlackAttachment)
- func ParseSlackLinksToMarkdown(text string) string
- func PermissionsChangedByPatch(role *Role, patch *RolePatch) []string
- func ReactionsToJson(o []*Reaction) string
- func RemoveDuplicateStrings(in []string) []string
- func RewriteImageURLs(message string, f func(string) string) string
- func RoleListToJson(r []*Role) string
- func SchemeIDFromJson(data io.Reader) *string
- func SchemesToJson(schemes []*Scheme) string
- func SessionsToJson(o []*Session) string
- func SplitVersion(version string) (int64, int64, int64)
- func StatusListToJson(u []*Status) string
- func StatusMapToInterfaceMap(statusMap map[string]*Status) map[string]interface{}
- func StringFromJson(data io.Reader) string
- func StringInterfaceFromJson(data io.Reader) map[string]interface{}
- func StringInterfaceToJson(objmap map[string]interface{}) string
- func StringToJson(s string) string
- func TeamListToJson(t []*Team) string
- func TeamMapFromJson(data io.Reader) map[string]*Team
- func TeamMapToJson(u map[string]*Team) string
- func TeamMembersToJson(o []*TeamMember) string
- func TeamsUnreadToJson(o []*TeamUnread) string
- func UserAccessTokenListToJson(t []*UserAccessToken) string
- func UserListToJson(u []*User) string
- func UserMapFromJson(data io.Reader) map[string]*User
- func UserMapToJson(u map[string]*User) string
- type AccessData
- type AccessResponse
- type AnalyticsRow
- type AnalyticsRows
- type AnalyticsSettings
- type AnnouncementSettings
- type AppError
- func AppErrorFromJson(data io.Reader) *AppError
- func 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 IsValidEmojiName(name string) *AppError
- func NewAppError(where string, id string, params map[string]interface{}, details string, ...) *AppError
- type Audit
- type Audits
- type AuthData
- type AuthorizeRequest
- type BundleInfo
- type Channel
- func (o *Channel) AddProp(key string, value interface{})
- func (o *Channel) DeepCopy() *Channel
- func (o *Channel) Etag() string
- func (o *Channel) IsGroupOrDirect() bool
- func (o *Channel) IsValid() *AppError
- func (o *Channel) MakeNonNil()
- func (o *Channel) Patch(patch *ChannelPatch)
- func (o *Channel) PreSave()
- func (o *Channel) PreUpdate()
- func (o *Channel) ToJson() string
- type ChannelCounts
- type ChannelData
- type ChannelForExport
- type ChannelList
- type ChannelListWithTeamData
- type ChannelMember
- type ChannelMemberForExport
- type ChannelMemberHistory
- type ChannelMemberHistoryResult
- type ChannelMembers
- type ChannelPatch
- type ChannelSearch
- type ChannelStats
- type ChannelUnread
- type ChannelView
- type ChannelViewResponse
- type ChannelWithTeamData
- type Client4
- func (c *Client4) AddChannelMember(channelId, userId string) (*ChannelMember, *Response)
- func (c *Client4) AddChannelMemberWithRootId(channelId, userId, postRootId string) (*ChannelMember, *Response)
- func (c *Client4) AddTeamMember(teamId, userId string) (*TeamMember, *Response)
- func (c *Client4) AddTeamMemberFromInvite(token, inviteId string) (*TeamMember, *Response)
- func (c *Client4) AddTeamMembers(teamId string, userIds []string) ([]*TeamMember, *Response)
- func (c *Client4) AttachDeviceId(deviceId string) (bool, *Response)
- func (c *Client4) AuthorizeOAuthApp(authRequest *AuthorizeRequest) (string, *Response)
- func (c *Client4) AutocompleteChannelsForTeam(teamId, name string) (*ChannelList, *Response)
- func (c *Client4) AutocompleteChannelsForTeamForSearch(teamId, name string) (*ChannelList, *Response)
- func (c *Client4) AutocompleteEmoji(name string, etag string) ([]*Emoji, *Response)
- func (c *Client4) AutocompleteUsers(username string, limit int, etag string) (*UserAutocomplete, *Response)
- func (c *Client4) AutocompleteUsersInChannel(teamId string, channelId string, username string, limit int, etag string) (*UserAutocomplete, *Response)
- func (c *Client4) AutocompleteUsersInTeam(teamId string, username string, limit int, etag string) (*UserAutocomplete, *Response)
- func (c *Client4) CancelJob(jobId string) (bool, *Response)
- func (c *Client4) CheckUserMfa(loginId string) (bool, *Response)
- func (c *Client4) ClearOAuthToken()
- func (c *Client4) ConvertChannelToPrivate(channelId string) (*Channel, *Response)
- func (c *Client4) CreateChannel(channel *Channel) (*Channel, *Response)
- func (c *Client4) CreateCommand(cmd *Command) (*Command, *Response)
- func (c *Client4) CreateComplianceReport(report *Compliance) (*Compliance, *Response)
- func (c *Client4) CreateDirectChannel(userId1, userId2 string) (*Channel, *Response)
- func (c *Client4) CreateEmoji(emoji *Emoji, image []byte, filename string) (*Emoji, *Response)
- func (c *Client4) CreateGroupChannel(userIds []string) (*Channel, *Response)
- func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
- func (c *Client4) CreateJob(job *Job) (*Job, *Response)
- func (c *Client4) CreateOAuthApp(app *OAuthApp) (*OAuthApp, *Response)
- func (c *Client4) CreateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
- func (c *Client4) CreatePost(post *Post) (*Post, *Response)
- func (c *Client4) CreatePostEphemeral(post *PostEphemeral) (*Post, *Response)
- func (c *Client4) CreateScheme(scheme *Scheme) (*Scheme, *Response)
- func (c *Client4) CreateTeam(team *Team) (*Team, *Response)
- func (c *Client4) CreateTermsOfService(text, userId string) (*TermsOfService, *Response)
- func (c *Client4) CreateUser(user *User) (*User, *Response)
- func (c *Client4) CreateUserAccessToken(userId, description string) (*UserAccessToken, *Response)
- func (c *Client4) CreateUserWithInviteId(user *User, inviteId string) (*User, *Response)
- func (c *Client4) CreateUserWithToken(user *User, tokenId string) (*User, *Response)
- func (c *Client4) DatabaseRecycle() (bool, *Response)
- func (c *Client4) DeauthorizeOAuthApp(appId string) (bool, *Response)
- func (c *Client4) DeleteBrandImage() *Response
- func (c *Client4) DeleteChannel(channelId string) (bool, *Response)
- func (c *Client4) DeleteCommand(commandId string) (bool, *Response)
- func (c *Client4) DeleteEmoji(emojiId string) (bool, *Response)
- func (c *Client4) DeleteIncomingWebhook(hookID string) (bool, *Response)
- func (c *Client4) DeleteOAuthApp(appId string) (bool, *Response)
- func (c *Client4) DeleteOutgoingWebhook(hookId string) (bool, *Response)
- func (c *Client4) DeletePost(postId string) (bool, *Response)
- func (c *Client4) DeletePreferences(userId string, preferences *Preferences) (bool, *Response)
- func (c *Client4) DeleteReaction(reaction *Reaction) (bool, *Response)
- func (c *Client4) DeleteSamlIdpCertificate() (bool, *Response)
- func (c *Client4) DeleteSamlPrivateCertificate() (bool, *Response)
- func (c *Client4) DeleteSamlPublicCertificate() (bool, *Response)
- func (c *Client4) DeleteScheme(id string) (bool, *Response)
- func (c *Client4) DeleteUser(userId string) (bool, *Response)
- func (c *Client4) DisablePlugin(id string) (bool, *Response)
- func (c *Client4) DisableUserAccessToken(tokenId string) (bool, *Response)
- func (c *Client4) DoApiDelete(url string) (*http.Response, *AppError)
- func (c *Client4) DoApiGet(url string, etag string) (*http.Response, *AppError)
- func (c *Client4) DoApiPost(url string, data string) (*http.Response, *AppError)
- func (c *Client4) DoApiPut(url string, data string) (*http.Response, *AppError)
- func (c *Client4) DoApiRequest(method, url, data, etag string) (*http.Response, *AppError)
- func (c *Client4) DoEmojiUploadFile(url string, data []byte, contentType string) (*Emoji, *Response)
- func (c *Client4) DoPostAction(postId, actionId string) (bool, *Response)
- func (c *Client4) DoUploadFile(url string, data []byte, contentType string) (*FileUploadResponse, *Response)
- func (c *Client4) DoUploadImportTeam(url string, data []byte, contentType string) (map[string]string, *Response)
- func (c *Client4) DownloadComplianceReport(reportId string) ([]byte, *Response)
- func (c *Client4) DownloadFile(fileId string, download bool) ([]byte, *Response)
- func (c *Client4) DownloadFilePreview(fileId string, download bool) ([]byte, *Response)
- func (c *Client4) DownloadFileThumbnail(fileId string, download bool) ([]byte, *Response)
- func (c *Client4) EnablePlugin(id string) (bool, *Response)
- func (c *Client4) EnableUserAccessToken(tokenId string) (bool, *Response)
- func (c *Client4) ExecuteCommand(channelId, command string) (*CommandResponse, *Response)
- func (c *Client4) ExecuteCommandWithTeam(channelId, teamId, command string) (*CommandResponse, *Response)
- func (c *Client4) GenerateMfaSecret(userId string) (*MfaSecret, *Response)
- func (c *Client4) GetAllChannels(page int, perPage int, etag string) (*ChannelListWithTeamData, *Response)
- func (c *Client4) GetAllTeams(etag string, page int, perPage int) ([]*Team, *Response)
- func (c *Client4) GetAnalyticsOld(name, teamId string) (AnalyticsRows, *Response)
- func (c *Client4) GetAnalyticsRoute() string
- func (c *Client4) GetAudits(page int, perPage int, etag string) (Audits, *Response)
- func (c *Client4) GetAuthorizedOAuthAppsForUser(userId string, page, perPage int) ([]*OAuthApp, *Response)
- func (c *Client4) GetBrandImage() ([]byte, *Response)
- func (c *Client4) GetBrandRoute() string
- func (c *Client4) GetBulkReactions(postIds []string) (map[string][]*Reaction, *Response)
- func (c *Client4) GetCacheRoute() string
- func (c *Client4) GetChannel(channelId, etag string) (*Channel, *Response)
- func (c *Client4) GetChannelByName(channelName, teamId string, etag string) (*Channel, *Response)
- func (c *Client4) GetChannelByNameForTeamName(channelName, teamName string, etag string) (*Channel, *Response)
- func (c *Client4) GetChannelByNameForTeamNameIncludeDeleted(channelName, teamName string, etag string) (*Channel, *Response)
- func (c *Client4) GetChannelByNameForTeamNameRoute(channelName, teamName string) string
- func (c *Client4) GetChannelByNameIncludeDeleted(channelName, teamId string, etag string) (*Channel, *Response)
- func (c *Client4) GetChannelByNameRoute(channelName, teamId string) string
- func (c *Client4) GetChannelMember(channelId, userId, etag string) (*ChannelMember, *Response)
- func (c *Client4) GetChannelMemberRoute(channelId, userId string) string
- func (c *Client4) GetChannelMembers(channelId string, page, perPage int, etag string) (*ChannelMembers, *Response)
- func (c *Client4) GetChannelMembersByIds(channelId string, userIds []string) (*ChannelMembers, *Response)
- func (c *Client4) GetChannelMembersForUser(userId, teamId, etag string) (*ChannelMembers, *Response)
- func (c *Client4) GetChannelMembersRoute(channelId string) string
- func (c *Client4) GetChannelMembersTimezones(channelId string) ([]string, *Response)
- func (c *Client4) GetChannelRoute(channelId string) string
- func (c *Client4) GetChannelSchemeRoute(channelId string) string
- func (c *Client4) GetChannelStats(channelId string, etag string) (*ChannelStats, *Response)
- func (c *Client4) GetChannelUnread(channelId, userId string) (*ChannelUnread, *Response)
- func (c *Client4) GetChannelsForScheme(schemeId string, page int, perPage int) (ChannelList, *Response)
- func (c *Client4) GetChannelsForTeamForUser(teamId, userId, etag string) ([]*Channel, *Response)
- func (c *Client4) GetChannelsForTeamRoute(teamId string) string
- func (c *Client4) GetChannelsRoute() string
- func (c *Client4) GetClusterRoute() string
- func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response)
- func (c *Client4) GetCommandRoute(commandId string) string
- func (c *Client4) GetCommandsRoute() string
- func (c *Client4) GetComplianceReport(reportId string) (*Compliance, *Response)
- func (c *Client4) GetComplianceReportRoute(reportId string) string
- func (c *Client4) GetComplianceReports(page, perPage int) (Compliances, *Response)
- func (c *Client4) GetComplianceReportsRoute() string
- func (c *Client4) GetConfig() (*Config, *Response)
- func (c *Client4) GetConfigRoute() string
- func (c *Client4) GetDataRetentionPolicy() (*DataRetentionPolicy, *Response)
- func (c *Client4) GetDataRetentionRoute() string
- func (c *Client4) GetDatabaseRoute() string
- func (c *Client4) GetDefaultProfileImage(userId string) ([]byte, *Response)
- func (c *Client4) GetDeletedChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response)
- func (c *Client4) GetElasticsearchRoute() string
- func (c *Client4) GetEmoji(emojiId string) (*Emoji, *Response)
- func (c *Client4) GetEmojiByName(name string) (*Emoji, *Response)
- func (c *Client4) GetEmojiByNameRoute(name string) string
- func (c *Client4) GetEmojiImage(emojiId string) ([]byte, *Response)
- func (c *Client4) GetEmojiList(page, perPage int) ([]*Emoji, *Response)
- func (c *Client4) GetEmojiRoute(emojiId string) string
- func (c *Client4) GetEmojisRoute() string
- func (c *Client4) GetEnvironmentConfig() (map[string]interface{}, *Response)
- func (c *Client4) GetFile(fileId string) ([]byte, *Response)
- func (c *Client4) GetFileInfo(fileId string) (*FileInfo, *Response)
- func (c *Client4) GetFileInfosForPost(postId string, etag string) ([]*FileInfo, *Response)
- func (c *Client4) GetFileLink(fileId string) (string, *Response)
- func (c *Client4) GetFilePreview(fileId string) ([]byte, *Response)
- func (c *Client4) GetFileRoute(fileId string) string
- func (c *Client4) GetFileThumbnail(fileId string) ([]byte, *Response)
- func (c *Client4) GetFilesRoute() string
- func (c *Client4) GetFlaggedPostsForUser(userId string, page int, perPage int) (*PostList, *Response)
- func (c *Client4) GetFlaggedPostsForUserInChannel(userId string, channelId string, page int, perPage int) (*PostList, *Response)
- func (c *Client4) GetFlaggedPostsForUserInTeam(userId string, teamId string, page int, perPage int) (*PostList, *Response)
- func (c *Client4) GetGroup(groupID, etag string) (*Group, *Response)
- func (c *Client4) GetGroupRoute(groupID string) string
- func (c *Client4) GetGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, etag string) (*GroupSyncable, *Response)
- func (c *Client4) GetGroupSyncableRoute(groupID, syncableID string, syncableType GroupSyncableType) string
- func (c *Client4) GetGroupSyncables(groupID string, syncableType GroupSyncableType, etag string) ([]*GroupSyncable, *Response)
- func (c *Client4) GetGroupSyncablesRoute(groupID string, syncableType GroupSyncableType) string
- func (c *Client4) GetGroupsRoute() string
- func (c *Client4) GetIncomingWebhook(hookID string, etag string) (*IncomingWebhook, *Response)
- func (c *Client4) GetIncomingWebhookRoute(hookID string) string
- func (c *Client4) GetIncomingWebhooks(page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
- func (c *Client4) GetIncomingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
- func (c *Client4) GetIncomingWebhooksRoute() string
- func (c *Client4) GetJob(id string) (*Job, *Response)
- func (c *Client4) GetJobs(page int, perPage int) ([]*Job, *Response)
- func (c *Client4) GetJobsByType(jobType string, page int, perPage int) ([]*Job, *Response)
- func (c *Client4) GetJobsRoute() string
- func (c *Client4) GetLdapGroups() ([]*Group, *Response)
- func (c *Client4) GetLdapRoute() string
- func (c *Client4) GetLicenseRoute() string
- func (c *Client4) GetLogs(page, perPage int) ([]string, *Response)
- func (c *Client4) GetMe(etag string) (*User, *Response)
- func (c *Client4) GetNewUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetOAuthAccessToken(data url.Values) (*AccessResponse, *Response)
- func (c *Client4) GetOAuthApp(appId string) (*OAuthApp, *Response)
- func (c *Client4) GetOAuthAppInfo(appId string) (*OAuthApp, *Response)
- func (c *Client4) GetOAuthAppRoute(appId string) string
- func (c *Client4) GetOAuthApps(page, perPage int) ([]*OAuthApp, *Response)
- func (c *Client4) GetOAuthAppsRoute() string
- func (c *Client4) GetOldClientConfig(etag string) (map[string]string, *Response)
- func (c *Client4) GetOldClientLicense(etag string) (map[string]string, *Response)
- func (c *Client4) GetOpenGraphRoute() string
- func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhookRoute(hookID string) string
- func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhooksForChannel(channelId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
- func (c *Client4) GetOutgoingWebhooksRoute() string
- func (c *Client4) GetPing() (string, *Response)
- func (c *Client4) GetPinnedPosts(channelId string, etag string) (*PostList, *Response)
- func (c *Client4) GetPluginRoute(pluginId string) string
- func (c *Client4) GetPluginStatuses() (PluginStatuses, *Response)
- func (c *Client4) GetPlugins() (*PluginsResponse, *Response)
- func (c *Client4) GetPluginsRoute() string
- func (c *Client4) GetPost(postId string, etag string) (*Post, *Response)
- func (c *Client4) GetPostRoute(postId string) string
- func (c *Client4) GetPostThread(postId string, etag string) (*PostList, *Response)
- func (c *Client4) GetPostsAfter(channelId, postId string, page, perPage int, etag string) (*PostList, *Response)
- func (c *Client4) GetPostsBefore(channelId, postId string, page, perPage int, etag string) (*PostList, *Response)
- func (c *Client4) GetPostsEphemeralRoute() string
- func (c *Client4) GetPostsForChannel(channelId string, page, perPage int, etag string) (*PostList, *Response)
- func (c *Client4) GetPostsRoute() string
- func (c *Client4) GetPostsSince(channelId string, time int64) (*PostList, *Response)
- func (c *Client4) GetPreferenceByCategoryAndName(userId string, category string, preferenceName string) (*Preference, *Response)
- func (c *Client4) GetPreferences(userId string) (Preferences, *Response)
- func (c *Client4) GetPreferencesByCategory(userId string, category string) (Preferences, *Response)
- func (c *Client4) GetPreferencesRoute(userId string) string
- func (c *Client4) GetProfileImage(userId, etag string) ([]byte, *Response)
- func (c *Client4) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) ([]*Channel, *Response)
- func (c *Client4) GetPublicChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response)
- func (c *Client4) GetReactions(postId string) ([]*Reaction, *Response)
- func (c *Client4) GetReactionsRoute() string
- func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetRedirectLocation(urlParam, etag string) (string, *Response)
- func (c *Client4) GetRedirectLocationRoute() string
- func (c *Client4) GetRole(id string) (*Role, *Response)
- func (c *Client4) GetRoleByName(name string) (*Role, *Response)
- func (c *Client4) GetRolesByNames(roleNames []string) ([]*Role, *Response)
- func (c *Client4) GetRolesRoute() string
- func (c *Client4) GetSamlCertificateStatus() (*SamlCertificateStatus, *Response)
- func (c *Client4) GetSamlMetadata() (string, *Response)
- func (c *Client4) GetSamlRoute() string
- func (c *Client4) GetScheme(id string) (*Scheme, *Response)
- func (c *Client4) GetSchemeRoute(id string) string
- func (c *Client4) GetSchemes(scope string, page int, perPage int) ([]*Scheme, *Response)
- func (c *Client4) GetSchemesRoute() string
- func (c *Client4) GetSessions(userId, etag string) ([]*Session, *Response)
- func (c *Client4) GetSortedEmojiList(page, perPage int, sort string) ([]*Emoji, *Response)
- func (c *Client4) GetSupportedTimezone() ([]string, *Response)
- func (c *Client4) GetSystemRoute() string
- func (c *Client4) GetTeam(teamId, etag string) (*Team, *Response)
- func (c *Client4) GetTeamAutoCompleteCommandsRoute(teamId string) string
- func (c *Client4) GetTeamByName(name, etag string) (*Team, *Response)
- func (c *Client4) GetTeamByNameRoute(teamName string) string
- func (c *Client4) GetTeamIcon(teamId, etag string) ([]byte, *Response)
- func (c *Client4) GetTeamImportRoute(teamId string) string
- func (c *Client4) GetTeamInviteInfo(inviteId string) (*Team, *Response)
- func (c *Client4) GetTeamMember(teamId, userId, etag string) (*TeamMember, *Response)
- func (c *Client4) GetTeamMemberRoute(teamId, userId string) string
- func (c *Client4) GetTeamMembers(teamId string, page int, perPage int, etag string) ([]*TeamMember, *Response)
- func (c *Client4) GetTeamMembersByIds(teamId string, userIds []string) ([]*TeamMember, *Response)
- func (c *Client4) GetTeamMembersForUser(userId string, etag string) ([]*TeamMember, *Response)
- func (c *Client4) GetTeamMembersRoute(teamId string) string
- func (c *Client4) GetTeamRoute(teamId string) string
- func (c *Client4) GetTeamSchemeRoute(teamId string) string
- func (c *Client4) GetTeamStats(teamId, etag string) (*TeamStats, *Response)
- func (c *Client4) GetTeamStatsRoute(teamId string) string
- func (c *Client4) GetTeamUnread(teamId, userId string) (*TeamUnread, *Response)
- func (c *Client4) GetTeamsForScheme(schemeId string, page int, perPage int) ([]*Team, *Response)
- func (c *Client4) GetTeamsForUser(userId, etag string) ([]*Team, *Response)
- func (c *Client4) GetTeamsRoute() string
- func (c *Client4) GetTeamsUnreadForUser(userId, teamIdToExclude string) ([]*TeamUnread, *Response)
- func (c *Client4) GetTermsOfService(etag string) (*TermsOfService, *Response)
- func (c *Client4) GetTermsOfServiceRoute() string
- func (c *Client4) GetTestEmailRoute() string
- func (c *Client4) GetTestS3Route() string
- func (c *Client4) GetTimezonesRoute() string
- func (c *Client4) GetTotalUsersStats(etag string) (*UsersStats, *Response)
- func (c *Client4) GetTotalUsersStatsRoute() string
- func (c *Client4) GetUser(userId, etag string) (*User, *Response)
- func (c *Client4) GetUserAccessToken(tokenId string) (*UserAccessToken, *Response)
- func (c *Client4) GetUserAccessTokenRoute(tokenId string) string
- func (c *Client4) GetUserAccessTokens(page int, perPage int) ([]*UserAccessToken, *Response)
- func (c *Client4) GetUserAccessTokensForUser(userId string, page, perPage int) ([]*UserAccessToken, *Response)
- func (c *Client4) GetUserAccessTokensRoute() string
- func (c *Client4) GetUserAudits(userId string, page int, perPage int, etag string) (Audits, *Response)
- func (c *Client4) GetUserByEmail(email, etag string) (*User, *Response)
- func (c *Client4) GetUserByEmailRoute(email string) string
- func (c *Client4) GetUserByUsername(userName, etag string) (*User, *Response)
- func (c *Client4) GetUserByUsernameRoute(userName string) string
- func (c *Client4) GetUserRoute(userId string) string
- func (c *Client4) GetUserStatus(userId, etag string) (*Status, *Response)
- func (c *Client4) GetUserStatusRoute(userId string) string
- func (c *Client4) GetUserStatusesRoute() string
- func (c *Client4) GetUserTermsOfService(userId, etag string) (*UserTermsOfService, *Response)
- func (c *Client4) GetUserTermsOfServiceRoute(userId string) string
- func (c *Client4) GetUsers(page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersByIds(userIds []string) ([]*User, *Response)
- func (c *Client4) GetUsersByUsernames(usernames []string) ([]*User, *Response)
- func (c *Client4) GetUsersInChannel(channelId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersInChannelByStatus(channelId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersNotInChannel(teamId, channelId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersNotInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetUsersRoute() string
- func (c *Client4) GetUsersStatusesByIds(userIds []string) ([]*Status, *Response)
- func (c *Client4) GetUsersWithoutTeam(page int, perPage int, etag string) ([]*User, *Response)
- func (c *Client4) GetWebappPlugins() ([]*Manifest, *Response)
- func (c *Client4) ImportTeam(data []byte, filesize int, importFrom, filename, teamId string) (map[string]string, *Response)
- func (c *Client4) InvalidateCaches() (bool, *Response)
- func (c *Client4) InviteUsersToTeam(teamId string, userEmails []string) (bool, *Response)
- func (c *Client4) LinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, ...) (*GroupSyncable, *Response)
- func (c *Client4) LinkLdapGroup(dn string) (*Group, *Response)
- func (c *Client4) ListAutocompleteCommands(teamId string) ([]*Command, *Response)
- func (c *Client4) ListCommands(teamId string, customOnly bool) ([]*Command, *Response)
- func (c *Client4) Login(loginId string, password string) (*User, *Response)
- func (c *Client4) LoginById(id string, password string) (*User, *Response)
- func (c *Client4) LoginByLdap(loginId string, password string) (*User, *Response)
- func (c *Client4) LoginWithDevice(loginId string, password string, deviceId string) (*User, *Response)
- func (c *Client4) Logout() (bool, *Response)
- func (c *Client4) MockSession(sessionToken string)
- func (c *Client4) Must(result interface{}, resp *Response) interface{}
- func (c *Client4) OpenGraph(url string) (map[string]string, *Response)
- func (c *Client4) OpenInteractiveDialog(request OpenDialogRequest) (bool, *Response)
- func (c *Client4) PatchChannel(channelId string, patch *ChannelPatch) (*Channel, *Response)
- func (c *Client4) PatchGroup(groupID string, patch *GroupPatch) (*Group, *Response)
- func (c *Client4) PatchGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, ...) (*GroupSyncable, *Response)
- func (c *Client4) PatchPost(postId string, patch *PostPatch) (*Post, *Response)
- func (c *Client4) PatchRole(roleId string, patch *RolePatch) (*Role, *Response)
- func (c *Client4) PatchScheme(id string, patch *SchemePatch) (*Scheme, *Response)
- func (c *Client4) PatchTeam(teamId string, patch *TeamPatch) (*Team, *Response)
- func (c *Client4) PatchUser(userId string, patch *UserPatch) (*User, *Response)
- func (c *Client4) PermanentDeleteTeam(teamId string) (bool, *Response)
- func (c *Client4) PinPost(postId string) (bool, *Response)
- func (c *Client4) PostLog(message map[string]string) (map[string]string, *Response)
- func (c *Client4) PurgeElasticsearchIndexes() (bool, *Response)
- func (c *Client4) RegenCommandToken(commandId string) (string, *Response)
- func (c *Client4) RegenOutgoingHookToken(hookId string) (*OutgoingWebhook, *Response)
- func (c *Client4) RegenerateOAuthAppSecret(appId string) (*OAuthApp, *Response)
- func (c *Client4) RegisterTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) (*bool, *Response)
- func (c *Client4) ReloadConfig() (bool, *Response)
- func (c *Client4) RemoveLicenseFile() (bool, *Response)
- func (c *Client4) RemovePlugin(id string) (bool, *Response)
- func (c *Client4) RemoveTeamIcon(teamId string) (bool, *Response)
- func (c *Client4) RemoveTeamMember(teamId, userId string) (bool, *Response)
- func (c *Client4) RemoveUserFromChannel(channelId, userId string) (bool, *Response)
- func (c *Client4) ResetPassword(token, newPassword string) (bool, *Response)
- func (c *Client4) RestoreChannel(channelId string) (*Channel, *Response)
- func (c *Client4) RevokeAllSessions(userId string) (bool, *Response)
- func (c *Client4) RevokeSession(userId, sessionId string) (bool, *Response)
- func (c *Client4) RevokeUserAccessToken(tokenId string) (bool, *Response)
- func (c *Client4) SaveReaction(reaction *Reaction) (*Reaction, *Response)
- func (c *Client4) SearchAllChannels(search *ChannelSearch) (*ChannelListWithTeamData, *Response)
- func (c *Client4) SearchChannels(teamId string, search *ChannelSearch) ([]*Channel, *Response)
- func (c *Client4) SearchEmoji(search *EmojiSearch) ([]*Emoji, *Response)
- func (c *Client4) SearchPosts(teamId string, terms string, isOrSearch bool) (*PostList, *Response)
- func (c *Client4) SearchPostsWithMatches(teamId string, terms string, isOrSearch bool) (*PostSearchResults, *Response)
- func (c *Client4) SearchPostsWithParams(teamId string, params *SearchParameter) (*PostList, *Response)
- func (c *Client4) SearchTeams(search *TeamSearch) ([]*Team, *Response)
- func (c *Client4) SearchUserAccessTokens(search *UserAccessTokenSearch) ([]*UserAccessToken, *Response)
- func (c *Client4) SearchUsers(search *UserSearch) ([]*User, *Response)
- func (c *Client4) SendPasswordResetEmail(email string) (bool, *Response)
- func (c *Client4) SendVerificationEmail(email string) (bool, *Response)
- func (c *Client4) SetDefaultProfileImage(userId string) (bool, *Response)
- func (c *Client4) SetOAuthToken(token string)
- func (c *Client4) SetProfileImage(userId string, data []byte) (bool, *Response)
- func (c *Client4) SetTeamIcon(teamId string, data []byte) (bool, *Response)
- func (c *Client4) SoftDeleteTeam(teamId string) (bool, *Response)
- func (c *Client4) SubmitInteractiveDialog(request SubmitDialogRequest) (*SubmitDialogResponse, *Response)
- func (c *Client4) SwitchAccountType(switchRequest *SwitchRequest) (string, *Response)
- func (c *Client4) SyncLdap() (bool, *Response)
- func (c *Client4) TeamExists(name, etag string) (bool, *Response)
- func (c *Client4) TestElasticsearch() (bool, *Response)
- func (c *Client4) TestEmail(config *Config) (bool, *Response)
- func (c *Client4) TestLdap() (bool, *Response)
- func (c *Client4) TestS3Connection(config *Config) (bool, *Response)
- func (c *Client4) UnlinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType) *Response
- func (c *Client4) UnlinkLdapGroup(dn string) (*Group, *Response)
- func (c *Client4) UnpinPost(postId string) (bool, *Response)
- func (c *Client4) UpdateChannel(channel *Channel) (*Channel, *Response)
- func (c *Client4) UpdateChannelMemberSchemeRoles(channelId string, userId string, schemeRoles *SchemeRoles) (bool, *Response)
- func (c *Client4) UpdateChannelNotifyProps(channelId, userId string, props map[string]string) (bool, *Response)
- func (c *Client4) UpdateChannelRoles(channelId, userId, roles string) (bool, *Response)
- func (c *Client4) UpdateChannelScheme(channelId, schemeId string) (bool, *Response)
- func (c *Client4) UpdateCommand(cmd *Command) (*Command, *Response)
- func (c *Client4) UpdateConfig(config *Config) (*Config, *Response)
- func (c *Client4) UpdateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
- func (c *Client4) UpdateOAuthApp(app *OAuthApp) (*OAuthApp, *Response)
- func (c *Client4) UpdateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
- func (c *Client4) UpdatePost(postId string, post *Post) (*Post, *Response)
- func (c *Client4) UpdatePreferences(userId string, preferences *Preferences) (bool, *Response)
- func (c *Client4) UpdateTeam(team *Team) (*Team, *Response)
- func (c *Client4) UpdateTeamMemberRoles(teamId, userId, newRoles string) (bool, *Response)
- func (c *Client4) UpdateTeamMemberSchemeRoles(teamId string, userId string, schemeRoles *SchemeRoles) (bool, *Response)
- func (c *Client4) UpdateTeamScheme(teamId, schemeId string) (bool, *Response)
- func (c *Client4) UpdateUser(user *User) (*User, *Response)
- func (c *Client4) UpdateUserActive(userId string, active bool) (bool, *Response)
- func (c *Client4) UpdateUserAuth(userId string, userAuth *UserAuth) (*UserAuth, *Response)
- func (c *Client4) UpdateUserMfa(userId, code string, activate bool) (bool, *Response)
- func (c *Client4) UpdateUserPassword(userId, currentPassword, newPassword string) (bool, *Response)
- func (c *Client4) UpdateUserRoles(userId, roles string) (bool, *Response)
- func (c *Client4) UpdateUserStatus(userId string, userStatus *Status) (*Status, *Response)
- func (c *Client4) UploadBrandImage(data []byte) (bool, *Response)
- func (c *Client4) UploadFile(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
- func (c *Client4) UploadFileAsRequestBody(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
- func (c *Client4) UploadLicenseFile(data []byte) (bool, *Response)
- func (c *Client4) UploadPlugin(file io.Reader) (*Manifest, *Response)
- func (c *Client4) UploadPluginForced(file io.Reader) (*Manifest, *Response)
- func (c *Client4) UploadSamlIdpCertificate(data []byte, filename string) (bool, *Response)
- func (c *Client4) UploadSamlPrivateCertificate(data []byte, filename string) (bool, *Response)
- func (c *Client4) UploadSamlPublicCertificate(data []byte, filename string) (bool, *Response)
- func (c *Client4) VerifyUserEmail(token string) (bool, *Response)
- func (c *Client4) ViewChannel(userId string, view *ChannelView) (*ChannelViewResponse, *Response)
- type ClientRequirements
- type ClusterDiscovery
- type ClusterInfo
- type ClusterMessage
- type ClusterSettings
- type ClusterStats
- type Command
- type CommandArgs
- type CommandResponse
- type CommandWebhook
- type Compliance
- type CompliancePost
- type ComplianceSettings
- type Compliances
- type Config
- type ConfigFunc
- type Customer
- type DataRetentionPolicy
- type DataRetentionSettings
- type Dialog
- type DialogElement
- type DisplaySettings
- type DoPostActionRequest
- type ElasticsearchSettings
- type EmailSettings
- type Emoji
- type EmojiSearch
- type ExperimentalSettings
- type Features
- type FileInfo
- type FileSettings
- type FileUploadResponse
- type GlobalRelayMessageExportSettings
- type Group
- type GroupMember
- type GroupPatch
- type GroupSource
- type GroupSyncable
- type GroupSyncablePatch
- type GroupSyncableType
- type ImageProxySettings
- type IncomingWebhook
- type IncomingWebhookRequest
- type InitialLoad
- type Invites
- type Job
- type JobSettings
- type LdapSettings
- type License
- type LicenseRecord
- type LinkMetadata
- type LinkMetadataType
- type LocalizationSettings
- 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) MeetMinServerVersion(serverVersion string) (bool, error)
- func (m *Manifest) ToJson() string
- type ManifestExecutables
- type ManifestServer
- type ManifestWebapp
- type MessageExport
- type MessageExportSettings
- type MetricsSettings
- type MfaSecret
- type NativeAppSettings
- type OAuthApp
- type OpenDialogRequest
- type OutgoingWebhook
- func (o *OutgoingWebhook) GetTriggerWord(word string, isExactMatch bool) (triggerWord string)
- func (o *OutgoingWebhook) IsValid() *AppError
- func (o *OutgoingWebhook) PreSave()
- func (o *OutgoingWebhook) PreUpdate()
- func (o *OutgoingWebhook) ToJson() string
- func (o *OutgoingWebhook) TriggerWordExactMatch(word string) bool
- func (o *OutgoingWebhook) TriggerWordStartsWith(word string) bool
- type OutgoingWebhookPayload
- type OutgoingWebhookResponse
- type PasswordSettings
- type Permission
- type PluginInfo
- type PluginKeyValue
- type PluginOption
- type PluginSetting
- 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) ChannelMentions() []string
- func (o *Post) Clone() *Post
- func (o *Post) Etag() string
- func (o *Post) GenerateActionIds()
- func (o *Post) GetAction(id string) *PostAction
- func (o *Post) IsSystemMessage() bool
- func (o *Post) IsValid(maxPostSize int) *AppError
- func (o *Post) MakeNonNil()
- func (p *Post) Patch(patch *PostPatch)
- func (o *Post) PreCommit()
- func (o *Post) PreSave()
- func (o *Post) SanitizeProps()
- func (o *Post) StripActionIntegrations()
- func (o *Post) ToJson() string
- func (o *Post) ToUnsanitizedJson() string
- func (o *Post) WithRewrittenImageURLs(f func(string) string) *Post
- type PostAction
- type PostActionAPIResponse
- 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) 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
- func (o *PostList) WithRewrittenImageURLs(f func(string) string) *PostList
- type PostMetadata
- type PostPatch
- type PostSearchMatches
- type PostSearchResults
- type Preference
- type Preferences
- type PrivacySettings
- type PushNotification
- type PushResponse
- type RateLimitSettings
- type Reaction
- type ReplyForExport
- type Response
- type Role
- type RolePatch
- type SSOSettings
- type SamlAuthRequest
- type SamlCertificateStatus
- type SamlSettings
- type ScheduledTask
- type Scheduler
- type Scheme
- type SchemeConveyor
- type SchemeIDPatch
- type SchemePatch
- type SchemeRoles
- type SearchParameter
- type SearchParams
- type SecurityBulletin
- type SecurityBulletins
- type ServiceSettings
- type Session
- func (me *Session) AddProp(key string, value string)
- func (me *Session) DeepCopy() *Session
- func (me *Session) GenerateCSRF() string
- func (me *Session) GetCSRF() string
- func (me *Session) GetTeamByTeamId(teamId string) *TeamMember
- func (me *Session) GetUserRoles() []string
- func (me *Session) IsExpired() bool
- func (me *Session) IsMobileApp() bool
- func (me *Session) PreSave()
- func (me *Session) Sanitize()
- func (me *Session) SetExpireInDays(days int)
- func (me *Session) ToJson() string
- type SlackAttachment
- type SlackAttachmentField
- type SlackCompatibleBool
- type SqlSettings
- type Status
- type StringArray
- type StringInterface
- type StringMap
- type SubmitDialogRequest
- type SubmitDialogResponse
- type SuggestCommand
- type SupportSettings
- type SwitchRequest
- type System
- type SystemAsymmetricSigningKey
- type SystemECDSAKey
- type TaskFunc
- type Team
- type TeamForExport
- type TeamMember
- type TeamMemberForExport
- type TeamPatch
- type TeamSearch
- type TeamSettings
- type TeamStats
- type TeamUnread
- type TermsOfService
- type ThemeSettings
- type TimezoneSettings
- type Token
- type User
- func (u *User) AddNotifyProp(key string, value string)
- func (u *User) ClearNonProfileFields()
- func (u *User) DeepCopy() *User
- func (u *User) Etag(showFullName, showEmail bool) string
- func (u *User) GetDisplayName(nameFormat string) string
- func (u *User) GetFullName() string
- func (u *User) GetPreferredTimezone() string
- func (u *User) GetRawRoles() string
- func (u *User) GetRoles() []string
- func (u *User) IsInRole(inRole string) bool
- func (u *User) IsLDAPUser() bool
- func (u *User) IsOAuthUser() bool
- func (u *User) IsSAMLUser() bool
- func (u *User) IsSSOUser() bool
- func (u *User) IsValid() *AppError
- func (u *User) MakeNonNil()
- func (u *User) Patch(patch *UserPatch)
- func (u *User) PreSave()
- func (u *User) PreUpdate()
- func (u *User) Sanitize(options map[string]bool)
- func (u *User) SanitizeProfile(options map[string]bool)
- func (u *User) SetDefaultNotifications()
- func (u *User) ToJson() string
- func (user *User) UpdateMentionKeysFromUsername(oldUsername string)
- type UserAccessToken
- type UserAccessTokenSearch
- type UserAuth
- type UserAutocomplete
- type UserAutocompleteInChannel
- type UserAutocompleteInTeam
- type UserChannelIDPair
- type UserGetOptions
- type UserPatch
- type UserSearch
- type UserSearchOptions
- type UserTeamIDPair
- type UserTermsOfService
- type UsersStats
- type WebSocketClient
- func (wsc *WebSocketClient) Close()
- func (wsc *WebSocketClient) Connect() *AppError
- func (wsc *WebSocketClient) ConnectWithDialer(dialer *websocket.Dialer) *AppError
- func (wsc *WebSocketClient) GetStatuses()
- func (wsc *WebSocketClient) GetStatusesByIds(userIds []string)
- func (wsc *WebSocketClient) Listen()
- func (wsc *WebSocketClient) SendMessage(action string, data map[string]interface{})
- func (wsc *WebSocketClient) UserTyping(channelId, parentId string)
- type WebSocketEvent
- type WebSocketMessage
- type WebSocketRequest
- type WebSocketResponse
- type WebsocketBroadcast
- type Worker
Constants ¶
const ( ACCESS_TOKEN_GRANT_TYPE = "authorization_code" ACCESS_TOKEN_TYPE = "bearer" REFRESH_TOKEN_GRANT_TYPE = "refresh_token" )
const ( AUTHCODE_EXPIRE_TIME = 60 * 10 // 10 minutes AUTHCODE_RESPONSE_TYPE = "code" IMPLICIT_RESPONSE_TYPE = "token" DEFAULT_SCOPE = "user" )
const ( CHANNEL_OPEN = "O" CHANNEL_PRIVATE = "P" CHANNEL_DIRECT = "D" CHANNEL_GROUP = "G" CHANNEL_GROUP_MAX_USERS = 8 CHANNEL_GROUP_MIN_USERS = 3 DEFAULT_CHANNEL = "town-square" CHANNEL_DISPLAY_NAME_MAX_RUNES = 64 CHANNEL_NAME_MIN_LENGTH = 2 CHANNEL_NAME_MAX_LENGTH = 64 CHANNEL_NAME_UI_MAX_LENGTH = 22 CHANNEL_HEADER_MAX_RUNES = 1024 CHANNEL_PURPOSE_MAX_RUNES = 250 CHANNEL_CACHE_SIZE = 25000 CHANNEL_SORT_BY_USERNAME = "username" CHANNEL_SORT_BY_STATUS = "status" )
const ( CHANNEL_NOTIFY_DEFAULT = "default" CHANNEL_NOTIFY_ALL = "all" CHANNEL_NOTIFY_MENTION = "mention" CHANNEL_NOTIFY_NONE = "none" CHANNEL_MARK_UNREAD_ALL = "all" CHANNEL_MARK_UNREAD_MENTION = "mention" IGNORE_CHANNEL_MENTIONS_DEFAULT = "default" IGNORE_CHANNEL_MENTIONS_OFF = "off" IGNORE_CHANNEL_MENTIONS_ON = "on" IGNORE_CHANNEL_MENTIONS_NOTIFY_PROP = "ignore_channel_mentions" )
const ( HEADER_REQUEST_ID = "X-Request-ID" HEADER_VERSION_ID = "X-Version-ID" HEADER_CLUSTER_ID = "X-Cluster-ID" HEADER_ETAG_SERVER = "ETag" HEADER_ETAG_CLIENT = "If-None-Match" HEADER_FORWARDED = "X-Forwarded-For" HEADER_REAL_IP = "X-Real-IP" HEADER_FORWARDED_PROTO = "X-Forwarded-Proto" HEADER_TOKEN = "token" HEADER_BEARER = "BEARER" HEADER_AUTH = "Authorization" HEADER_REQUESTED_WITH = "X-Requested-With" HEADER_REQUESTED_WITH_XML = "XMLHttpRequest" STATUS = "status" STATUS_OK = "OK" STATUS_FAIL = "FAIL" STATUS_REMOVE = "REMOVE" CLIENT_DIR = "client" API_URL_SUFFIX_V1 = "/api/v1" API_URL_SUFFIX_V4 = "/api/v4" API_URL_SUFFIX = API_URL_SUFFIX_V4 )
const ( CDS_OFFLINE_AFTER_MILLIS = 1000 * 60 * 30 // 30 minutes CDS_TYPE_APP = "mattermost_app" )
const ( CLUSTER_EVENT_PUBLISH = "publish" CLUSTER_EVENT_UPDATE_STATUS = "update_status" CLUSTER_EVENT_INVALIDATE_ALL_CACHES = "inv_all_caches" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_REACTIONS = "inv_reactions" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_WEBHOOK = "inv_webhook" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_POSTS = "inv_channel_posts" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_MEMBERS_NOTIFY_PROPS = "inv_channel_members_notify_props" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_MEMBERS = "inv_channel_members" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL_BY_NAME = "inv_channel_name" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_CHANNEL = "inv_channel" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_USER = "inv_user" CLUSTER_EVENT_CLEAR_SESSION_CACHE_FOR_USER = "clear_session_user" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_ROLES = "inv_roles" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_SCHEMES = "inv_schemes" CLUSTER_EVENT_INVALIDATE_CACHE_FOR_GROUPS = "inv_groups" CLUSTER_SEND_BEST_EFFORT = "best_effort" CLUSTER_SEND_RELIABLE = "reliable" )
const ( COMMAND_METHOD_POST = "P" COMMAND_METHOD_GET = "G" MIN_TRIGGER_LENGTH = 1 MAX_TRIGGER_LENGTH = 128 )
const ( COMMAND_RESPONSE_TYPE_IN_CHANNEL = "in_channel" COMMAND_RESPONSE_TYPE_EPHEMERAL = "ephemeral" )
const ( COMPLIANCE_STATUS_CREATED = "created" COMPLIANCE_STATUS_RUNNING = "running" COMPLIANCE_STATUS_FINISHED = "finished" COMPLIANCE_STATUS_FAILED = "failed" COMPLIANCE_STATUS_REMOVED = "removed" COMPLIANCE_TYPE_DAILY = "daily" COMPLIANCE_TYPE_ADHOC = "adhoc" )
const ( CONN_SECURITY_NONE = "" CONN_SECURITY_PLAIN = "PLAIN" CONN_SECURITY_TLS = "TLS" CONN_SECURITY_STARTTLS = "STARTTLS" IMAGE_DRIVER_LOCAL = "local" IMAGE_DRIVER_S3 = "amazons3" DATABASE_DRIVER_SQLITE = "sqlite3" DATABASE_DRIVER_MYSQL = "mysql" DATABASE_DRIVER_POSTGRES = "postgres" MINIO_ACCESS_KEY = "minioaccesskey" MINIO_SECRET_KEY = "miniosecretkey" MINIO_BUCKET = "mattermost-test" PASSWORD_MAXIMUM_LENGTH = 64 PASSWORD_MINIMUM_LENGTH = 5 SERVICE_GITLAB = "gitlab" SERVICE_GOOGLE = "google" SERVICE_OFFICE365 = "office365" GENERIC_NO_CHANNEL_NOTIFICATION = "generic_no_channel" GENERIC_NOTIFICATION = "generic" FULL_NOTIFICATION = "full" DIRECT_MESSAGE_ANY = "any" DIRECT_MESSAGE_TEAM = "team" SHOW_USERNAME = "username" SHOW_NICKNAME_FULLNAME = "nickname_full_name" SHOW_FULLNAME = "full_name" PERMISSIONS_ALL = "all" PERMISSIONS_CHANNEL_ADMIN = "channel_admin" PERMISSIONS_TEAM_ADMIN = "team_admin" PERMISSIONS_SYSTEM_ADMIN = "system_admin" FAKE_SETTING = "********************************" RESTRICT_EMOJI_CREATION_ALL = "all" RESTRICT_EMOJI_CREATION_ADMIN = "admin" RESTRICT_EMOJI_CREATION_SYSTEM_ADMIN = "system_admin" PERMISSIONS_DELETE_POST_ALL = "all" PERMISSIONS_DELETE_POST_TEAM_ADMIN = "team_admin" PERMISSIONS_DELETE_POST_SYSTEM_ADMIN = "system_admin" ALLOW_EDIT_POST_ALWAYS = "always" ALLOW_EDIT_POST_NEVER = "never" ALLOW_EDIT_POST_TIME_LIMIT = "time_limit" GROUP_UNREAD_CHANNELS_DISABLED = "disabled" GROUP_UNREAD_CHANNELS_DEFAULT_ON = "default_on" GROUP_UNREAD_CHANNELS_DEFAULT_OFF = "default_off" EMAIL_BATCHING_BUFFER_SIZE = 256 EMAIL_BATCHING_INTERVAL = 30 EMAIL_NOTIFICATION_CONTENTS_FULL = "full" EMAIL_NOTIFICATION_CONTENTS_GENERIC = "generic" SITENAME_MAX_LENGTH = 30 SERVICE_SETTINGS_DEFAULT_SITE_URL = "" SERVICE_SETTINGS_DEFAULT_TLS_CERT_FILE = "" SERVICE_SETTINGS_DEFAULT_TLS_KEY_FILE = "" SERVICE_SETTINGS_DEFAULT_READ_TIMEOUT = 300 SERVICE_SETTINGS_DEFAULT_WRITE_TIMEOUT = 300 SERVICE_SETTINGS_DEFAULT_MAX_LOGIN_ATTEMPTS = 10 SERVICE_SETTINGS_DEFAULT_ALLOW_CORS_FROM = "" SERVICE_SETTINGS_DEFAULT_LISTEN_AND_ADDRESS = ":8065" SERVICE_SETTINGS_DEFAULT_GFYCAT_API_KEY = "2_KtH_W5" SERVICE_SETTINGS_DEFAULT_GFYCAT_API_SECRET = "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof" TEAM_SETTINGS_DEFAULT_MAX_USERS_PER_TEAM = 50 TEAM_SETTINGS_DEFAULT_CUSTOM_BRAND_TEXT = "" TEAM_SETTINGS_DEFAULT_CUSTOM_DESCRIPTION_TEXT = "" TEAM_SETTINGS_DEFAULT_USER_STATUS_AWAY_TIMEOUT = 300 SQL_SETTINGS_DEFAULT_DATA_SOURCE = "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s" FILE_SETTINGS_DEFAULT_DIRECTORY = "./data/" EMAIL_SETTINGS_DEFAULT_FEEDBACK_ORGANIZATION = "" SUPPORT_SETTINGS_DEFAULT_TERMS_OF_SERVICE_LINK = "https://about.mattermost.com/default-terms/" SUPPORT_SETTINGS_DEFAULT_PRIVACY_POLICY_LINK = "https://about.mattermost.com/default-privacy-policy/" SUPPORT_SETTINGS_DEFAULT_ABOUT_LINK = "https://about.mattermost.com/default-about/" SUPPORT_SETTINGS_DEFAULT_HELP_LINK = "https://about.mattermost.com/default-help/" SUPPORT_SETTINGS_DEFAULT_REPORT_A_PROBLEM_LINK = "https://about.mattermost.com/default-report-a-problem/" SUPPORT_SETTINGS_DEFAULT_SUPPORT_EMAIL = "feedback@mattermost.com" SUPPORT_SETTINGS_DEFAULT_RE_ACCEPTANCE_PERIOD = 365 LDAP_SETTINGS_DEFAULT_FIRST_NAME_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_LAST_NAME_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_EMAIL_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_USERNAME_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_NICKNAME_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_ID_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_POSITION_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_LOGIN_FIELD_NAME = "" LDAP_SETTINGS_DEFAULT_GROUP_DISPLAY_NAME_ATTRIBUTE = "" LDAP_SETTINGS_DEFAULT_GROUP_ID_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_ID_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_FIRST_NAME_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_LAST_NAME_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_EMAIL_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_USERNAME_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_NICKNAME_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_LOCALE_ATTRIBUTE = "" SAML_SETTINGS_DEFAULT_POSITION_ATTRIBUTE = "" NATIVEAPP_SETTINGS_DEFAULT_APP_DOWNLOAD_LINK = "https://about.mattermost.com/downloads/" NATIVEAPP_SETTINGS_DEFAULT_ANDROID_APP_DOWNLOAD_LINK = "https://about.mattermost.com/mattermost-android-app/" NATIVEAPP_SETTINGS_DEFAULT_IOS_APP_DOWNLOAD_LINK = "https://about.mattermost.com/mattermost-ios-app/" EXPERIMENTAL_SETTINGS_DEFAULT_LINK_METADATA_TIMEOUT_MILLISECONDS = 5000 ANALYTICS_SETTINGS_DEFAULT_MAX_USERS_FOR_STATISTICS = 2500 ANNOUNCEMENT_SETTINGS_DEFAULT_BANNER_COLOR = "#f2a93b" ANNOUNCEMENT_SETTINGS_DEFAULT_BANNER_TEXT_COLOR = "#333333" TEAM_SETTINGS_DEFAULT_TEAM_TEXT = "default" ELASTICSEARCH_SETTINGS_DEFAULT_CONNECTION_URL = "" ELASTICSEARCH_SETTINGS_DEFAULT_USERNAME = "" ELASTICSEARCH_SETTINGS_DEFAULT_PASSWORD = "" ELASTICSEARCH_SETTINGS_DEFAULT_POST_INDEX_REPLICAS = 1 ELASTICSEARCH_SETTINGS_DEFAULT_POST_INDEX_SHARDS = 1 ELASTICSEARCH_SETTINGS_DEFAULT_AGGREGATE_POSTS_AFTER_DAYS = 365 ELASTICSEARCH_SETTINGS_DEFAULT_POSTS_AGGREGATOR_JOB_START_TIME = "03:00" ELASTICSEARCH_SETTINGS_DEFAULT_INDEX_PREFIX = "" ELASTICSEARCH_SETTINGS_DEFAULT_LIVE_INDEXING_BATCH_SIZE = 1 ELASTICSEARCH_SETTINGS_DEFAULT_BULK_INDEXING_TIME_WINDOW_SECONDS = 3600 ELASTICSEARCH_SETTINGS_DEFAULT_REQUEST_TIMEOUT_SECONDS = 30 DATA_RETENTION_SETTINGS_DEFAULT_MESSAGE_RETENTION_DAYS = 365 DATA_RETENTION_SETTINGS_DEFAULT_FILE_RETENTION_DAYS = 365 DATA_RETENTION_SETTINGS_DEFAULT_DELETION_JOB_START_TIME = "02:00" PLUGIN_SETTINGS_DEFAULT_DIRECTORY = "./plugins" PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY = "./client/plugins" TIMEZONE_SETTINGS_DEFAULT_SUPPORTED_TIMEZONES_PATH = "timezones.json" COMPLIANCE_EXPORT_TYPE_CSV = "csv" COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance" COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay" GLOBALRELAY_CUSTOMER_TYPE_A9 = "A9" GLOBALRELAY_CUSTOMER_TYPE_A10 = "A10" CLIENT_SIDE_CERT_CHECK_PRIMARY_AUTH = "primary" CLIENT_SIDE_CERT_CHECK_SECONDARY_AUTH = "secondary" IMAGE_PROXY_TYPE_LOCAL = "local" IMAGE_PROXY_TYPE_ATMOS_CAMO = "atmos/camo" )
const ( EMOJI_NAME_MAX_LENGTH = 64 EMOJI_SORT_BY_NAME = "name" )
const ( GroupSourceLdap GroupSource = "ldap" GroupNameMaxLength = 64 GroupSourceMaxLength = 64 GroupDisplayNameMaxLength = 128 GroupDescriptionMaxLength = 1024 GroupRemoteIDMaxLength = 48 )
const ( POST_ACTION_TYPE_BUTTON = "button" POST_ACTION_TYPE_SELECT = "select" INTERACTIVE_DIALOG_TRIGGER_TIMEOUT_MILLISECONDS = 3000 )
const ( JOB_TYPE_DATA_RETENTION = "data_retention" JOB_TYPE_MESSAGE_EXPORT = "message_export" JOB_TYPE_ELASTICSEARCH_POST_INDEXING = "elasticsearch_post_indexing" JOB_TYPE_ELASTICSEARCH_POST_AGGREGATION = "elasticsearch_post_aggregation" JOB_TYPE_LDAP_SYNC = "ldap_sync" JOB_TYPE_MIGRATIONS = "migrations" JOB_TYPE_PLUGINS = "plugins" JOB_STATUS_PENDING = "pending" JOB_STATUS_IN_PROGRESS = "in_progress" JOB_STATUS_SUCCESS = "success" JOB_STATUS_ERROR = "error" JOB_STATUS_CANCEL_REQUESTED = "cancel_requested" JOB_STATUS_CANCELED = "canceled" )
const ( EXPIRED_LICENSE_ERROR = "api.license.add_license.expired.app_error" INVALID_LICENSE_ERROR = "api.license.add_license.invalid.app_error" )
const ( OAUTH_ACTION_SIGNUP = "signup" OAUTH_ACTION_LOGIN = "login" OAUTH_ACTION_EMAIL_TO_SSO = "email_to_sso" OAUTH_ACTION_SSO_TO_EMAIL = "sso_to_email" OAUTH_ACTION_MOBILE = "mobile" )
const ( PERMISSION_SCOPE_SYSTEM = "system_scope" PERMISSION_SCOPE_TEAM = "team_scope" PERMISSION_SCOPE_CHANNEL = "channel_scope" )
const ( KEY_VALUE_PLUGIN_ID_MAX_RUNES = 190 KEY_VALUE_KEY_MAX_RUNES = 50 )
const ( PluginStateNotRunning = 0 PluginStateStarting = 1 // unused by server PluginStateRunning = 2 PluginStateFailedToStart = 3 PluginStateFailedToStayRunning = 4 // unused by server PluginStateStopping = 5 // unused by server )
const ( POST_SYSTEM_MESSAGE_PREFIX = "system_" POST_DEFAULT = "" POST_SLACK_ATTACHMENT = "slack_attachment" POST_SYSTEM_GENERIC = "system_generic" POST_JOIN_LEAVE = "system_join_leave" // Deprecated, use POST_JOIN_CHANNEL or POST_LEAVE_CHANNEL instead POST_JOIN_CHANNEL = "system_join_channel" POST_LEAVE_CHANNEL = "system_leave_channel" POST_JOIN_TEAM = "system_join_team" POST_LEAVE_TEAM = "system_leave_team" POST_AUTO_RESPONDER = "system_auto_responder" POST_ADD_REMOVE = "system_add_remove" // Deprecated, use POST_ADD_TO_CHANNEL or POST_REMOVE_FROM_CHANNEL instead POST_ADD_TO_CHANNEL = "system_add_to_channel" POST_REMOVE_FROM_CHANNEL = "system_remove_from_channel" POST_MOVE_CHANNEL = "system_move_channel" POST_ADD_TO_TEAM = "system_add_to_team" POST_REMOVE_FROM_TEAM = "system_remove_from_team" POST_HEADER_CHANGE = "system_header_change" POST_DISPLAYNAME_CHANGE = "system_displayname_change" POST_CONVERT_CHANNEL = "system_convert_channel" POST_PURPOSE_CHANGE = "system_purpose_change" POST_CHANNEL_DELETED = "system_channel_deleted" POST_EPHEMERAL = "system_ephemeral" POST_CHANGE_CHANNEL_PRIVACY = "system_change_chan_privacy" POST_FILEIDS_MAX_RUNES = 150 POST_FILENAMES_MAX_RUNES = 4000 POST_HASHTAGS_MAX_RUNES = 1000 POST_MESSAGE_MAX_RUNES_V1 = 4000 POST_MESSAGE_MAX_BYTES_V2 = 65535 // Maximum size of a TEXT column in MySQL POST_MESSAGE_MAX_RUNES_V2 = POST_MESSAGE_MAX_BYTES_V2 / 4 // Assume a worst-case representation POST_PROPS_MAX_RUNES = 8000 POST_PROPS_MAX_USER_RUNES = POST_PROPS_MAX_RUNES - 400 // Leave some room for system / pre-save modifications POST_CUSTOM_TYPE_PREFIX = "custom_" PROPS_ADD_CHANNEL_MEMBER = "add_channel_member" POST_PROPS_ADDED_USER_ID = "addedUserId" POST_PROPS_DELETE_BY = "deleteBy" )
const ( PREFERENCE_CATEGORY_DIRECT_CHANNEL_SHOW = "direct_channel_show" PREFERENCE_CATEGORY_TUTORIAL_STEPS = "tutorial_step" PREFERENCE_CATEGORY_ADVANCED_SETTINGS = "advanced_settings" PREFERENCE_CATEGORY_FLAGGED_POST = "flagged_post" PREFERENCE_CATEGORY_FAVORITE_CHANNEL = "favorite_channel" PREFERENCE_CATEGORY_SIDEBAR_SETTINGS = "sidebar_settings" PREFERENCE_CATEGORY_DISPLAY_SETTINGS = "display_settings" PREFERENCE_NAME_CHANNEL_DISPLAY_MODE = "channel_display_mode" PREFERENCE_NAME_COLLAPSE_SETTING = "collapse_previews" PREFERENCE_NAME_MESSAGE_DISPLAY = "message_display" PREFERENCE_NAME_NAME_FORMAT = "name_format" PREFERENCE_NAME_USE_MILITARY_TIME = "use_military_time" PREFERENCE_CATEGORY_THEME = "theme" PREFERENCE_CATEGORY_AUTHORIZED_OAUTH_APP = "oauth_app" PREFERENCE_CATEGORY_LAST = "last" PREFERENCE_NAME_LAST_CHANNEL = "channel" PREFERENCE_NAME_LAST_TEAM = "team" PREFERENCE_CATEGORY_NOTIFICATIONS = "notifications" PREFERENCE_NAME_EMAIL_INTERVAL = "email_interval" PREFERENCE_EMAIL_INTERVAL_NO_BATCHING_SECONDS = "30" // the "immediate" setting is actually 30s PREFERENCE_EMAIL_INTERVAL_BATCHING_SECONDS = "900" // fifteen minutes is 900 seconds PREFERENCE_EMAIL_INTERVAL_IMMEDIATELY = "immediately" PREFERENCE_EMAIL_INTERVAL_FIFTEEN = "fifteen" PREFERENCE_EMAIL_INTERVAL_FIFTEEN_AS_SECONDS = "900" PREFERENCE_EMAIL_INTERVAL_HOUR = "hour" PREFERENCE_EMAIL_INTERVAL_HOUR_AS_SECONDS = "3600" )
const ( PUSH_NOTIFY_APPLE = "apple" PUSH_NOTIFY_ANDROID = "android" PUSH_NOTIFY_APPLE_REACT_NATIVE = "apple_rn" PUSH_NOTIFY_ANDROID_REACT_NATIVE = "android_rn" PUSH_TYPE_MESSAGE = "message" PUSH_TYPE_CLEAR = "clear" PUSH_MESSAGE_V2 = "v2" // The category is set to handle a set of interactive Actions // with the push notifications CATEGORY_CAN_REPLY = "CAN_REPLY" MHPNS = "https://push.mattermost.com" )
const ( PUSH_STATUS = "status" PUSH_STATUS_OK = "OK" PUSH_STATUS_FAIL = "FAIL" PUSH_STATUS_REMOVE = "REMOVE" PUSH_STATUS_ERROR_MSG = "error" )
const ( SYSTEM_USER_ROLE_ID = "system_user" SYSTEM_ADMIN_ROLE_ID = "system_admin" SYSTEM_POST_ALL_ROLE_ID = "system_post_all" SYSTEM_POST_ALL_PUBLIC_ROLE_ID = "system_post_all_public" SYSTEM_USER_ACCESS_TOKEN_ROLE_ID = "system_user_access_token" TEAM_USER_ROLE_ID = "team_user" TEAM_ADMIN_ROLE_ID = "team_admin" TEAM_POST_ALL_ROLE_ID = "team_post_all" TEAM_POST_ALL_PUBLIC_ROLE_ID = "team_post_all_public" CHANNEL_USER_ROLE_ID = "channel_user" CHANNEL_ADMIN_ROLE_ID = "channel_admin" ROLE_NAME_MAX_LENGTH = 64 ROLE_DISPLAY_NAME_MAX_LENGTH = 128 ROLE_DESCRIPTION_MAX_LENGTH = 1024 )
const ( USER_AUTH_SERVICE_SAML = "saml" USER_AUTH_SERVICE_SAML_TEXT = "SAML" )
const ( SCHEME_DISPLAY_NAME_MAX_LENGTH = 128 SCHEME_NAME_MAX_LENGTH = 64 SCHEME_DESCRIPTION_MAX_LENGTH = 1024 SCHEME_SCOPE_TEAM = "team" SCHEME_SCOPE_CHANNEL = "channel" )
const ( SESSION_COOKIE_TOKEN = "MMAUTHTOKEN" SESSION_COOKIE_USER = "MMUSERID" SESSION_CACHE_SIZE = 35000 SESSION_PROP_PLATFORM = "platform" SESSION_PROP_OS = "os" SESSION_PROP_BROWSER = "browser" SESSION_PROP_TYPE = "type" SESSION_PROP_USER_ACCESS_TOKEN_ID = "user_access_token_id" SESSION_TYPE_USER_ACCESS_TOKEN = "UserAccessToken" SESSION_ACTIVITY_TIMEOUT = 1000 * 60 * 5 // 5 minutes SESSION_USER_ACCESS_TOKEN_EXPIRY = 100 * 365 // 100 years )
const ( STATUS_OUT_OF_OFFICE = "ooo" STATUS_OFFLINE = "offline" STATUS_AWAY = "away" STATUS_DND = "dnd" STATUS_ONLINE = "online" STATUS_CACHE_SIZE = SESSION_CACHE_SIZE STATUS_CHANNEL_TIMEOUT = 20000 // 20 seconds STATUS_MIN_UPDATE_TIME = 120000 // 2 minutes )
const ( SYSTEM_DIAGNOSTIC_ID = "DiagnosticId" SYSTEM_RAN_UNIT_TESTS = "RanUnitTests" SYSTEM_LAST_SECURITY_TIME = "LastSecurityTime" SYSTEM_ACTIVE_LICENSE_ID = "ActiveLicenseId" SYSTEM_LAST_COMPLIANCE_TIME = "LastComplianceTime" SYSTEM_ASYMMETRIC_SIGNING_KEY = "AsymmetricSigningKey" SYSTEM_INSTALLATION_DATE_KEY = "InstallationDate" )
const ( TEAM_OPEN = "O" TEAM_INVITE = "I" TEAM_ALLOWED_DOMAINS_MAX_LENGTH = 500 TEAM_COMPANY_NAME_MAX_LENGTH = 64 TEAM_DESCRIPTION_MAX_LENGTH = 255 TEAM_DISPLAY_NAME_MAX_RUNES = 64 TEAM_EMAIL_MAX_LENGTH = 128 TEAM_NAME_MAX_LENGTH = 64 TEAM_NAME_MIN_LENGTH = 2 )
const ( TOKEN_SIZE = 64 MAX_TOKEN_EXIPRY_TIME = 1000 * 60 * 60 * 24 // 24 hour TOKEN_TYPE_OAUTH = "oauth" )
const ( ME = "me" USER_NOTIFY_ALL = "all" USER_NOTIFY_MENTION = "mention" USER_NOTIFY_NONE = "none" DESKTOP_NOTIFY_PROP = "desktop" DESKTOP_SOUND_NOTIFY_PROP = "desktop_sound" MARK_UNREAD_NOTIFY_PROP = "mark_unread" PUSH_NOTIFY_PROP = "push" PUSH_STATUS_NOTIFY_PROP = "push_status" EMAIL_NOTIFY_PROP = "email" CHANNEL_MENTIONS_NOTIFY_PROP = "channel" COMMENTS_NOTIFY_PROP = "comments" MENTION_KEYS_NOTIFY_PROP = "mention_keys" COMMENTS_NOTIFY_NEVER = "never" COMMENTS_NOTIFY_ROOT = "root" COMMENTS_NOTIFY_ANY = "any" FIRST_NAME_NOTIFY_PROP = "first_name" AUTO_RESPONDER_ACTIVE_NOTIFY_PROP = "auto_responder_active" AUTO_RESPONDER_MESSAGE_NOTIFY_PROP = "auto_responder_message" DEFAULT_LOCALE = "en" USER_AUTH_SERVICE_EMAIL = "email" USER_EMAIL_MAX_LENGTH = 128 USER_NICKNAME_MAX_RUNES = 64 USER_POSITION_MAX_RUNES = 128 USER_FIRST_NAME_MAX_RUNES = 64 USER_LAST_NAME_MAX_RUNES = 64 USER_AUTH_DATA_MAX_LENGTH = 128 USER_NAME_MAX_LENGTH = 64 USER_NAME_MIN_LENGTH = 1 USER_PASSWORD_MAX_LENGTH = 72 USER_LOCALE_MAX_LENGTH = 5 )
const ( LOWERCASE_LETTERS = "abcdefghijklmnopqrstuvwxyz" UPPERCASE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" NUMBERS = "0123456789" SYMBOLS = " !\"\\#$%&'()*+,-./:;<=>?@[]^_`|~" )
const ( SOCKET_MAX_MESSAGE_SIZE_KB = 8 * 1024 // 8KB PING_TIMEOUT_BUFFER_SECONDS = 5 )
const ( WEBSOCKET_EVENT_TYPING = "typing" WEBSOCKET_EVENT_POSTED = "posted" WEBSOCKET_EVENT_POST_EDITED = "post_edited" WEBSOCKET_EVENT_POST_DELETED = "post_deleted" WEBSOCKET_EVENT_CHANNEL_CONVERTED = "channel_converted" WEBSOCKET_EVENT_CHANNEL_CREATED = "channel_created" WEBSOCKET_EVENT_CHANNEL_DELETED = "channel_deleted" WEBSOCKET_EVENT_CHANNEL_UPDATED = "channel_updated" WEBSOCKET_EVENT_CHANNEL_MEMBER_UPDATED = "channel_member_updated" WEBSOCKET_EVENT_DIRECT_ADDED = "direct_added" WEBSOCKET_EVENT_GROUP_ADDED = "group_added" WEBSOCKET_EVENT_NEW_USER = "new_user" WEBSOCKET_EVENT_ADDED_TO_TEAM = "added_to_team" WEBSOCKET_EVENT_LEAVE_TEAM = "leave_team" WEBSOCKET_EVENT_UPDATE_TEAM = "update_team" WEBSOCKET_EVENT_DELETE_TEAM = "delete_team" WEBSOCKET_EVENT_RESTORE_TEAM = "restore_team" WEBSOCKET_EVENT_USER_ADDED = "user_added" WEBSOCKET_EVENT_USER_UPDATED = "user_updated" WEBSOCKET_EVENT_USER_ROLE_UPDATED = "user_role_updated" WEBSOCKET_EVENT_MEMBERROLE_UPDATED = "memberrole_updated" WEBSOCKET_EVENT_USER_REMOVED = "user_removed" WEBSOCKET_EVENT_PREFERENCE_CHANGED = "preference_changed" WEBSOCKET_EVENT_PREFERENCES_CHANGED = "preferences_changed" WEBSOCKET_EVENT_PREFERENCES_DELETED = "preferences_deleted" WEBSOCKET_EVENT_EPHEMERAL_MESSAGE = "ephemeral_message" WEBSOCKET_EVENT_STATUS_CHANGE = "status_change" WEBSOCKET_EVENT_HELLO = "hello" WEBSOCKET_AUTHENTICATION_CHALLENGE = "authentication_challenge" WEBSOCKET_EVENT_REACTION_ADDED = "reaction_added" WEBSOCKET_EVENT_REACTION_REMOVED = "reaction_removed" WEBSOCKET_EVENT_RESPONSE = "response" WEBSOCKET_EVENT_EMOJI_ADDED = "emoji_added" WEBSOCKET_EVENT_CHANNEL_VIEWED = "channel_viewed" WEBSOCKET_EVENT_PLUGIN_STATUSES_CHANGED = "plugin_statuses_changed" WEBSOCKET_EVENT_PLUGIN_ENABLED = "plugin_enabled" WEBSOCKET_EVENT_PLUGIN_DISABLED = "plugin_disabled" WEBSOCKET_EVENT_ROLE_UPDATED = "role_updated" WEBSOCKET_EVENT_LICENSE_CHANGED = "license_changed" WEBSOCKET_EVENT_CONFIG_CHANGED = "config_changed" WEBSOCKET_EVENT_OPEN_DIALOG = "open_dialog" )
const (
COMMAND_WEBHOOK_LIFETIME = 1000 * 60 * 30
)
const (
DEFAULT_WEBHOOK_USERNAME = "webhook"
)
const (
MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2 = "migration_advanced_permissions_phase_2"
)
const (
MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image
)
const OUTGOING_HOOK_RESPONSE_TYPE_COMMENT = "comment"
const TERMS_OF_SERVICE_CACHE_SIZE = 1
const (
USER_AUTH_SERVICE_GITLAB = "gitlab"
)
const (
USER_AUTH_SERVICE_LDAP = "ldap"
)
const USER_SEARCH_DEFAULT_LIMIT = 100
const USER_SEARCH_MAX_LIMIT = 1000
Variables ¶
var ( IMAGE_EXTENSIONS = [5]string{".jpg", ".jpeg", ".gif", ".bmp", ".png"} IMAGE_MIME_TYPES = map[string]string{".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".gif": "image/gif", ".bmp": "image/bmp", ".png": "image/png", ".tiff": "image/tiff"} )
var ALL_PERMISSIONS []*Permission
var BuildDate string
var BuildEnterpriseReady string
var BuildHash string
var BuildHashEnterprise string
var BuildNumber string
var CurrentVersion string = versions[0]
var EMOJI_PATTERN = regexp.MustCompile(`:[a-zA-Z0-9_-]+:`)
var ServerTLSSupportedCiphers = map[string]uint16{ "TLS_RSA_WITH_RC4_128_SHA": tls.TLS_RSA_WITH_RC4_128_SHA, "TLS_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS_RSA_WITH_AES_128_CBC_SHA": tls.TLS_RSA_WITH_AES_128_CBC_SHA, "TLS_RSA_WITH_AES_256_CBC_SHA": tls.TLS_RSA_WITH_AES_256_CBC_SHA, "TLS_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS_ECDHE_RSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, }
var SystemEmojis = map[string]string{} /* 2383 elements not displayed */
Functions ¶
func AppErrorInit ¶
func AppErrorInit(t goi18n.TranslateFunc)
func ArrayFromInterface ¶
func ArrayFromInterface(data interface{}) []string
func ArrayFromJson ¶
func ArrayToJson ¶
func ChannelMentions ¶
func CheckStatusOK ¶
CheckStatusOK is a convenience function for checking the standard OK response from the web service.
func CleanTeamName ¶
func CleanUsername ¶
func ClearMentionTags ¶
func ClusterInfosToJson ¶
func ClusterInfosToJson(objmap []*ClusterInfo) string
func CommandListToJson ¶
func ComparePassword ¶
ComparePassword compares the hash
func CompliancePostHeader ¶
func CompliancePostHeader() []string
func EmojiListToJson ¶
func FileInfosToJson ¶
func FloorToNearestHour ¶
FloorToNearestHour takes a timestamp (in milliseconds) and returns it rounded to the previous hour in UTC.
func GenerateLinkMetadataHash ¶
GenerateLinkMetadataHash generates a unique hash for a given URL and timestamp for use as a database key.
func GetDMNameFromIds ¶
func GetEndOfDayMillis ¶
GetEndOfDayMillis is a convenience method to get milliseconds since epoch for provided date's end of day
func GetEtagForFileInfos ¶
func GetGroupNameFromUserIds ¶
func GetImageMimeType ¶
func GetInfoForBytes ¶ added in v1.4.0
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 GetServerIpAddress() string
func GetStartOfDayMillis ¶
GetStartOfDayMillis is a convenience method to get milliseconds since epoch for provided date's start of day
func HashPassword ¶
HashPassword generates a hash using the bcrypt.GenerateFromPassword
func IncomingWebhookListToJson ¶
func IncomingWebhookListToJson(l []*IncomingWebhook) string
func IncomingWebhookRequestFromJson ¶ added in v1.2.1
func IncomingWebhookRequestFromJson(data io.Reader) (*IncomingWebhookRequest, *AppError)
func IsChannelMarkUnreadLevelValid ¶ added in v1.1.0
func IsCurrentVersion ¶
func IsDomainName ¶
Copied from https://golang.org/src/net/dnsclient.go#L119
func IsFileExtImage ¶
func IsInRole ¶
Make sure you acually want to use this function. In context.go there are functions to check permissions This function should not be used to check permissions.
func IsReservedTeamName ¶
func IsSafeLink ¶
func IsSendEmailValid ¶
func IsValidAlphaNum ¶
func IsValidEmail ¶
func IsValidHttpUrl ¶ added in v1.2.1
func IsValidLocale ¶
func IsValidNumberString ¶
func IsValidRoleName ¶
func IsValidSchemeName ¶
func IsValidTeamName ¶
func IsValidTurnOrStunServer ¶
func IsValidUserNotifyLevel ¶
func IsValidUserRoles ¶
func IsValidUsername ¶
func IsValidWebsocketUrl ¶
func JobsToJson ¶
func MakeDefaultRoles ¶
func ManifestListToJson ¶
func MapBoolFromJson ¶
MapFromJson will decode the key/value pair map
func MapBoolToJson ¶
MapToJson converts a map to a json string
func MapFromJson ¶
MapFromJson will decode the key/value pair map
func NewId ¶
func NewId() string
NewId is a globally unique identifier. It is a [A-Z0-9] string 26 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off.
func NewRandomString ¶ added in v1.4.0
func NewWebSocketClient ¶
func NewWebSocketClient(url, authToken string) (*WebSocketClient, *AppError)
NewWebSocketClient constructs a new WebSocket client with convenience methods for talking to the server.
func NewWebSocketClient4 ¶
func NewWebSocketClient4(url, authToken string) (*WebSocketClient, *AppError)
NewWebSocketClient4 constructs a new WebSocket client with convenience methods for talking to the server. Uses the v4 endpoint.
func NewWebSocketClient4WithDialer ¶
func NewWebSocketClient4WithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)
NewWebSocketClient4WithDialer constructs a new WebSocket client with convenience methods for talking to the server using a custom dialer. Uses the v4 endpoint.
func NewWebSocketClientWithDialer ¶
func NewWebSocketClientWithDialer(dialer *websocket.Dialer, url, authToken string) (*WebSocketClient, *AppError)
NewWebSocketClientWithDialer constructs a new WebSocket client with convenience methods for talking to the server using a custom dialer.
func NormalizeEmail ¶
func NormalizeUsername ¶
func OAuthAppListToJson ¶
func OutgoingWebhookListToJson ¶ added in v1.2.1
func OutgoingWebhookListToJson(l []*OutgoingWebhook) string
func PadDateStringZeros ¶
PadDateStringZeros is a convenience method to pad 2 digit date parts with zeros to meet ISO 8601 format
func ParseHashtags ¶
func 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 ReactionsToJson ¶
func RemoveDuplicateStrings ¶
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 RoleListToJson ¶
func SchemeIDFromJson ¶
func SchemesToJson ¶
func SessionsToJson ¶
func StatusListToJson ¶
func StatusMapToInterfaceMap ¶
func StringFromJson ¶
func StringInterfaceFromJson ¶ added in v1.2.1
func StringInterfaceToJson ¶ added in v1.2.1
func StringToJson ¶
func TeamListToJson ¶
func TeamMapToJson ¶
func TeamMembersToJson ¶
func TeamMembersToJson(o []*TeamMember) string
func TeamsUnreadToJson ¶
func TeamsUnreadToJson(o []*TeamUnread) string
func UserAccessTokenListToJson ¶
func UserAccessTokenListToJson(t []*UserAccessToken) string
func UserListToJson ¶
func UserMapToJson ¶
Types ¶
type AccessData ¶
type AccessData struct { ClientId string `json:"client_id"` UserId string `json:"user_id"` Token string `json:"token"` RefreshToken string `json:"refresh_token"` RedirectUri string `json:"redirect_uri"` ExpiresAt int64 `json:"expires_at"` Scope string `json:"scope"` }
func AccessDataFromJson ¶
func AccessDataFromJson(data io.Reader) *AccessData
func (*AccessData) IsExpired ¶
func (me *AccessData) IsExpired() bool
func (*AccessData) IsValid ¶
func (ad *AccessData) IsValid() *AppError
IsValid validates the AccessData and returns an error if it isn't configured correctly.
func (*AccessData) ToJson ¶
func (ad *AccessData) ToJson() string
type AccessResponse ¶
type AccessResponse struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int32 `json:"expires_in"` Scope string `json:"scope"` RefreshToken string `json:"refresh_token"` }
func AccessResponseFromJson ¶
func AccessResponseFromJson(data io.Reader) *AccessResponse
func (*AccessResponse) ToJson ¶
func (ar *AccessResponse) ToJson() string
type AnalyticsRow ¶ added in v1.2.1
func AnalyticsRowFromJson ¶ added in v1.2.1
func AnalyticsRowFromJson(data io.Reader) *AnalyticsRow
func (*AnalyticsRow) ToJson ¶ added in v1.2.1
func (me *AnalyticsRow) ToJson() string
type AnalyticsRows ¶ added in v1.2.1
type AnalyticsRows []*AnalyticsRow
func AnalyticsRowsFromJson ¶ added in v1.2.1
func AnalyticsRowsFromJson(data io.Reader) AnalyticsRows
func (AnalyticsRows) ToJson ¶ added in v1.2.1
func (me AnalyticsRows) ToJson() string
type AnalyticsSettings ¶
type AnalyticsSettings struct {
MaxUsersForStatistics *int
}
func (*AnalyticsSettings) SetDefaults ¶
func (s *AnalyticsSettings) SetDefaults()
type AnnouncementSettings ¶
type AnnouncementSettings struct { EnableBanner *bool BannerText *string BannerColor *string BannerTextColor *string AllowBannerDismissal *bool }
func (*AnnouncementSettings) SetDefaults ¶
func (s *AnnouncementSettings) SetDefaults()
type AppError ¶
type AppError struct { Id string `json:"id"` Message string `json:"message"` // Message to be display to the end user without debugging information DetailedError string `json:"detailed_error"` // Internal error string to help the developer RequestId string `json:"request_id,omitempty"` // The RequestId that's also set in the header StatusCode int `json:"status_code,omitempty"` // The http status code Where string `json:"-"` // The function where it happened in the form of Struct.Func IsOAuth bool `json:"is_oauth,omitempty"` // Whether the error is OAuth specific // contains filtered or unexported fields }
func AppErrorFromJson ¶
AppErrorFromJson will decode the input and return an AppError
func GenerateTriggerId ¶
func InvalidUserError ¶
func IsValidEmojiName ¶
func NewAppError ¶
func (*AppError) SystemMessage ¶
func (er *AppError) SystemMessage(T goi18n.TranslateFunc) string
func (*AppError) Translate ¶
func (er *AppError) Translate(T goi18n.TranslateFunc)
type Audit ¶
type Audit struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UserId string `json:"user_id"` Action string `json:"action"` ExtraInfo string `json:"extra_info"` IpAddress string `json:"ip_address"` SessionId string `json:"session_id"` }
func AuditFromJson ¶
type AuthData ¶
type AuthData struct { ClientId string `json:"client_id"` UserId string `json:"user_id"` Code string `json:"code"` ExpiresIn int32 `json:"expires_in"` CreateAt int64 `json:"create_at"` RedirectUri string `json:"redirect_uri"` State string `json:"state"` Scope string `json:"scope"` }
func AuthDataFromJson ¶
type AuthorizeRequest ¶
type AuthorizeRequest struct { ResponseType string `json:"response_type"` ClientId string `json:"client_id"` RedirectUri string `json:"redirect_uri"` Scope string `json:"scope"` State string `json:"state"` }
func AuthorizeRequestFromJson ¶
func AuthorizeRequestFromJson(data io.Reader) *AuthorizeRequest
func (*AuthorizeRequest) IsValid ¶
func (ar *AuthorizeRequest) IsValid() *AppError
IsValid validates the AuthorizeRequest and returns an error if it isn't configured correctly.
func (*AuthorizeRequest) ToJson ¶
func (ar *AuthorizeRequest) ToJson() string
type 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 Channel ¶
type Channel struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` TeamId string `json:"team_id"` Type string `json:"type"` DisplayName string `json:"display_name"` Name string `json:"name"` Header string `json:"header"` Purpose string `json:"purpose"` LastPostAt int64 `json:"last_post_at"` TotalMsgCount int64 `json:"total_msg_count"` ExtraUpdateAt int64 `json:"extra_update_at"` CreatorId string `json:"creator_id"` SchemeId *string `json:"scheme_id"` Props map[string]interface{} `json:"props" db:"-"` }
func ChannelFromJson ¶
func ChannelSliceFromJson ¶
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"` UpdateTimes map[string]int64 `json:"update_times"` }
func ChannelCountsFromJson ¶
func ChannelCountsFromJson(data io.Reader) *ChannelCounts
func (*ChannelCounts) Etag ¶
func (o *ChannelCounts) Etag() string
func (*ChannelCounts) ToJson ¶
func (o *ChannelCounts) ToJson() string
type ChannelData ¶
type ChannelData struct { Channel *Channel `json:"channel"` Member *ChannelMember `json:"member"` }
func ChannelDataFromJson ¶
func ChannelDataFromJson(data io.Reader) *ChannelData
func (*ChannelData) Etag ¶
func (o *ChannelData) Etag() string
func (*ChannelData) ToJson ¶
func (o *ChannelData) ToJson() string
type ChannelForExport ¶
type ChannelList ¶
type ChannelList []*Channel
func ChannelListFromJson ¶
func ChannelListFromJson(data io.Reader) *ChannelList
func (*ChannelList) Etag ¶
func (o *ChannelList) Etag() string
func (*ChannelList) ToJson ¶
func (o *ChannelList) ToJson() string
type ChannelListWithTeamData ¶
type ChannelListWithTeamData []*ChannelWithTeamData
func ChannelListWithTeamDataFromJson ¶
func ChannelListWithTeamDataFromJson(data io.Reader) *ChannelListWithTeamData
func (*ChannelListWithTeamData) Etag ¶
func (o *ChannelListWithTeamData) Etag() string
func (*ChannelListWithTeamData) ToJson ¶
func (o *ChannelListWithTeamData) ToJson() string
type ChannelMember ¶
type ChannelMember struct { ChannelId string `json:"channel_id"` UserId string `json:"user_id"` Roles string `json:"roles"` LastViewedAt int64 `json:"last_viewed_at"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` NotifyProps StringMap `json:"notify_props"` LastUpdateAt int64 `json:"last_update_at"` SchemeUser bool `json:"scheme_user"` SchemeAdmin bool `json:"scheme_admin"` ExplicitRoles string `json:"explicit_roles"` }
func ChannelMemberFromJson ¶
func ChannelMemberFromJson(data io.Reader) *ChannelMember
func (*ChannelMember) GetRoles ¶
func (o *ChannelMember) GetRoles() []string
func (*ChannelMember) IsValid ¶
func (o *ChannelMember) IsValid() *AppError
func (*ChannelMember) PreSave ¶
func (o *ChannelMember) PreSave()
func (*ChannelMember) PreUpdate ¶ added in v1.1.0
func (o *ChannelMember) PreUpdate()
func (*ChannelMember) ToJson ¶
func (o *ChannelMember) ToJson() string
type ChannelMemberForExport ¶
type ChannelMemberForExport struct { ChannelMember ChannelName string }
type ChannelMemberHistory ¶
type ChannelMembers ¶
type ChannelMembers []ChannelMember
func ChannelMembersFromJson ¶
func ChannelMembersFromJson(data io.Reader) *ChannelMembers
func (*ChannelMembers) ToJson ¶
func (o *ChannelMembers) ToJson() string
type ChannelPatch ¶
type ChannelPatch struct { DisplayName *string `json:"display_name"` Name *string `json:"name"` Header *string `json:"header"` Purpose *string `json:"purpose"` }
func ChannelPatchFromJson ¶
func ChannelPatchFromJson(data io.Reader) *ChannelPatch
func (*ChannelPatch) ToJson ¶
func (o *ChannelPatch) ToJson() string
type ChannelSearch ¶
type ChannelSearch struct {
Term string `json:"term"`
}
func ChannelSearchFromJson ¶
func ChannelSearchFromJson(data io.Reader) *ChannelSearch
ChannelSearchFromJson will decode the input and return a Channel
func (*ChannelSearch) ToJson ¶
func (c *ChannelSearch) ToJson() string
ToJson convert a Channel to a json string
type ChannelStats ¶
type ChannelStats struct { ChannelId string `json:"channel_id"` MemberCount int64 `json:"member_count"` }
func ChannelStatsFromJson ¶
func ChannelStatsFromJson(data io.Reader) *ChannelStats
func (*ChannelStats) ToJson ¶
func (o *ChannelStats) ToJson() string
type ChannelUnread ¶
type ChannelUnread struct { TeamId string `json:"team_id"` ChannelId string `json:"channel_id"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` NotifyProps StringMap `json:"-"` }
func ChannelUnreadFromJson ¶
func ChannelUnreadFromJson(data io.Reader) *ChannelUnread
func (*ChannelUnread) ToJson ¶
func (o *ChannelUnread) ToJson() string
type ChannelView ¶
type ChannelView struct { ChannelId string `json:"channel_id"` PrevChannelId string `json:"prev_channel_id"` }
func ChannelViewFromJson ¶
func ChannelViewFromJson(data io.Reader) *ChannelView
func (*ChannelView) ToJson ¶
func (o *ChannelView) ToJson() string
type ChannelViewResponse ¶
type ChannelViewResponse struct { Status string `json:"status"` LastViewedAtTimes map[string]int64 `json:"last_viewed_at_times"` }
func ChannelViewResponseFromJson ¶
func ChannelViewResponseFromJson(data io.Reader) *ChannelViewResponse
func (*ChannelViewResponse) ToJson ¶
func (o *ChannelViewResponse) ToJson() string
type ChannelWithTeamData ¶
type Client4 ¶
type Client4 struct { Url string // The location of the server, for example "http://localhost:8065" ApiUrl string // The api location of the server, for example "http://localhost:8065/api/v4" HttpClient *http.Client // The http client AuthToken string AuthType string HttpHeader map[string]string // Headers to be copied over for each request }
func NewAPIv4Client ¶
func (*Client4) AddChannelMember ¶
func (c *Client4) AddChannelMember(channelId, userId string) (*ChannelMember, *Response)
AddChannelMember adds user to channel and return a channel member.
func (*Client4) AddChannelMemberWithRootId ¶
func (c *Client4) AddChannelMemberWithRootId(channelId, userId, postRootId string) (*ChannelMember, *Response)
AddChannelMemberWithRootId adds user to channel and return a channel member. Post add to channel message has the postRootId.
func (*Client4) AddTeamMember ¶
func (c *Client4) AddTeamMember(teamId, userId string) (*TeamMember, *Response)
AddTeamMember adds user to a team and return a team member.
func (*Client4) AddTeamMemberFromInvite ¶
func (c *Client4) AddTeamMemberFromInvite(token, inviteId string) (*TeamMember, *Response)
AddTeamMemberFromInvite adds a user to a team and return a team member using an invite id or an invite token/data pair.
func (*Client4) AddTeamMembers ¶
func (c *Client4) AddTeamMembers(teamId string, userIds []string) ([]*TeamMember, *Response)
AddTeamMembers adds a number of users to a team and returns the team members.
func (*Client4) AttachDeviceId ¶
AttachDeviceId attaches a mobile device ID to the current session.
func (*Client4) AuthorizeOAuthApp ¶
func (c *Client4) AuthorizeOAuthApp(authRequest *AuthorizeRequest) (string, *Response)
AuthorizeOAuthApp will authorize an OAuth 2.0 client application to access a user's account and provide a redirect link to follow.
func (*Client4) AutocompleteChannelsForTeam ¶
func (c *Client4) AutocompleteChannelsForTeam(teamId, name string) (*ChannelList, *Response)
AutocompleteChannelsForTeam will return an ordered list of channels autocomplete suggestions.
func (*Client4) AutocompleteChannelsForTeamForSearch ¶
func (c *Client4) AutocompleteChannelsForTeamForSearch(teamId, name string) (*ChannelList, *Response)
AutocompleteChannelsForTeamForSearch will return an ordered list of your channels autocomplete suggestions.
func (*Client4) AutocompleteEmoji ¶
AutocompleteEmoji returns a list of emoji starting with or matching name.
func (*Client4) AutocompleteUsers ¶
func (c *Client4) AutocompleteUsers(username string, limit int, etag string) (*UserAutocomplete, *Response)
AutocompleteUsers returns the users in the system based on search term.
func (*Client4) AutocompleteUsersInChannel ¶
func (c *Client4) AutocompleteUsersInChannel(teamId string, channelId string, username string, limit int, etag string) (*UserAutocomplete, *Response)
AutocompleteUsersInChannel returns the users in a channel based on search term.
func (*Client4) AutocompleteUsersInTeam ¶
func (c *Client4) AutocompleteUsersInTeam(teamId string, username string, limit int, etag string) (*UserAutocomplete, *Response)
AutocompleteUsersInTeam returns the users on a team based on search term.
func (*Client4) CheckUserMfa ¶
CheckUserMfa checks whether a user has MFA active on their account or not based on the provided login id.
func (*Client4) ClearOAuthToken ¶
func (c *Client4) ClearOAuthToken()
func (*Client4) ConvertChannelToPrivate ¶
ConvertChannelToPrivate converts public to private channel.
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)
CreateComplianceReport creates an incoming webhook for a channel.
func (*Client4) CreateDirectChannel ¶
CreateDirectChannel creates a direct message channel based on the two user ids provided.
func (*Client4) CreateEmoji ¶
CreateEmoji will save an emoji to the server if the current user has permission to do so. If successful, the provided emoji will be returned with its Id field filled in. Otherwise, an error will be returned.
func (*Client4) CreateGroupChannel ¶
CreateGroupChannel creates a group message channel based on userIds provided.
func (*Client4) CreateIncomingWebhook ¶
func (c *Client4) CreateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
CreateIncomingWebhook creates an incoming webhook for a channel.
func (*Client4) CreateOAuthApp ¶
CreateOAuthApp will register a new OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) CreateOutgoingWebhook ¶
func (c *Client4) CreateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
CreateOutgoingWebhook creates an outgoing webhook for a team or channel.
func (*Client4) CreatePost ¶
CreatePost creates a post based on the provided post struct.
func (*Client4) CreatePostEphemeral ¶
func (c *Client4) CreatePostEphemeral(post *PostEphemeral) (*Post, *Response)
CreatePostEphemeral creates a ephemeral post based on the provided post struct which is send to the given user id.
func (*Client4) CreateScheme ¶
CreateScheme creates a new Scheme.
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)
CreateTermsOfService creates new terms of service.
func (*Client4) CreateUser ¶
CreateUser creates a user in the system based on the provided user struct.
func (*Client4) CreateUserAccessToken ¶
func (c *Client4) CreateUserAccessToken(userId, description string) (*UserAccessToken, *Response)
CreateUserAccessToken will generate a user access token that can be used in place of a session token to access the REST API. Must have the 'create_user_access_token' permission and if generating for another user, must have the 'edit_other_users' permission. A non-blank description is required.
func (*Client4) CreateUserWithInviteId ¶
CreateUserWithInviteId creates a user in the system based on the provided invited id.
func (*Client4) CreateUserWithToken ¶
CreateUserWithToken creates a user in the system based on the provided tokenId.
func (*Client4) DatabaseRecycle ¶
DatabaseRecycle will recycle the connections. Discard current connection and get new one.
func (*Client4) DeauthorizeOAuthApp ¶
DeauthorizeOAuthApp will deauthorize an OAuth 2.0 client application from accessing a user's account.
func (*Client4) DeleteBrandImage ¶
DeleteBrandImage delets 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) DeleteEmoji ¶
DeleteEmoji delete an custom emoji on the provided emoji id string.
func (*Client4) DeleteIncomingWebhook ¶
DeleteIncomingWebhook deletes and Incoming Webhook given the hook ID.
func (*Client4) DeleteOAuthApp ¶
DeleteOAuthApp deletes a registered OAuth 2.0 client application.
func (*Client4) DeleteOutgoingWebhook ¶
DeleteOutgoingWebhook delete the outgoing webhook on the system requested by Hook Id.
func (*Client4) DeletePost ¶
DeletePost deletes a post from the provided post id string.
func (*Client4) DeletePreferences ¶
func (c *Client4) DeletePreferences(userId string, preferences *Preferences) (bool, *Response)
DeletePreferences deletes the user's preferences.
func (*Client4) DeleteReaction ¶
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) DisablePlugin ¶
DisablePlugin will disable an enabled plugin. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
func (*Client4) DisableUserAccessToken ¶
DisableUserAccessToken will disable a user access token by id. Must have the 'revoke_user_access_token' permission and if disabling for another user, must have the 'edit_other_users' permission.
func (*Client4) DoApiRequest ¶
func (*Client4) DoEmojiUploadFile ¶
func (*Client4) DoPostAction ¶
DoPostAction performs a post action.
func (*Client4) DoUploadFile ¶
func (*Client4) DoUploadImportTeam ¶
func (*Client4) DownloadComplianceReport ¶
DownloadComplianceReport returns a full compliance report as a file.
func (*Client4) DownloadFile ¶
DownloadFile gets the bytes for a file by id, optionally adding headers to force the browser to download it.
func (*Client4) DownloadFilePreview ¶
DownloadFilePreview gets the bytes for a file by id.
func (*Client4) DownloadFileThumbnail ¶
DownloadFileThumbnail gets the bytes for a file by id, optionally adding headers to force the browser to download it.
func (*Client4) EnablePlugin ¶
EnablePlugin will enable an plugin installed. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
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)
ExecuteCommand executes a given slash command.
func (*Client4) ExecuteCommandWithTeam ¶
func (c *Client4) ExecuteCommandWithTeam(channelId, teamId, command string) (*CommandResponse, *Response)
ExecuteCommandWithTeam executes a given slash command against the specified team. Use this when executing slash commands in a DM/GM, since the team id cannot be inferred in that case.
func (*Client4) GenerateMfaSecret ¶
GenerateMfaSecret will generate a new MFA secret for a user and return it as a string and as a base64 encoded image QR code.
func (*Client4) GetAllChannels ¶
func (c *Client4) GetAllChannels(page int, perPage int, etag string) (*ChannelListWithTeamData, *Response)
GetAllChannels get all the channels. Must be a system administrator.
func (*Client4) GetAllTeams ¶
GetAllTeams returns all teams based on permissions.
func (*Client4) GetAnalyticsOld ¶
func (c *Client4) GetAnalyticsOld(name, teamId string) (AnalyticsRows, *Response)
GetAnalyticsOld will retrieve analytics using the old format. New format is not available but the "/analytics" endpoint is reserved for it. The "name" argument is optional and defaults to "standard". The "teamId" argument is optional and will limit results to a specific team.
func (*Client4) GetAnalyticsRoute ¶
func (*Client4) GetAuthorizedOAuthAppsForUser ¶
func (c *Client4) GetAuthorizedOAuthAppsForUser(userId string, page, perPage int) ([]*OAuthApp, *Response)
GetAuthorizedOAuthAppsForUser gets a page of OAuth 2.0 client applications the user has authorized to use access their account.
func (*Client4) GetBrandImage ¶
GetBrandImage retrieves the previously uploaded brand image.
func (*Client4) GetBrandRoute ¶
func (*Client4) GetBulkReactions ¶
FetchBulkReactions returns a map of postIds and corresponding reactions
func (*Client4) GetCacheRoute ¶
func (*Client4) GetChannel ¶
GetChannel returns a channel based on the provided channel id string.
func (*Client4) GetChannelByName ¶
GetChannelByName returns a channel based on the provided channel name and team id strings.
func (*Client4) GetChannelByNameForTeamName ¶
func (c *Client4) GetChannelByNameForTeamName(channelName, teamName string, etag string) (*Channel, *Response)
GetChannelByNameForTeamName returns a channel based on the provided channel name and team name strings.
func (*Client4) GetChannelByNameForTeamNameIncludeDeleted ¶
func (c *Client4) GetChannelByNameForTeamNameIncludeDeleted(channelName, teamName string, etag string) (*Channel, *Response)
GetChannelByNameForTeamNameIncludeDeleted returns a channel based on the provided channel name and team name strings. Other then GetChannelByNameForTeamName it will also return deleted channels.
func (*Client4) GetChannelByNameForTeamNameRoute ¶
func (*Client4) GetChannelByNameIncludeDeleted ¶
func (c *Client4) GetChannelByNameIncludeDeleted(channelName, teamId string, etag string) (*Channel, *Response)
GetChannelByNameIncludeDeleted returns a channel based on the provided channel name and team id strings. Other then GetChannelByName it will also return deleted channels.
func (*Client4) GetChannelByNameRoute ¶
func (*Client4) GetChannelMember ¶
func (c *Client4) GetChannelMember(channelId, userId, etag string) (*ChannelMember, *Response)
GetChannelMember gets a channel member.
func (*Client4) GetChannelMemberRoute ¶
func (*Client4) GetChannelMembers ¶
func (c *Client4) GetChannelMembers(channelId string, page, perPage int, etag string) (*ChannelMembers, *Response)
GetChannelMembers gets a page of channel members.
func (*Client4) GetChannelMembersByIds ¶
func (c *Client4) GetChannelMembersByIds(channelId string, userIds []string) (*ChannelMembers, *Response)
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)
GetChannelMembersForUser gets all the channel members for a user on a team.
func (*Client4) GetChannelMembersRoute ¶
func (*Client4) GetChannelMembersTimezones ¶
GetChannelMembersTimezones gets a list of timezones for a channel.
func (*Client4) GetChannelRoute ¶
func (*Client4) GetChannelSchemeRoute ¶
func (*Client4) GetChannelStats ¶
func (c *Client4) GetChannelStats(channelId string, etag string) (*ChannelStats, *Response)
GetChannelStats returns statistics for a channel.
func (*Client4) GetChannelUnread ¶
func (c *Client4) GetChannelUnread(channelId, userId string) (*ChannelUnread, *Response)
GetChannelUnread will return a ChannelUnread object that contains the number of unread messages and mentions for a user.
func (*Client4) GetChannelsForScheme ¶
func (c *Client4) GetChannelsForScheme(schemeId string, page int, perPage int) (ChannelList, *Response)
GetChannelsForScheme gets the channels using this scheme, sorted alphabetically by display name.
func (*Client4) GetChannelsForTeamForUser ¶
GetChannelsForTeamForUser returns a list channels of on a team for a user.
func (*Client4) GetChannelsForTeamRoute ¶
func (*Client4) GetChannelsRoute ¶
func (*Client4) GetClusterRoute ¶
func (*Client4) GetClusterStatus ¶
func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response)
GetClusterStatus returns the status of all the configured cluster nodes.
func (*Client4) GetCommandRoute ¶
func (*Client4) GetCommandsRoute ¶
func (*Client4) GetComplianceReport ¶
func (c *Client4) GetComplianceReport(reportId string) (*Compliance, *Response)
GetComplianceReport returns a compliance report.
func (*Client4) GetComplianceReportRoute ¶
func (*Client4) GetComplianceReports ¶
func (c *Client4) GetComplianceReports(page, perPage int) (Compliances, *Response)
GetComplianceReports returns list of compliance reports.
func (*Client4) GetComplianceReportsRoute ¶
func (*Client4) GetConfigRoute ¶
func (*Client4) GetDataRetentionPolicy ¶
func (c *Client4) GetDataRetentionPolicy() (*DataRetentionPolicy, *Response)
GetDataRetentionPolicy will get the current server data retention policy details.
func (*Client4) GetDataRetentionRoute ¶
func (*Client4) GetDatabaseRoute ¶
func (*Client4) GetDefaultProfileImage ¶
GetDefaultProfileImage gets the default user's profile image. Must be logged in.
func (*Client4) GetDeletedChannelsForTeam ¶
func (c *Client4) GetDeletedChannelsForTeam(teamId string, page int, perPage int, etag string) ([]*Channel, *Response)
GetDeletedChannelsForTeam returns a list of public channels based on the provided team id string.
func (*Client4) GetElasticsearchRoute ¶
func (*Client4) GetEmojiByName ¶
GetEmojiByName returns a custom emoji based on the name string.
func (*Client4) GetEmojiByNameRoute ¶
func (*Client4) GetEmojiImage ¶
GetEmojiImage returns the emoji image.
func (*Client4) GetEmojiList ¶
GetEmojiList returns a page of custom emoji on the system.
func (*Client4) GetEmojiRoute ¶
func (*Client4) GetEmojisRoute ¶
func (*Client4) GetEnvironmentConfig ¶
GetEnvironmentConfig will retrieve a map mirroring the server configuration where fields are set to true if the corresponding config setting is set through an environment variable. Settings that haven't been set through environment variables will be missing from the map.
func (*Client4) GetFileInfo ¶
GetFileInfo gets all the file info objects.
func (*Client4) GetFileInfosForPost ¶
GetFileInfosForPost gets all the file info objects attached to a post.
func (*Client4) GetFileLink ¶
GetFileLink gets the public link of a file by id.
func (*Client4) GetFilePreview ¶
GetFilePreview gets the bytes for a file by id.
func (*Client4) GetFileRoute ¶
func (*Client4) GetFileThumbnail ¶
GetFileThumbnail gets the bytes for a file by id.
func (*Client4) GetFilesRoute ¶
func (*Client4) GetFlaggedPostsForUser ¶
func (c *Client4) GetFlaggedPostsForUser(userId string, page int, perPage int) (*PostList, *Response)
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)
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)
GetFlaggedPostsForUserInTeam returns flagged posts in team of a user based on user id string.
func (*Client4) GetGroupRoute ¶
func (*Client4) GetGroupSyncable ¶
func (c *Client4) GetGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, etag string) (*GroupSyncable, *Response)
func (*Client4) GetGroupSyncableRoute ¶
func (c *Client4) GetGroupSyncableRoute(groupID, syncableID string, syncableType GroupSyncableType) string
func (*Client4) GetGroupSyncables ¶
func (c *Client4) GetGroupSyncables(groupID string, syncableType GroupSyncableType, etag string) ([]*GroupSyncable, *Response)
func (*Client4) GetGroupSyncablesRoute ¶
func (c *Client4) GetGroupSyncablesRoute(groupID string, syncableType GroupSyncableType) string
func (*Client4) GetGroupsRoute ¶
func (*Client4) GetIncomingWebhook ¶
func (c *Client4) GetIncomingWebhook(hookID string, etag string) (*IncomingWebhook, *Response)
GetIncomingWebhook returns an Incoming webhook given the hook ID.
func (*Client4) GetIncomingWebhookRoute ¶
func (*Client4) GetIncomingWebhooks ¶
func (c *Client4) GetIncomingWebhooks(page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
GetIncomingWebhooks returns a page of incoming webhooks on the system. Page counting starts at 0.
func (*Client4) GetIncomingWebhooksForTeam ¶
func (c *Client4) GetIncomingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*IncomingWebhook, *Response)
GetIncomingWebhooksForTeam returns a page of incoming webhooks for a team. Page counting starts at 0.
func (*Client4) GetIncomingWebhooksRoute ¶
func (*Client4) GetJobs ¶
GetJobs gets all jobs, sorted with the job that was created most recently first.
func (*Client4) GetJobsByType ¶
GetJobsByType gets all jobs of a given type, sorted with the job that was created most recently first.
func (*Client4) GetJobsRoute ¶
func (*Client4) GetLdapGroups ¶
GetLdapGroups retrieves the immediate child groups of the given parent group.
func (*Client4) GetLdapRoute ¶
func (*Client4) GetLicenseRoute ¶
func (*Client4) GetNewUsersInTeam ¶
func (c *Client4) GetNewUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetNewUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetOAuthAccessToken ¶
func (c *Client4) GetOAuthAccessToken(data url.Values) (*AccessResponse, *Response)
GetOAuthAccessToken is a test helper function for the OAuth access token endpoint.
func (*Client4) GetOAuthApp ¶
GetOAuthApp gets a registered OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) GetOAuthAppInfo ¶
GetOAuthAppInfo gets a sanitized version of a registered OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) GetOAuthAppRoute ¶
func (*Client4) GetOAuthApps ¶
GetOAuthApps gets a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) GetOAuthAppsRoute ¶
func (*Client4) GetOldClientConfig ¶
GetOldClientConfig will retrieve the parts of the server configuration needed by the client, formatted in the old format.
func (*Client4) GetOldClientLicense ¶
GetOldClientLicense will retrieve the parts of the server license needed by the client, formatted in the old format.
func (*Client4) GetOpenGraphRoute ¶
func (*Client4) GetOutgoingWebhook ¶
func (c *Client4) GetOutgoingWebhook(hookId string) (*OutgoingWebhook, *Response)
GetOutgoingWebhook outgoing webhooks on the system requested by Hook Id.
func (*Client4) GetOutgoingWebhookRoute ¶
func (*Client4) GetOutgoingWebhooks ¶
func (c *Client4) GetOutgoingWebhooks(page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
GetOutgoingWebhooks returns a page of outgoing webhooks on the system. Page counting starts at 0.
func (*Client4) GetOutgoingWebhooksForChannel ¶
func (c *Client4) GetOutgoingWebhooksForChannel(channelId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
GetOutgoingWebhooksForChannel returns a page of outgoing webhooks for a channel. Page counting starts at 0.
func (*Client4) GetOutgoingWebhooksForTeam ¶
func (c *Client4) GetOutgoingWebhooksForTeam(teamId string, page int, perPage int, etag string) ([]*OutgoingWebhook, *Response)
GetOutgoingWebhooksForTeam returns a page of outgoing webhooks for a team. Page counting starts at 0.
func (*Client4) GetOutgoingWebhooksRoute ¶
func (*Client4) GetPing ¶
GetPing will return ok if the running goRoutines are below the threshold and unhealthy for above.
func (*Client4) GetPinnedPosts ¶
GetPinnedPosts gets a list of pinned posts.
func (*Client4) GetPluginRoute ¶
func (*Client4) GetPluginStatuses ¶
func (c *Client4) GetPluginStatuses() (PluginStatuses, *Response)
GetPluginStatuses will return the plugins installed on any server in the cluster, for reporting to the administrator via the system console. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
func (*Client4) GetPlugins ¶
func (c *Client4) GetPlugins() (*PluginsResponse, *Response)
GetPlugins will return a list of plugin manifests for currently active plugins. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
func (*Client4) GetPluginsRoute ¶
func (*Client4) GetPostRoute ¶
func (*Client4) GetPostThread ¶
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) (*PostList, *Response)
GetPostsAfter gets a page of posts that were posted after the post provided.
func (*Client4) GetPostsBefore ¶
func (c *Client4) GetPostsBefore(channelId, postId string, page, perPage int, etag string) (*PostList, *Response)
GetPostsBefore gets a page of posts that were posted before the post provided.
func (*Client4) GetPostsEphemeralRoute ¶
func (*Client4) GetPostsForChannel ¶
func (c *Client4) GetPostsForChannel(channelId string, page, perPage int, etag string) (*PostList, *Response)
GetPostsForChannel gets a page of posts with an array for ordering for a channel.
func (*Client4) GetPostsRoute ¶
func (*Client4) GetPostsSince ¶
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)
GetPreferenceByCategoryAndName returns the user's preferences from the provided category and preference name string.
func (*Client4) GetPreferences ¶
func (c *Client4) GetPreferences(userId string) (Preferences, *Response)
GetPreferences returns the user's preferences.
func (*Client4) GetPreferencesByCategory ¶
func (c *Client4) GetPreferencesByCategory(userId string, category string) (Preferences, *Response)
GetPreferencesByCategory returns the user's preferences from the provided category string.
func (*Client4) GetPreferencesRoute ¶
func (*Client4) GetProfileImage ¶
GetProfileImage gets user's profile image. Must be logged in.
func (*Client4) GetPublicChannelsByIdsForTeam ¶
func (c *Client4) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) ([]*Channel, *Response)
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)
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) GetReactionsRoute ¶
func (*Client4) GetRecentlyActiveUsersInTeam ¶
func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetRecentlyActiveUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetRedirectLocation ¶
GetRedirectLocation retrieves the value of the 'Location' header of an HTTP response for a given URL.
func (*Client4) GetRedirectLocationRoute ¶
func (*Client4) GetRoleByName ¶
GetRoleByName gets a single role by Name.
func (*Client4) GetRolesByNames ¶
GetRolesByNames returns a list of roles based on the provided role names.
func (*Client4) GetRolesRoute ¶
func (*Client4) GetSamlCertificateStatus ¶
func (c *Client4) GetSamlCertificateStatus() (*SamlCertificateStatus, *Response)
GetSamlCertificateStatus returns metadata for the SAML configuration.
func (*Client4) GetSamlMetadata ¶
GetSamlMetadata returns metadata for the SAML configuration.
func (*Client4) GetSamlRoute ¶
func (*Client4) GetSchemeRoute ¶
func (*Client4) GetSchemes ¶
GetSchemes gets all schemes, sorted with the most recently created first, optionally filtered by scope.
func (*Client4) GetSchemesRoute ¶
func (*Client4) GetSessions ¶
GetSessions returns a list of sessions based on the provided user id string.
func (*Client4) GetSortedEmojiList ¶
GetSortedEmojiList returns a page of custom emoji on the system sorted based on the sort parameter, blank for no sorting and "name" to sort by emoji names.
func (*Client4) GetSupportedTimezone ¶
GetSupportedTimezone returns a page of supported timezones on the system.
func (*Client4) GetSystemRoute ¶
func (*Client4) GetTeamAutoCompleteCommandsRoute ¶
func (*Client4) GetTeamByName ¶
GetTeamByName returns a team based on the provided team name string.
func (*Client4) GetTeamByNameRoute ¶
func (*Client4) GetTeamIcon ¶
GetTeamIcon gets the team icon of the team.
func (*Client4) GetTeamImportRoute ¶
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)
GetTeamMember returns a team member based on the provided team and user id strings.
func (*Client4) GetTeamMemberRoute ¶
func (*Client4) GetTeamMembers ¶
func (c *Client4) GetTeamMembers(teamId string, page int, perPage int, etag string) ([]*TeamMember, *Response)
GetTeamMembers returns team members based on the provided team id string.
func (*Client4) GetTeamMembersByIds ¶
func (c *Client4) GetTeamMembersByIds(teamId string, userIds []string) ([]*TeamMember, *Response)
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)
GetTeamMembersForUser returns the team members for a user.
func (*Client4) GetTeamMembersRoute ¶
func (*Client4) GetTeamRoute ¶
func (*Client4) GetTeamSchemeRoute ¶
func (*Client4) GetTeamStats ¶
GetTeamStats returns a team stats based on the team id string. Must be authenticated.
func (*Client4) GetTeamStatsRoute ¶
func (*Client4) GetTeamUnread ¶
func (c *Client4) GetTeamUnread(teamId, userId string) (*TeamUnread, *Response)
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) GetTeamsForScheme ¶
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) GetTeamsRoute ¶
func (*Client4) GetTeamsUnreadForUser ¶
func (c *Client4) GetTeamsUnreadForUser(userId, teamIdToExclude string) ([]*TeamUnread, *Response)
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. Must be authenticated.
func (*Client4) GetTermsOfService ¶
func (c *Client4) GetTermsOfService(etag string) (*TermsOfService, *Response)
GetTermsOfService fetches the latest terms of service
func (*Client4) GetTermsOfServiceRoute ¶
func (*Client4) GetTestEmailRoute ¶
func (*Client4) GetTestS3Route ¶
func (*Client4) GetTimezonesRoute ¶
func (*Client4) GetTotalUsersStats ¶
func (c *Client4) GetTotalUsersStats(etag string) (*UsersStats, *Response)
GetTotalUsersStats returns a total system user stats. Must be authenticated.
func (*Client4) GetTotalUsersStatsRoute ¶
func (*Client4) GetUserAccessToken ¶
func (c *Client4) GetUserAccessToken(tokenId string) (*UserAccessToken, *Response)
GetUserAccessToken will get a user access tokens' id, description, is_active and the user_id of the user it is for. The actual token will not be returned. Must have the 'read_user_access_token' permission and if getting for another user, must have the 'edit_other_users' permission.
func (*Client4) GetUserAccessTokenRoute ¶
func (*Client4) GetUserAccessTokens ¶
func (c *Client4) GetUserAccessTokens(page int, perPage int) ([]*UserAccessToken, *Response)
GetUserAccessTokens will get a page of access tokens' id, description, is_active and the user_id in the system. The actual token will not be returned. Must have the 'manage_system' permission.
func (*Client4) GetUserAccessTokensForUser ¶
func (c *Client4) GetUserAccessTokensForUser(userId string, page, perPage int) ([]*UserAccessToken, *Response)
GetUserAccessTokensForUser will get a paged list of user access tokens showing id, description and user_id for each. The actual tokens will not be returned. Must have the 'read_user_access_token' permission and if getting for another user, must have the 'edit_other_users' permission.
func (*Client4) GetUserAccessTokensRoute ¶
func (*Client4) GetUserAudits ¶
func (c *Client4) GetUserAudits(userId string, page int, perPage int, etag string) (Audits, *Response)
GetUserAudits returns a list of audit based on the provided user id string.
func (*Client4) GetUserByEmail ¶
GetUserByEmail returns a user based on the provided user email string.
func (*Client4) GetUserByEmailRoute ¶
func (*Client4) GetUserByUsername ¶
GetUserByUsername returns a user based on the provided user name string.
func (*Client4) GetUserByUsernameRoute ¶
func (*Client4) GetUserRoute ¶
func (*Client4) GetUserStatus ¶
GetUserStatus returns a user based on the provided user id string.
func (*Client4) GetUserStatusRoute ¶
func (*Client4) GetUserStatusesRoute ¶
func (*Client4) GetUserTermsOfService ¶
func (c *Client4) GetUserTermsOfService(userId, etag string) (*UserTermsOfService, *Response)
GetUserTermsOfService fetches user's latest terms of service action if the latest action was for acceptance.
func (*Client4) GetUserTermsOfServiceRoute ¶
func (*Client4) GetUsers ¶
GetUsers returns a page of users on the system. Page counting starts at 0.
func (*Client4) GetUsersByIds ¶
GetUsersByIds returns a list of users based on the provided user ids.
func (*Client4) GetUsersByUsernames ¶
GetUsersByUsernames returns a list of users based on the provided usernames.
func (*Client4) GetUsersInChannel ¶
func (c *Client4) GetUsersInChannel(channelId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersInChannel returns a page of users in a channel. Page counting starts at 0.
func (*Client4) GetUsersInChannelByStatus ¶
func (c *Client4) GetUsersInChannelByStatus(channelId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersInChannelByStatus returns a page of users in a channel. Page counting starts at 0. Sorted by Status
func (*Client4) GetUsersInTeam ¶
func (c *Client4) GetUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersInTeam returns a page of users on a team. Page counting starts at 0.
func (*Client4) GetUsersNotInChannel ¶
func (c *Client4) GetUsersNotInChannel(teamId, channelId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersNotInChannel returns a page of users not in a channel. Page counting starts at 0.
func (*Client4) GetUsersNotInTeam ¶
func (c *Client4) GetUsersNotInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response)
GetUsersNotInTeam returns a page of users who are not in a team. Page counting starts at 0.
func (*Client4) GetUsersRoute ¶
func (*Client4) GetUsersStatusesByIds ¶
GetUsersStatusesByIds returns a list of users status based on the provided user ids.
func (*Client4) GetUsersWithoutTeam ¶
GetUsersWithoutTeam returns a page of users on the system that aren't on any teams. Page counting starts at 0.
func (*Client4) GetWebappPlugins ¶
GetWebappPlugins will return a list of plugins that the webapp should download. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
func (*Client4) ImportTeam ¶
func (c *Client4) ImportTeam(data []byte, filesize int, importFrom, filename, teamId string) (map[string]string, *Response)
ImportTeam will import an exported team from other app into a existing team.
func (*Client4) InvalidateCaches ¶
InvalidateCaches will purge the cache and can affect the performance while is cleaning.
func (*Client4) InviteUsersToTeam ¶
InviteUsersToTeam invite users by email to the team.
func (*Client4) LinkGroupSyncable ¶
func (c *Client4) LinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, patch *GroupSyncablePatch) (*GroupSyncable, *Response)
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) ListCommands ¶
ListCommands will retrieve a list of commands available in the team.
func (*Client4) Login ¶
Login authenticates a user by login id, which can be username, email or some sort of SSO identifier based on server configuration, and a password.
func (*Client4) LoginByLdap ¶
LoginByLdap authenticates a user by LDAP id and password.
func (*Client4) LoginWithDevice ¶
func (c *Client4) LoginWithDevice(loginId string, password string, deviceId string) (*User, *Response)
LoginWithDevice authenticates a user by login id (username, email or some sort of SSO identifier based on configuration), password and attaches a device id to the session.
func (*Client4) MockSession ¶
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) (bool, *Response)
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 ¶
func (c *Client4) PatchChannel(channelId string, patch *ChannelPatch) (*Channel, *Response)
PatchChannel partially updates a channel. Any missing fields are not updated.
func (*Client4) PatchGroup ¶
func (c *Client4) PatchGroup(groupID string, patch *GroupPatch) (*Group, *Response)
func (*Client4) PatchGroupSyncable ¶
func (c *Client4) PatchGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType, patch *GroupSyncablePatch) (*GroupSyncable, *Response)
func (*Client4) PatchRole ¶
PatchRole partially updates a role in the system. Any missing fields are not updated.
func (*Client4) PatchScheme ¶
func (c *Client4) PatchScheme(id string, patch *SchemePatch) (*Scheme, *Response)
PatchScheme partially updates a scheme in the system. Any missing fields are not updated.
func (*Client4) PatchUser ¶
PatchUser partially updates a user in the system. Any missing fields are not updated.
func (*Client4) PermanentDeleteTeam ¶
PermanentDeleteTeam deletes the team, should only be used when needed for compliance and the like.
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) PurgeElasticsearchIndexes ¶
PurgeElasticsearchIndexes immediately deletes all Elasticsearch indexes.
func (*Client4) RegenCommandToken ¶
RegenCommandToken will create a new token if the user have the right permissions.
func (*Client4) RegenOutgoingHookToken ¶
func (c *Client4) RegenOutgoingHookToken(hookId string) (*OutgoingWebhook, *Response)
RegenOutgoingHookToken regenerate the outgoing webhook token.
func (*Client4) RegenerateOAuthAppSecret ¶
RegenerateOAuthAppSecret regenerates the client secret for a registered OAuth 2.0 client application.
func (*Client4) RegisterTermsOfServiceAction ¶
func (c *Client4) RegisterTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) (*bool, *Response)
RegisterTermsOfServiceAction saves action performed by a user against a specific terms of service.
func (*Client4) ReloadConfig ¶
ReloadConfig will reload the server configuration.
func (*Client4) RemoveLicenseFile ¶
RemoveLicenseFile will remove the server license it exists. Note that this will disable all enterprise features.
func (*Client4) RemovePlugin ¶
RemovePlugin will disable and delete a plugin. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
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) RemoveUserFromChannel ¶
RemoveUserFromChannel will delete the channel member object for a user, effectively removing the user from a channel.
func (*Client4) ResetPassword ¶
ResetPassword uses a recovery code to update reset a user's password.
func (*Client4) RestoreChannel ¶
RestoreChannel restores a previously deleted channel. Any missing fields are not updated.
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) 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)
SearchAllChannels search in all the channels. Must be a system administrator.
func (*Client4) SearchChannels ¶
func (c *Client4) SearchChannels(teamId string, search *ChannelSearch) ([]*Channel, *Response)
SearchChannels returns the channels on a team matching the provided search term.
func (*Client4) SearchEmoji ¶
func (c *Client4) SearchEmoji(search *EmojiSearch) ([]*Emoji, *Response)
SearchEmoji returns a list of emoji matching some search criteria.
func (*Client4) SearchPosts ¶
SearchPosts returns any posts with matching terms string.
func (*Client4) SearchPostsWithMatches ¶
func (c *Client4) SearchPostsWithMatches(teamId string, terms string, isOrSearch bool) (*PostSearchResults, *Response)
SearchPostsWithMatches returns any posts with matching terms string, including.
func (*Client4) SearchPostsWithParams ¶
func (c *Client4) SearchPostsWithParams(teamId string, params *SearchParameter) (*PostList, *Response)
SearchPostsWithParams returns any posts with matching terms string.
func (*Client4) SearchTeams ¶
func (c *Client4) SearchTeams(search *TeamSearch) ([]*Team, *Response)
SearchTeams returns teams matching the provided search term.
func (*Client4) SearchUserAccessTokens ¶
func (c *Client4) SearchUserAccessTokens(search *UserAccessTokenSearch) ([]*UserAccessToken, *Response)
SearchUserAccessTokens returns user access tokens matching the provided search term.
func (*Client4) SearchUsers ¶
func (c *Client4) SearchUsers(search *UserSearch) ([]*User, *Response)
SearchUsers returns a list of users based on some search criteria.
func (*Client4) SendPasswordResetEmail ¶
SendPasswordResetEmail will send a link for password resetting to a user with the provided email.
func (*Client4) SendVerificationEmail ¶
SendVerificationEmail will send an email to the user with the provided email address, if that user exists. The email will contain a link that can be used to verify the user's email address.
func (*Client4) SetDefaultProfileImage ¶
SetDefaultProfileImage resets the profile image to a default generated one.
func (*Client4) SetOAuthToken ¶
func (*Client4) SetProfileImage ¶
SetProfileImage sets profile image of the user.
func (*Client4) 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)
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)
SwitchAccountType changes a user's login type from one type to another.
func (*Client4) TeamExists ¶
TeamExists returns true or false if the team exist or not.
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) UnlinkGroupSyncable ¶
func (c *Client4) UnlinkGroupSyncable(groupID, syncableID string, syncableType GroupSyncableType) *Response
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) (bool, *Response)
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) (bool, *Response)
UpdateChannelNotifyProps will update the notification properties on a channel for a user.
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) UpdateCommand ¶
UpdateCommand updates a command based on the provided Command struct.
func (*Client4) UpdateConfig ¶
UpdateConfig will update the server configuration.
func (*Client4) UpdateIncomingWebhook ¶
func (c *Client4) UpdateIncomingWebhook(hook *IncomingWebhook) (*IncomingWebhook, *Response)
UpdateIncomingWebhook updates an incoming webhook for a channel.
func (*Client4) UpdateOAuthApp ¶
UpdateOAuthApp updates a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0 service provider.
func (*Client4) UpdateOutgoingWebhook ¶
func (c *Client4) UpdateOutgoingWebhook(hook *OutgoingWebhook) (*OutgoingWebhook, *Response)
UpdateOutgoingWebhook creates an outgoing webhook for a team or channel.
func (*Client4) UpdatePost ¶
UpdatePost updates a post based on the provided post struct.
func (*Client4) UpdatePreferences ¶
func (c *Client4) UpdatePreferences(userId string, preferences *Preferences) (bool, *Response)
UpdatePreferences saves the user's preferences.
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) (bool, *Response)
UpdateTeamMemberSchemeRoles will update the scheme-derived roles on a team for a user.
func (*Client4) UpdateTeamScheme ¶
UpdateTeamScheme will update a team's scheme.
func (*Client4) UpdateUser ¶
UpdateUser updates a user in the system based on the provided user struct.
func (*Client4) UpdateUserActive ¶
UpdateUserActive updates status of a user whether active or not.
func (*Client4) UpdateUserAuth ¶
UpdateUserAuth updates a user AuthData (uthData, authService and password) in the system.
func (*Client4) UpdateUserMfa ¶
UpdateUserMfa activates multi-factor authentication for a user if activate is true and a valid code is provided. If activate is false, then code is not required and multi-factor authentication is disabled for the user.
func (*Client4) UpdateUserPassword ¶
UpdateUserPassword updates a user's password. Must be logged in as the user or be a system administrator.
func (*Client4) UpdateUserRoles ¶
UpdateUserRoles updates a user's roles in the system. A user can have "system_user" and "system_admin" roles.
func (*Client4) UpdateUserStatus ¶
UpdateUserStatus sets a user's status based on the provided user id string.
func (*Client4) UploadBrandImage ¶
UploadBrandImage sets the brand image for the system.
func (*Client4) UploadFile ¶
func (c *Client4) UploadFile(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
UploadFile will upload a file to a channel using a multipart request, to be later attached to a post. This method is functionally equivalent to Client4.UploadFileAsRequestBody.
func (*Client4) UploadFileAsRequestBody ¶
func (c *Client4) UploadFileAsRequestBody(data []byte, channelId string, filename string) (*FileUploadResponse, *Response)
UploadFileAsRequestBody will upload a file to a channel as the body of a request, to be later attached to a post. This method is functionally equivalent to Client4.UploadFile.
func (*Client4) UploadLicenseFile ¶
UploadLicenseFile will add a license file to the system.
func (*Client4) UploadPlugin ¶
UploadPlugin takes an io.Reader stream pointing to the contents of a .tar.gz plugin. WARNING: PLUGINS ARE STILL EXPERIMENTAL. THIS FUNCTION IS SUBJECT TO CHANGE.
func (*Client4) UploadPluginForced ¶
func (*Client4) UploadSamlIdpCertificate ¶
UploadSamlIdpCertificate will upload an IDP certificate for SAML and set the config to use it.
func (*Client4) UploadSamlPrivateCertificate ¶
UploadSamlPrivateCertificate will upload a private key for SAML and set the config to use it.
func (*Client4) UploadSamlPublicCertificate ¶
UploadSamlPublicCertificate will upload a public certificate for SAML and set the config to use it.
func (*Client4) VerifyUserEmail ¶
VerifyUserEmail will verify a user's email using the supplied token.
func (*Client4) ViewChannel ¶
func (c *Client4) ViewChannel(userId string, view *ChannelView) (*ChannelViewResponse, *Response)
ViewChannel performs a view action for a user. Synonymous with switching channels or marking channels as read by a user.
type ClientRequirements ¶
type ClusterDiscovery ¶
type ClusterDiscovery struct { Id string `json:"id"` Type string `json:"type"` ClusterName string `json:"cluster_name"` Hostname string `json:"hostname"` GossipPort int32 `json:"gossip_port"` Port int32 `json:"port"` CreateAt int64 `json:"create_at"` LastPingAt int64 `json:"last_ping_at"` }
func ClusterDiscoveryFromJson ¶
func ClusterDiscoveryFromJson(data io.Reader) *ClusterDiscovery
func FilterClusterDiscovery ¶
func FilterClusterDiscovery(vs []*ClusterDiscovery, f func(*ClusterDiscovery) bool) []*ClusterDiscovery
func (*ClusterDiscovery) AutoFillHostname ¶
func (o *ClusterDiscovery) AutoFillHostname()
func (*ClusterDiscovery) AutoFillIpAddress ¶
func (o *ClusterDiscovery) AutoFillIpAddress()
func (*ClusterDiscovery) IsEqual ¶
func (o *ClusterDiscovery) IsEqual(in *ClusterDiscovery) bool
func (*ClusterDiscovery) IsValid ¶
func (o *ClusterDiscovery) IsValid() *AppError
func (*ClusterDiscovery) PreSave ¶
func (o *ClusterDiscovery) PreSave()
func (*ClusterDiscovery) ToJson ¶
func (o *ClusterDiscovery) ToJson() string
type ClusterInfo ¶
type ClusterInfo struct { Id string `json:"id"` Version string `json:"version"` ConfigHash string `json:"config_hash"` IpAddress string `json:"ipaddress"` Hostname string `json:"hostname"` }
func ClusterInfoFromJson ¶
func ClusterInfoFromJson(data io.Reader) *ClusterInfo
func ClusterInfosFromJson ¶
func ClusterInfosFromJson(data io.Reader) []*ClusterInfo
func (*ClusterInfo) ToJson ¶
func (me *ClusterInfo) ToJson() string
type ClusterMessage ¶
type ClusterMessage struct { Event string `json:"event"` SendType string `json:"-"` WaitForAllToSend bool `json:"-"` Data string `json:"data,omitempty"` Props map[string]string `json:"props,omitempty"` }
func ClusterMessageFromJson ¶
func ClusterMessageFromJson(data io.Reader) *ClusterMessage
func (*ClusterMessage) ToJson ¶
func (o *ClusterMessage) ToJson() string
type ClusterSettings ¶
type ClusterSettings struct { Enable *bool ClusterName *string OverrideHostname *string UseIpAddress *bool UseExperimentalGossip *bool ReadOnlyConfig *bool GossipPort *int StreamingPort *int MaxIdleConns *int MaxIdleConnsPerHost *int IdleConnTimeoutMilliseconds *int }
func (*ClusterSettings) SetDefaults ¶
func (s *ClusterSettings) SetDefaults()
type ClusterStats ¶
type ClusterStats struct { Id string `json:"id"` TotalWebsocketConnections int `json:"total_websocket_connections"` TotalReadDbConnections int `json:"total_read_db_connections"` TotalMasterDbConnections int `json:"total_master_db_connections"` }
func ClusterStatsFromJson ¶
func ClusterStatsFromJson(data io.Reader) *ClusterStats
func (*ClusterStats) ToJson ¶
func (me *ClusterStats) ToJson() string
type Command ¶
type Command struct { Id string `json:"id"` Token string `json:"token"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` CreatorId string `json:"creator_id"` TeamId string `json:"team_id"` Trigger string `json:"trigger"` Method string `json:"method"` Username string `json:"username"` IconURL string `json:"icon_url"` AutoComplete bool `json:"auto_complete"` AutoCompleteDesc string `json:"auto_complete_desc"` AutoCompleteHint string `json:"auto_complete_hint"` DisplayName string `json:"display_name"` Description string `json:"description"` URL string `json:"url"` }
func CommandFromJson ¶
func CommandListFromJson ¶
type CommandArgs ¶
type CommandArgs struct { UserId string `json:"user_id"` ChannelId string `json:"channel_id"` TeamId string `json:"team_id"` RootId string `json:"root_id"` ParentId string `json:"parent_id"` TriggerId string `json:"trigger_id,omitempty"` Command string `json:"command"` SiteURL string `json:"-"` T goi18n.TranslateFunc `json:"-"` Session Session `json:"-"` }
func CommandArgsFromJson ¶
func CommandArgsFromJson(data io.Reader) *CommandArgs
func (*CommandArgs) ToJson ¶
func (o *CommandArgs) ToJson() string
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"` 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
func (*CommandResponse) ToJson ¶
func (o *CommandResponse) ToJson() string
type CommandWebhook ¶
type CommandWebhook struct { Id string CreateAt int64 CommandId string UserId string ChannelId string RootId string ParentId string UseCount int }
func (*CommandWebhook) IsValid ¶
func (o *CommandWebhook) IsValid() *AppError
func (*CommandWebhook) PreSave ¶
func (o *CommandWebhook) PreSave()
type Compliance ¶
type Compliance struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UserId string `json:"user_id"` Status string `json:"status"` Count int `json:"count"` Desc string `json:"desc"` Type string `json:"type"` StartAt int64 `json:"start_at"` EndAt int64 `json:"end_at"` Keywords string `json:"keywords"` Emails string `json:"emails"` }
func ComplianceFromJson ¶
func ComplianceFromJson(data io.Reader) *Compliance
func (*Compliance) IsValid ¶
func (me *Compliance) IsValid() *AppError
func (*Compliance) JobName ¶
func (me *Compliance) JobName() string
func (*Compliance) PreSave ¶
func (me *Compliance) PreSave()
func (*Compliance) ToJson ¶
func (o *Compliance) ToJson() string
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 PostParentId string PostOriginalId string PostMessage string PostType string PostProps string PostFileIds string }
func (*CompliancePost) Row ¶
func (me *CompliancePost) Row() []string
type ComplianceSettings ¶
func (*ComplianceSettings) SetDefaults ¶
func (s *ComplianceSettings) SetDefaults()
type Compliances ¶
type Compliances []Compliance
func CompliancesFromJson ¶
func CompliancesFromJson(data io.Reader) Compliances
func (Compliances) ToJson ¶
func (o Compliances) ToJson() string
type Config ¶
type Config struct { ServiceSettings ServiceSettings TeamSettings TeamSettings ClientRequirements ClientRequirements SqlSettings SqlSettings LogSettings LogSettings PasswordSettings PasswordSettings FileSettings FileSettings EmailSettings EmailSettings RateLimitSettings RateLimitSettings PrivacySettings PrivacySettings SupportSettings SupportSettings AnnouncementSettings AnnouncementSettings ThemeSettings ThemeSettings GitLabSettings SSOSettings GoogleSettings SSOSettings Office365Settings SSOSettings LdapSettings LdapSettings ComplianceSettings ComplianceSettings LocalizationSettings LocalizationSettings SamlSettings SamlSettings NativeAppSettings NativeAppSettings ClusterSettings ClusterSettings MetricsSettings MetricsSettings ExperimentalSettings ExperimentalSettings AnalyticsSettings AnalyticsSettings ElasticsearchSettings ElasticsearchSettings DataRetentionSettings DataRetentionSettings MessageExportSettings MessageExportSettings JobSettings JobSettings PluginSettings PluginSettings DisplaySettings DisplaySettings TimezoneSettings TimezoneSettings ImageProxySettings ImageProxySettings }
func ConfigFromJson ¶
func (*Config) GetSSOService ¶
func (o *Config) GetSSOService(service string) *SSOSettings
func (*Config) GetSanitizeOptions ¶ added in v1.3.0
func (*Config) SetDefaults ¶ added in v1.1.0
func (o *Config) SetDefaults()
type ConfigFunc ¶
type ConfigFunc func() *Config
type DataRetentionPolicy ¶
type DataRetentionPolicy struct { MessageDeletionEnabled bool `json:"message_deletion_enabled"` FileDeletionEnabled bool `json:"file_deletion_enabled"` MessageRetentionCutoff int64 `json:"message_retention_cutoff"` FileRetentionCutoff int64 `json:"file_retention_cutoff"` }
func DataRetentionPolicyFromJson ¶
func DataRetentionPolicyFromJson(data io.Reader) *DataRetentionPolicy
func (*DataRetentionPolicy) ToJson ¶
func (me *DataRetentionPolicy) ToJson() string
type DataRetentionSettings ¶
type DataRetentionSettings struct { EnableMessageDeletion *bool EnableFileDeletion *bool MessageRetentionDays *int FileRetentionDays *int DeletionJobStartTime *string }
func (*DataRetentionSettings) SetDefaults ¶
func (s *DataRetentionSettings) SetDefaults()
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 DisplaySettings ¶
func (*DisplaySettings) SetDefaults ¶
func (s *DisplaySettings) SetDefaults()
type DoPostActionRequest ¶
type DoPostActionRequest struct {
SelectedOption string `json:"selected_option"`
}
func DoPostActionRequestFromJson ¶
func DoPostActionRequestFromJson(data io.Reader) *DoPostActionRequest
type ElasticsearchSettings ¶
type ElasticsearchSettings struct { ConnectionUrl *string Username *string Password *string EnableIndexing *bool EnableSearching *bool Sniff *bool PostIndexReplicas *int PostIndexShards *int AggregatePostsAfterDays *int PostsAggregatorJobStartTime *string IndexPrefix *string LiveIndexingBatchSize *int BulkIndexingTimeWindowSeconds *int RequestTimeoutSeconds *int }
func (*ElasticsearchSettings) SetDefaults ¶
func (s *ElasticsearchSettings) SetDefaults()
type EmailSettings ¶
type EmailSettings struct { EnableSignUpWithEmail bool EnableSignInWithEmail *bool EnableSignInWithUsername *bool SendEmailNotifications bool UseChannelInEmailNotifications *bool RequireEmailVerification bool FeedbackName string FeedbackEmail string FeedbackOrganization *string EnableSMTPAuth *bool SMTPUsername string SMTPPassword string SMTPServer string SMTPPort string ConnectionSecurity string InviteSalt string SendPushNotifications *bool PushNotificationServer *string PushNotificationContents *string EnableEmailBatching *bool EmailBatchingBufferSize *int EmailBatchingInterval *int EnablePreviewModeBanner *bool SkipServerCertificateVerification *bool EmailNotificationContentsType *string LoginButtonColor *string LoginButtonBorderColor *string LoginButtonTextColor *string }
func (*EmailSettings) SetDefaults ¶
func (s *EmailSettings) SetDefaults()
type Emoji ¶
type Emoji struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` DeleteAt int64 `json:"delete_at"` CreatorId string `json:"creator_id"` Name string `json:"name"` }
func EmojiFromJson ¶
func EmojiListFromJson ¶
type EmojiSearch ¶
func EmojiSearchFromJson ¶
func EmojiSearchFromJson(data io.Reader) *EmojiSearch
func (*EmojiSearch) ToJson ¶
func (es *EmojiSearch) ToJson() string
type ExperimentalSettings ¶
type ExperimentalSettings struct { ClientSideCertEnable *bool ClientSideCertCheck *string DisablePostMetadata *bool LinkMetadataTimeoutMilliseconds *int64 }
func (*ExperimentalSettings) SetDefaults ¶
func (s *ExperimentalSettings) SetDefaults()
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"` 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"` // 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 FileInfo ¶ added in v1.4.0
type FileInfo struct { Id string `json:"id"` CreatorId string `json:"user_id"` PostId string `json:"post_id,omitempty"` 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"` }
func FileInfoFromJson ¶ added in v1.4.0
func FileInfosFromJson ¶
type FileSettings ¶
type FileSettings struct { EnableFileAttachments *bool EnableMobileUpload *bool EnableMobileDownload *bool MaxFileSize *int64 DriverName *string Directory string EnablePublicLink bool PublicLinkSalt *string InitialFont string AmazonS3AccessKeyId string AmazonS3SecretAccessKey string AmazonS3Bucket string AmazonS3Region string AmazonS3Endpoint string AmazonS3SSL *bool AmazonS3SignV2 *bool AmazonS3SSE *bool AmazonS3Trace *bool }
func (*FileSettings) SetDefaults ¶
func (s *FileSettings) SetDefaults()
type FileUploadResponse ¶
type FileUploadResponse struct { FileInfos []*FileInfo `json:"file_infos"` ClientIds []string `json:"client_ids"` }
func FileUploadResponseFromJson ¶
func FileUploadResponseFromJson(data io.Reader) *FileUploadResponse
func (*FileUploadResponse) ToJson ¶
func (o *FileUploadResponse) ToJson() string
type GlobalRelayMessageExportSettings ¶
type GlobalRelayMessageExportSettings struct { CustomerType *string // must be either A9 or A10, dictates SMTP server url SmtpUsername *string SmtpPassword *string EmailAddress *string // the address to send messages to }
func (*GlobalRelayMessageExportSettings) SetDefaults ¶
func (s *GlobalRelayMessageExportSettings) SetDefaults()
type Group ¶
type Group struct { Id string `json:"id"` Name string `json:"name"` 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"` }
func GroupFromJson ¶
func GroupsFromJson ¶
func (*Group) IsValidForCreate ¶
func (*Group) IsValidForUpdate ¶
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 GroupPatch struct { Name *string `json:"name"` DisplayName *string `json:"display_name"` Description *string `json:"description"` }
func GroupPatchFromJson ¶
func GroupPatchFromJson(data io.Reader) *GroupPatch
type GroupSource ¶
type GroupSource string
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:"-"` CanLeave bool `db:"-" json:"can_leave"` AutoAdd bool `json:"auto_add"` 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 GroupSyncableFromJson ¶
func GroupSyncableFromJson(data io.Reader) *GroupSyncable
func GroupSyncablesFromJson ¶
func GroupSyncablesFromJson(data io.Reader) []*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 ImageProxySettings ¶
type ImageProxySettings struct { Enable *bool ImageProxyType *string RemoteImageProxyURL *string RemoteImageProxyOptions *string }
func (*ImageProxySettings) SetDefaults ¶
func (ips *ImageProxySettings) SetDefaults(ss ServiceSettings)
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 IncomingWebhookFromJson ¶
func IncomingWebhookFromJson(data io.Reader) *IncomingWebhook
func IncomingWebhookListFromJson ¶
func IncomingWebhookListFromJson(data io.Reader) []*IncomingWebhook
func (*IncomingWebhook) IsValid ¶
func (o *IncomingWebhook) IsValid() *AppError
func (*IncomingWebhook) PreSave ¶
func (o *IncomingWebhook) PreSave()
func (*IncomingWebhook) PreUpdate ¶
func (o *IncomingWebhook) PreUpdate()
func (*IncomingWebhook) ToJson ¶
func (o *IncomingWebhook) ToJson() string
type IncomingWebhookRequest ¶ added in v1.2.1
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"` }
func (*IncomingWebhookRequest) ToJson ¶
func (o *IncomingWebhookRequest) ToJson() string
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"` }
func InitialLoadFromJson ¶
func InitialLoadFromJson(data io.Reader) *InitialLoad
func (*InitialLoad) ToJson ¶
func (me *InitialLoad) ToJson() string
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 map[string]string `json:"data"` }
func JobFromJson ¶
func JobsFromJson ¶
func (*Job) DataToJson ¶
type JobSettings ¶
func (*JobSettings) SetDefaults ¶
func (s *JobSettings) SetDefaults()
type LdapSettings ¶ added in v1.4.0
type LdapSettings struct { // Basic Enable *bool EnableSync *bool LdapServer *string LdapPort *int ConnectionSecurity *string BaseDN *string BindUsername *string BindPassword *string // Filtering UserFilter *string GroupFilter *string // Group Mapping GroupDisplayNameAttribute *string GroupIdAttribute *string // User Mapping FirstNameAttribute *string LastNameAttribute *string EmailAttribute *string UsernameAttribute *string NicknameAttribute *string IdAttribute *string PositionAttribute *string LoginIdAttribute *string // Synchronization SyncIntervalMinutes *int // Advanced SkipCertificateVerification *bool QueryTimeout *int MaxPageSize *int // Customization LoginFieldName *string LoginButtonColor *string LoginButtonBorderColor *string LoginButtonTextColor *string }
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"` }
func LicenseFromJson ¶
func NewTestLicense ¶
NewTestLicense returns a license that expires in the future and has the given features.
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
const ( LINK_METADATA_TYPE_IMAGE LinkMetadataType = "image" LINK_METADATA_TYPE_NONE LinkMetadataType = "none" LINK_METADATA_TYPE_OPENGRAPH LinkMetadataType = "opengraph" )
type LocalizationSettings ¶
type LocalizationSettings struct { DefaultServerLocale *string DefaultClientLocale *string AvailableLocales *string }
func (*LocalizationSettings) SetDefaults ¶
func (s *LocalizationSettings) SetDefaults()
type LogSettings ¶
type LogSettings struct { EnableConsole bool ConsoleLevel string ConsoleJson *bool EnableFile bool FileLevel string FileJson *bool FileLocation string EnableWebhookDebugging bool EnableDiagnostics *bool }
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,omitempty" yaml:"name,omitempty"` // A description of what your plugin is and does. Description string `json:"description,omitempty" yaml:"description,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"` // Backend is a deprecated flag for defining the server-side portion of your plugin. Going forward, use Server instead. Backend *ManifestServer `json:"backend,omitempty" yaml:"backend,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"` }
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.yaml:
id: com.mycompany.myplugin name: My Plugin description: This is my plugin. It does stuff. server: executable: myplugin settings_schema: settings: - key: enable_extra_thing type: bool display_name: Enable Extra Thing help_text: When true, an extra thing will be enabled! default: false
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 ManifestFromJson ¶
func ManifestListFromJson ¶
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.
func (*Manifest) MeetMinServerVersion ¶
type ManifestExecutables ¶
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"` }
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 *ManifestExecutables `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 MessageExport ¶
type MessageExport struct { TeamId *string TeamName *string TeamDisplayName *string ChannelId *string ChannelName *string ChannelDisplayName *string ChannelType *string UserId *string UserEmail *string Username *string PostId *string PostCreateAt *int64 PostMessage *string PostType *string PostRootId *string PostOriginalId *string PostFileIds StringArray }
type MessageExportSettings ¶
type MessageExportSettings struct { EnableExport *bool ExportFormat *string DailyRunTime *string ExportFromTimestamp *int64 BatchSize *int // formatter-specific settings - these are only expected to be non-nil if ExportFormat is set to the associated format GlobalRelaySettings *GlobalRelayMessageExportSettings }
func (*MessageExportSettings) SetDefaults ¶
func (s *MessageExportSettings) SetDefaults()
type MetricsSettings ¶
func (*MetricsSettings) SetDefaults ¶
func (s *MetricsSettings) SetDefaults()
type MfaSecret ¶
func MfaSecretFromJson ¶
type NativeAppSettings ¶
type NativeAppSettings struct { AppDownloadLink *string AndroidAppDownloadLink *string IosAppDownloadLink *string }
func (*NativeAppSettings) SetDefaults ¶
func (s *NativeAppSettings) 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 OAuthAppFromJson ¶
func OAuthAppListFromJson ¶
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.
func (*OAuthApp) PreUpdate ¶
func (a *OAuthApp) PreUpdate()
PreUpdate should be run before updating the app in the db.
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 OutgoingWebhook ¶ added in v1.2.1
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 OutgoingWebhookFromJson ¶ added in v1.2.1
func OutgoingWebhookFromJson(data io.Reader) *OutgoingWebhook
func OutgoingWebhookListFromJson ¶ added in v1.2.1
func OutgoingWebhookListFromJson(data io.Reader) []*OutgoingWebhook
func (*OutgoingWebhook) GetTriggerWord ¶
func (o *OutgoingWebhook) GetTriggerWord(word string, isExactMatch bool) (triggerWord string)
func (*OutgoingWebhook) IsValid ¶ added in v1.2.1
func (o *OutgoingWebhook) IsValid() *AppError
func (*OutgoingWebhook) PreSave ¶ added in v1.2.1
func (o *OutgoingWebhook) PreSave()
func (*OutgoingWebhook) PreUpdate ¶ added in v1.2.1
func (o *OutgoingWebhook) PreUpdate()
func (*OutgoingWebhook) ToJson ¶ added in v1.2.1
func (o *OutgoingWebhook) ToJson() string
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
func (*OutgoingWebhookPayload) ToJSON ¶
func (o *OutgoingWebhookPayload) ToJSON() 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"` }
func OutgoingWebhookResponseFromJson ¶
func OutgoingWebhookResponseFromJson(data io.Reader) (*OutgoingWebhookResponse, error)
func (*OutgoingWebhookResponse) ToJson ¶
func (o *OutgoingWebhookResponse) ToJson() string
type PasswordSettings ¶
type PasswordSettings struct { MinimumLength *int Lowercase *bool Number *bool Uppercase *bool Symbol *bool }
func (*PasswordSettings) SetDefaults ¶
func (s *PasswordSettings) SetDefaults()
type Permission ¶
type Permission struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Scope string `json:"scope"` }
var PERMISSION_ADD_REACTION *Permission
var PERMISSION_ADD_USER_TO_TEAM *Permission
var PERMISSION_ASSIGN_SYSTEM_ADMIN_ROLE *Permission
var PERMISSION_CREATE_DIRECT_CHANNEL *Permission
var PERMISSION_CREATE_GROUP_CHANNEL *Permission
var PERMISSION_CREATE_POST *Permission
var PERMISSION_CREATE_POST_EPHEMERAL *Permission
var PERMISSION_CREATE_POST_PUBLIC *Permission
var PERMISSION_CREATE_PRIVATE_CHANNEL *Permission
var PERMISSION_CREATE_PUBLIC_CHANNEL *Permission
var PERMISSION_CREATE_TEAM *Permission
var PERMISSION_CREATE_USER_ACCESS_TOKEN *Permission
var PERMISSION_DELETE_OTHERS_POSTS *Permission
var PERMISSION_DELETE_POST *Permission
var PERMISSION_DELETE_PRIVATE_CHANNEL *Permission
var PERMISSION_DELETE_PUBLIC_CHANNEL *Permission
var PERMISSION_EDIT_OTHERS_POSTS *Permission
var PERMISSION_EDIT_OTHER_USERS *Permission
var PERMISSION_EDIT_POST *Permission
var PERMISSION_GET_PUBLIC_LINK *Permission
var PERMISSION_IMPORT_TEAM *Permission
var PERMISSION_INVITE_USER *Permission
var PERMISSION_JOIN_PUBLIC_CHANNELS *Permission
var PERMISSION_LIST_TEAM_CHANNELS *Permission
var PERMISSION_LIST_USERS_WITHOUT_TEAM *Permission
var PERMISSION_MANAGE_CHANNEL_ROLES *Permission
var PERMISSION_MANAGE_EMOJIS *Permission
var PERMISSION_MANAGE_JOBS *Permission
var PERMISSION_MANAGE_OAUTH *Permission
var PERMISSION_MANAGE_OTHERS_EMOJIS *Permission
var PERMISSION_MANAGE_OTHERS_SLASH_COMMANDS *Permission
var PERMISSION_MANAGE_OTHERS_WEBHOOKS *Permission
var PERMISSION_MANAGE_PRIVATE_CHANNEL_MEMBERS *Permission
var PERMISSION_MANAGE_PRIVATE_CHANNEL_PROPERTIES *Permission
var PERMISSION_MANAGE_PUBLIC_CHANNEL_MEMBERS *Permission
var PERMISSION_MANAGE_PUBLIC_CHANNEL_PROPERTIES *Permission
var PERMISSION_MANAGE_ROLES *Permission
var PERMISSION_MANAGE_SLASH_COMMANDS *Permission
var PERMISSION_MANAGE_SYSTEM *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 PERMISSION_MANAGE_SYSTEM_WIDE_OAUTH *Permission
var PERMISSION_MANAGE_TEAM *Permission
var PERMISSION_MANAGE_TEAM_ROLES *Permission
var PERMISSION_MANAGE_WEBHOOKS *Permission
var PERMISSION_PERMANENT_DELETE_USER *Permission
var PERMISSION_READ_CHANNEL *Permission
var PERMISSION_READ_PUBLIC_CHANNEL *Permission
var PERMISSION_READ_USER_ACCESS_TOKEN *Permission
var PERMISSION_REMOVE_OTHERS_REACTIONS *Permission
var PERMISSION_REMOVE_REACTION *Permission
var PERMISSION_REMOVE_USER_FROM_TEAM *Permission
var PERMISSION_REVOKE_USER_ACCESS_TOKEN *Permission
var PERMISSION_UPLOAD_FILE *Permission
var PERMISSION_USE_SLASH_COMMANDS *Permission
var PERMISSION_VIEW_TEAM *Permission
type PluginInfo ¶
type PluginInfo struct {
Manifest
}
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. // // "username" will result in a text setting that will autocomplete to a username. Type string `json:"type" yaml:"type"` // The help text to display to the user. 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 "text", "generated" 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 PluginSettings ¶
type PluginSettings struct { Enable *bool EnableUploads *bool Directory *string ClientDirectory *string Plugins map[string]map[string]interface{} PluginStates map[string]*PluginState }
func (*PluginSettings) SetDefaults ¶
func (s *PluginSettings) SetDefaults()
type PluginSettingsSchema ¶
type PluginSettingsSchema struct { // Optional text to display above the settings. 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
func PluginStatusesFromJson ¶
func PluginStatusesFromJson(data io.Reader) PluginStatuses
func (*PluginStatuses) ToJson ¶
func (m *PluginStatuses) ToJson() string
type PluginsResponse ¶
type PluginsResponse struct { Active []*PluginInfo `json:"active"` Inactive []*PluginInfo `json:"inactive"` }
func PluginsResponseFromJson ¶
func PluginsResponseFromJson(data io.Reader) *PluginsResponse
func (*PluginsResponse) ToJson ¶
func (m *PluginsResponse) ToJson() string
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"` ParentId string `json:"parent_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"` Filenames StringArray `json:"filenames,omitempty"` // 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"` // Transient data populated before sending a post to the client Metadata *PostMetadata `json:"metadata,omitempty" db:"-"` }
func PostFromJson ¶
func (*Post) Attachments ¶
func (o *Post) Attachments() []*SlackAttachment
func (*Post) ChannelMentions ¶
func (*Post) GenerateActionIds ¶
func (o *Post) GenerateActionIds()
func (*Post) GetAction ¶
func (o *Post) GetAction(id string) *PostAction
func (*Post) IsSystemMessage ¶ added in v1.3.0
func (*Post) MakeNonNil ¶
func (o *Post) MakeNonNil()
func (*Post) SanitizeProps ¶
func (o *Post) SanitizeProps()
func (*Post) StripActionIntegrations ¶
func (o *Post) StripActionIntegrations()
func (*Post) ToUnsanitizedJson ¶
type PostAction ¶
type PostAction struct { Id string `json:"id"` Name string `json:"name"` Type string `json:"type"` DataSource string `json:"data_source"` Options []*PostActionOptions `json:"options"` Integration *PostActionIntegration `json:"integration,omitempty"` }
type PostActionAPIResponse ¶
type PostActionIntegration ¶
type PostActionIntegrationRequest ¶
type PostActionIntegrationRequest struct { UserId string `json:"user_id"` ChannelId string `json:"channel_id"` TeamId string `json:"team_id"` 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 PostActionIntegrationRequestFromJson ¶
func PostActionIntegrationRequestFromJson(data io.Reader) *PostActionIntegrationRequest
func (*PostActionIntegrationRequest) GenerateTriggerId ¶
func (*PostActionIntegrationRequest) ToJson ¶
func (r *PostActionIntegrationRequest) ToJson() []byte
type PostActionIntegrationResponse ¶
type PostActionIntegrationResponse struct { Update *Post `json:"update"` EphemeralText string `json:"ephemeral_text"` }
func PostActionIntegrationResponseFromJson ¶
func PostActionIntegrationResponseFromJson(data io.Reader) *PostActionIntegrationResponse
func (*PostActionIntegrationResponse) ToJson ¶
func (r *PostActionIntegrationResponse) ToJson() []byte
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 ( POST_EMBED_IMAGE PostEmbedType = "image" POST_EMBED_MESSAGE_ATTACHMENT PostEmbedType = "message_attachment" POST_EMBED_OPENGRAPH PostEmbedType = "opengraph" )
type PostEphemeral ¶
func (*PostEphemeral) ToUnsanitizedJson ¶
func (o *PostEphemeral) ToUnsanitizedJson() string
type PostForExport ¶
type PostForIndexing ¶
type PostList ¶
func NewPostList ¶
func NewPostList() *PostList
func PostListFromJson ¶
func (*PostList) IsChannelId ¶
func (*PostList) MakeNonNil ¶
func (o *PostList) MakeNonNil()
func (*PostList) SortByCreateAt ¶
func (o *PostList) SortByCreateAt()
func (*PostList) StripActionIntegrations ¶
func (o *PostList) StripActionIntegrations()
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 diemsnions. // 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 PostPatchFromJson ¶
type PostSearchMatches ¶
type PostSearchResults ¶
type PostSearchResults struct { *PostList Matches PostSearchMatches `json:"matches"` }
func MakePostSearchResults ¶
func MakePostSearchResults(posts *PostList, matches PostSearchMatches) *PostSearchResults
func PostSearchResultsFromJson ¶
func PostSearchResultsFromJson(data io.Reader) *PostSearchResults
func (*PostSearchResults) ToJson ¶
func (o *PostSearchResults) ToJson() string
type Preference ¶ added in v1.2.1
type Preference struct { UserId string `json:"user_id"` Category string `json:"category"` Name string `json:"name"` Value string `json:"value"` }
func PreferenceFromJson ¶ added in v1.2.1
func PreferenceFromJson(data io.Reader) *Preference
func (*Preference) IsValid ¶ added in v1.2.1
func (o *Preference) IsValid() *AppError
func (*Preference) PreUpdate ¶
func (o *Preference) PreUpdate()
func (*Preference) ToJson ¶ added in v1.2.1
func (o *Preference) ToJson() string
type Preferences ¶ added in v1.2.1
type Preferences []Preference
func PreferencesFromJson ¶ added in v1.2.1
func PreferencesFromJson(data io.Reader) (Preferences, error)
func (*Preferences) ToJson ¶ added in v1.2.1
func (o *Preferences) ToJson() string
type PrivacySettings ¶
type PushNotification ¶ added in v1.3.0
type PushNotification struct { Platform string `json:"platform"` ServerId string `json:"server_id"` DeviceId string `json:"device_id"` Category string `json:"category"` Sound string `json:"sound"` Message string `json:"message"` Badge int `json:"badge"` ContentAvailable int `json:"cont_ava"` TeamId string `json:"team_id"` ChannelId string `json:"channel_id"` PostId string `json:"post_id"` RootId string `json:"root_id"` ChannelName string `json:"channel_name"` Type string `json:"type"` SenderId string `json:"sender_id"` OverrideUsername string `json:"override_username"` OverrideIconUrl string `json:"override_icon_url"` FromWebhook string `json:"from_webhook"` Version string `json:"version"` }
func PushNotificationFromJson ¶ added in v1.3.0
func PushNotificationFromJson(data io.Reader) *PushNotification
func (*PushNotification) SetDeviceIdAndPlatform ¶
func (me *PushNotification) SetDeviceIdAndPlatform(deviceId string)
func (*PushNotification) ToJson ¶ added in v1.3.0
func (me *PushNotification) ToJson() string
type PushResponse ¶
func NewErrorPushResponse ¶
func NewErrorPushResponse(message string) PushResponse
func NewOkPushResponse ¶
func NewOkPushResponse() PushResponse
func NewRemovePushResponse ¶
func NewRemovePushResponse() PushResponse
func PushResponseFromJson ¶
func PushResponseFromJson(data io.Reader) PushResponse
func (*PushResponse) ToJson ¶
func (me *PushResponse) ToJson() string
type RateLimitSettings ¶
type RateLimitSettings struct { Enable *bool PerSec *int MaxBurst *int MemoryStoreSize *int VaryByRemoteAddr *bool VaryByUser *bool VaryByHeader string }
func (*RateLimitSettings) SetDefaults ¶
func (s *RateLimitSettings) SetDefaults()
type Reaction ¶
type Reaction struct { UserId string `json:"user_id"` PostId string `json:"post_id"` EmojiName string `json:"emoji_name"` CreateAt int64 `json:"create_at"` }
func ReactionFromJson ¶
func ReactionsFromJson ¶
type ReplyForExport ¶
type Response ¶
type Response struct { StatusCode int Error *AppError RequestId string Etag string ServerVersion string Header http.Header }
func BuildResponse ¶
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 RoleFromJson ¶
func RoleListFromJson ¶
func (*Role) IsValidWithoutId ¶
type RolePatch ¶
type RolePatch struct {
Permissions *[]string `json:"permissions"`
}
func RolePatchFromJson ¶
type SSOSettings ¶
type SamlAuthRequest ¶
type SamlCertificateStatus ¶
type SamlCertificateStatus struct { IdpCertificateFile bool `json:"idp_certificate_file"` PrivateKeyFile bool `json:"private_key_file"` PublicCertificateFile bool `json:"public_certificate_file"` }
func SamlCertificateStatusFromJson ¶
func SamlCertificateStatusFromJson(data io.Reader) *SamlCertificateStatus
func (*SamlCertificateStatus) ToJson ¶
func (s *SamlCertificateStatus) ToJson() string
type SamlSettings ¶
type SamlSettings struct { // Basic Enable *bool EnableSyncWithLdap *bool EnableSyncWithLdapIncludeAuth *bool Verify *bool Encrypt *bool IdpUrl *string IdpDescriptorUrl *string AssertionConsumerServiceURL *string ScopingIDPProviderId *string ScopingIDPName *string IdpCertificateFile *string PublicCertificateFile *string PrivateKeyFile *string // User Mapping IdAttribute *string FirstNameAttribute *string LastNameAttribute *string EmailAttribute *string UsernameAttribute *string NicknameAttribute *string LocaleAttribute *string PositionAttribute *string LoginButtonText *string LoginButtonColor *string LoginButtonBorderColor *string LoginButtonTextColor *string }
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 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"` }
func SchemeFromJson ¶
func SchemesFromJson ¶
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"` ChannelAdmin string `json:"default_channel_admin_role"` ChannelUser string `json:"default_channel_user_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"`
}
func (*SchemeIDPatch) ToJson ¶
func (p *SchemeIDPatch) ToJson() string
type SchemePatch ¶
type SchemePatch struct { Name *string `json:"name"` DisplayName *string `json:"display_name"` Description *string `json:"description"` }
func SchemePatchFromJson ¶
func SchemePatchFromJson(data io.Reader) *SchemePatch
func (*SchemePatch) ToJson ¶
func (patch *SchemePatch) ToJson() string
type SchemeRoles ¶
type SchemeRoles struct { SchemeAdmin bool `json:"scheme_admin"` SchemeUser bool `json:"scheme_user"` }
func SchemeRolesFromJson ¶
func SchemeRolesFromJson(data io.Reader) *SchemeRoles
func (*SchemeRoles) ToJson ¶
func (schemeRoles *SchemeRoles) ToJson() string
type SearchParameter ¶
type SearchParameter struct { Terms *string `json:"terms"` IsOrSearch *bool `json:"is_or_search"` TimeZoneOffset *int `json:"time_zone_offset"` Page *int `json:"page"` PerPage *int `json:"per_page"` IncludeDeletedChannels *bool `json:"include_deleted_channels"` }
func SearchParameterFromJson ¶
func SearchParameterFromJson(data io.Reader) *SearchParameter
func (*SearchParameter) SearchParameterToJson ¶
func (o *SearchParameter) SearchParameterToJson() string
type SearchParams ¶ added in v1.2.1
type SearchParams struct { Terms string IsHashtag bool InChannels []string FromUsers []string AfterDate string BeforeDate string OnDate string OrTerms bool IncludeDeletedChannels bool TimeZoneOffset int }
func ParseSearchParams ¶ added in v1.2.1
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) 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 ¶ added in v1.1.0
type SecurityBulletin struct { Id string `json:"id"` AppliesToVersion string `json:"applies_to_version"` }
func SecurityBulletinFromJson ¶ added in v1.1.0
func SecurityBulletinFromJson(data io.Reader) *SecurityBulletin
func (*SecurityBulletin) ToJson ¶ added in v1.1.0
func (me *SecurityBulletin) ToJson() string
type SecurityBulletins ¶ added in v1.1.0
type SecurityBulletins []SecurityBulletin
func SecurityBulletinsFromJson ¶ added in v1.1.0
func SecurityBulletinsFromJson(data io.Reader) SecurityBulletins
func (SecurityBulletins) ToJson ¶ added in v1.1.0
func (me SecurityBulletins) ToJson() string
type ServiceSettings ¶
type ServiceSettings struct { SiteURL *string WebsocketURL *string LicenseFileLocation *string ListenAddress *string ConnectionSecurity *string TLSCertFile *string TLSKeyFile *string TLSMinVer *string TLSStrictTransport *bool TLSStrictTransportMaxAge *int64 TLSOverwriteCiphers []string UseLetsEncrypt *bool LetsEncryptCertificateCacheFile *string Forward80To443 *bool ReadTimeout *int WriteTimeout *int MaximumLoginAttempts *int GoroutineHealthThreshold *int GoogleDeveloperKey string EnableOAuthServiceProvider bool EnableIncomingWebhooks bool EnableOutgoingWebhooks bool EnableCommands *bool DEPRECATED_DO_NOT_USE_EnableOnlyAdminIntegrations *bool `json:"EnableOnlyAdminIntegrations"` // This field is deprecated and must not be used. EnablePostUsernameOverride bool EnablePostIconOverride bool EnableLinkPreviews *bool EnableTesting bool EnableDeveloper *bool EnableSecurityFixAlert *bool EnableInsecureOutgoingConnections *bool AllowedUntrustedInternalConnections *string EnableMultifactorAuthentication *bool EnforceMultifactorAuthentication *bool EnableUserAccessTokens *bool AllowCorsFrom *string CorsExposedHeaders *string CorsAllowCredentials *bool CorsDebug *bool AllowCookiesForSubdomains *bool SessionLengthWebInDays *int SessionLengthMobileInDays *int SessionLengthSSOInDays *int SessionCacheInMinutes *int SessionIdleTimeoutInMinutes *int WebsocketSecurePort *int WebsocketPort *int WebserverMode *string EnableCustomEmoji *bool EnableEmojiPicker *bool EnableGifPicker *bool GfycatApiKey *string GfycatApiSecret *string DEPRECATED_DO_NOT_USE_RestrictCustomEmojiCreation *string `json:"RestrictCustomEmojiCreation"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPostDelete *string `json:"RestrictPostDelete"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_AllowEditPost *string `json:"AllowEditPost"` // This field is deprecated and must not be used. PostEditTimeLimit *int TimeBetweenUserTypingUpdatesMilliseconds *int64 EnablePostSearch *bool EnableUserTypingMessages *bool EnableChannelViewedMessages *bool EnableUserStatuses *bool ExperimentalEnableAuthenticationTransfer *bool ClusterLogTimeoutMilliseconds *int CloseUnusedDirectMessages *bool EnablePreviewFeatures *bool EnableTutorial *bool ExperimentalEnableDefaultChannelLeaveJoinMessages *bool ExperimentalGroupUnreadChannels *string ExperimentalChannelOrganization *bool DEPRECATED_DO_NOT_USE_ImageProxyType *string `json:"ImageProxyType"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_ImageProxyURL *string `json:"ImageProxyURL"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_ImageProxyOptions *string `json:"ImageProxyOptions"` // This field is deprecated and must not be used. EnableAPITeamDeletion *bool ExperimentalEnableHardenedMode *bool EnableEmailInvitations *bool ExperimentalLdapGroupSync *bool }
func (*ServiceSettings) SetDefaults ¶
func (s *ServiceSettings) SetDefaults()
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"` Props StringMap `json:"props"` TeamMembers []*TeamMember `json:"team_members" db:"-"` }
func SessionFromJson ¶
func SessionsFromJson ¶
func (*Session) GenerateCSRF ¶
func (*Session) GetTeamByTeamId ¶
func (me *Session) GetTeamByTeamId(teamId string) *TeamMember
func (*Session) GetUserRoles ¶
func (*Session) IsMobileApp ¶
func (*Session) SetExpireInDays ¶
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
type SlackAttachmentField ¶
type SlackAttachmentField struct { Title string `json:"title"` Value interface{} `json:"value"` Short SlackCompatibleBool `json:"short"` }
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 DataSource *string DataSourceReplicas []string DataSourceSearchReplicas []string MaxIdleConns *int ConnMaxLifetimeMilliseconds *int MaxOpenConns *int Trace bool AtRestEncryptKey string QueryTimeout *int }
func (*SqlSettings) SetDefaults ¶
func (s *SqlSettings) SetDefaults()
type Status ¶
type Status struct { UserId string `json:"user_id"` Status string `json:"status"` Manual bool `json:"manual"` LastActivityAt int64 `json:"last_activity_at"` ActiveChannel string `json:"active_channel,omitempty" db:"-"` }
func StatusFromJson ¶
func StatusListFromJson ¶
func (*Status) ToClusterJson ¶
type StringArray ¶
type StringArray []string
type StringInterface ¶ added in v1.2.1
type StringInterface map[string]interface{}
type StringMap ¶
func GetDefaultChannelNotifyProps ¶ added in v1.1.0
func GetDefaultChannelNotifyProps() StringMap
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"` }
func SubmitDialogRequestFromJson ¶
func SubmitDialogRequestFromJson(data io.Reader) *SubmitDialogRequest
func (*SubmitDialogRequest) ToJson ¶
func (r *SubmitDialogRequest) ToJson() []byte
type SubmitDialogResponse ¶
func SubmitDialogResponseFromJson ¶
func SubmitDialogResponseFromJson(data io.Reader) *SubmitDialogResponse
func (*SubmitDialogResponse) ToJson ¶
func (r *SubmitDialogResponse) ToJson() []byte
type SuggestCommand ¶
type SuggestCommand struct { Suggestion string `json:"suggestion"` Description string `json:"description"` }
func SuggestCommandFromJson ¶
func SuggestCommandFromJson(data io.Reader) *SuggestCommand
func (*SuggestCommand) ToJson ¶
func (o *SuggestCommand) ToJson() string
type SupportSettings ¶ added in v1.4.0
type SupportSettings struct { TermsOfServiceLink *string PrivacyPolicyLink *string AboutLink *string HelpLink *string ReportAProblemLink *string SupportEmail *string CustomTermsOfServiceEnabled *bool CustomTermsOfServiceReAcceptancePeriod *int }
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 SwitchRequestFromJson ¶
func SwitchRequestFromJson(data io.Reader) *SwitchRequest
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
func (*SwitchRequest) ToJson ¶
func (o *SwitchRequest) ToJson() string
type System ¶
func SystemFromJson ¶
type SystemAsymmetricSigningKey ¶
type SystemAsymmetricSigningKey struct {
ECDSAKey *SystemECDSAKey `json:"ecdsa_key,omitempty"`
}
type SystemECDSAKey ¶
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"` }
func TeamFromJson ¶
func TeamListFromJson ¶
type TeamForExport ¶
type TeamMember ¶
type TeamMember struct { TeamId string `json:"team_id"` UserId string `json:"user_id"` Roles string `json:"roles"` DeleteAt int64 `json:"delete_at"` SchemeUser bool `json:"scheme_user"` SchemeAdmin bool `json:"scheme_admin"` ExplicitRoles string `json:"explicit_roles"` }
func TeamMemberFromJson ¶
func TeamMemberFromJson(data io.Reader) *TeamMember
func TeamMembersFromJson ¶
func TeamMembersFromJson(data io.Reader) []*TeamMember
func (*TeamMember) GetRoles ¶
func (o *TeamMember) GetRoles() []string
func (*TeamMember) IsValid ¶
func (o *TeamMember) IsValid() *AppError
func (*TeamMember) PreUpdate ¶
func (o *TeamMember) PreUpdate()
func (*TeamMember) ToJson ¶
func (o *TeamMember) ToJson() string
type TeamMemberForExport ¶
type TeamMemberForExport struct { TeamMember TeamName string }
type TeamPatch ¶
type TeamPatch struct { DisplayName *string `json:"display_name"` Description *string `json:"description"` CompanyName *string `json:"company_name"` AllowedDomains *string `json:"allowed_domains"` InviteId *string `json:"invite_id"` AllowOpenInvite *bool `json:"allow_open_invite"` }
func TeamPatchFromJson ¶
type TeamSearch ¶
type TeamSearch struct {
Term string `json:"term"`
}
func TeamSearchFromJson ¶
func TeamSearchFromJson(data io.Reader) *TeamSearch
TeamSearchFromJson decodes the input and returns a TeamSearch
func (*TeamSearch) ToJson ¶
func (c *TeamSearch) ToJson() string
ToJson convert a TeamSearch to json string
type TeamSettings ¶
type TeamSettings struct { SiteName string MaxUsersPerTeam *int DEPRECATED_DO_NOT_USE_EnableTeamCreation *bool `json:"EnableTeamCreation"` // This field is deprecated and must not be used. EnableUserCreation *bool EnableOpenServer *bool EnableUserDeactivation *bool RestrictCreationToDomains string EnableCustomBrand *bool CustomBrandText *string CustomDescriptionText *string RestrictDirectMessage *string DEPRECATED_DO_NOT_USE_RestrictTeamInvite *string `json:"RestrictTeamInvite"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPublicChannelManagement *string `json:"RestrictPublicChannelManagement"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateChannelManagement *string `json:"RestrictPrivateChannelManagement"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPublicChannelCreation *string `json:"RestrictPublicChannelCreation"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateChannelCreation *string `json:"RestrictPrivateChannelCreation"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPublicChannelDeletion *string `json:"RestrictPublicChannelDeletion"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateChannelDeletion *string `json:"RestrictPrivateChannelDeletion"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_RestrictPrivateChannelManageMembers *string `json:"RestrictPrivateChannelManageMembers"` // This field is deprecated and must not be used. EnableXToLeaveChannelsFromLHS *bool UserStatusAwayTimeout *int64 MaxChannelsPerTeam *int64 MaxNotificationsPerChannel *int64 EnableConfirmNotificationsToChannel *bool TeammateNameDisplay *string ExperimentalViewArchivedChannels *bool ExperimentalEnableAutomaticReplies *bool ExperimentalHideTownSquareinLHS *bool ExperimentalTownSquareIsReadOnly *bool ExperimentalPrimaryTeam *string ExperimentalDefaultChannels []string }
func (*TeamSettings) SetDefaults ¶
func (s *TeamSettings) SetDefaults()
type TeamStats ¶
type TeamStats struct { TeamId string `json:"team_id"` TotalMemberCount int64 `json:"total_member_count"` ActiveMemberCount int64 `json:"active_member_count"` }
func TeamStatsFromJson ¶
type TeamUnread ¶
type TeamUnread struct { TeamId string `json:"team_id"` MsgCount int64 `json:"msg_count"` MentionCount int64 `json:"mention_count"` }
func TeamUnreadFromJson ¶
func TeamUnreadFromJson(data io.Reader) *TeamUnread
func TeamsUnreadFromJson ¶
func TeamsUnreadFromJson(data io.Reader) []*TeamUnread
func (*TeamUnread) ToJson ¶
func (o *TeamUnread) ToJson() string
type TermsOfService ¶
type TermsOfService struct { Id string `json:"id"` CreateAt int64 `json:"create_at"` UserId string `json:"user_id"` Text string `json:"text"` }
func TermsOfServiceFromJson ¶
func TermsOfServiceFromJson(data io.Reader) *TermsOfService
func (*TermsOfService) IsValid ¶
func (t *TermsOfService) IsValid() *AppError
func (*TermsOfService) PreSave ¶
func (t *TermsOfService) PreSave()
func (*TermsOfService) ToJson ¶
func (t *TermsOfService) ToJson() string
type ThemeSettings ¶
type ThemeSettings struct { EnableThemeSelection *bool DefaultTheme *string AllowCustomThemes *bool AllowedThemes []string }
func (*ThemeSettings) SetDefaults ¶
func (s *ThemeSettings) SetDefaults()
type TimezoneSettings ¶
type TimezoneSettings struct {
SupportedTimezonesPath *string
}
func (*TimezoneSettings) SetDefaults ¶
func (s *TimezoneSettings) SetDefaults()
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"` LastActivityAt int64 `db:"-" json:"last_activity_at,omitempty"` }
func UserFromJson ¶
UserFromJson will decode the input and return a User
func UserListFromJson ¶
func (*User) AddNotifyProp ¶
func (*User) ClearNonProfileFields ¶ added in v1.3.0
func (u *User) ClearNonProfileFields()
func (*User) GetDisplayName ¶
func (*User) GetFullName ¶
func (*User) GetPreferredTimezone ¶
func (*User) GetRawRoles ¶
func (*User) IsInRole ¶
Make sure you acually want to use this function. In context.go there are functions to check permissions This function should not be used to check permissions.
func (*User) IsLDAPUser ¶
func (*User) IsOAuthUser ¶
func (*User) IsSAMLUser ¶
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) 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) SanitizeProfile ¶
func (*User) SetDefaultNotifications ¶
func (u *User) SetDefaultNotifications()
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 UserAccessTokenFromJson ¶
func UserAccessTokenFromJson(data io.Reader) *UserAccessToken
func UserAccessTokenListFromJson ¶
func UserAccessTokenListFromJson(data io.Reader) []*UserAccessToken
func (*UserAccessToken) IsValid ¶
func (t *UserAccessToken) IsValid() *AppError
func (*UserAccessToken) PreSave ¶
func (t *UserAccessToken) PreSave()
func (*UserAccessToken) ToJson ¶
func (t *UserAccessToken) ToJson() string
type UserAccessTokenSearch ¶
type UserAccessTokenSearch struct {
Term string `json:"term"`
}
func UserAccessTokenSearchFromJson ¶
func UserAccessTokenSearchFromJson(data io.Reader) *UserAccessTokenSearch
UserAccessTokenSearchJson decodes the input and returns a UserAccessTokenSearch
func (*UserAccessTokenSearch) ToJson ¶
func (c *UserAccessTokenSearch) ToJson() string
ToJson convert a UserAccessTokenSearch to json string
type UserAuth ¶
type UserAuth struct { Password string `json:"password,omitempty"` AuthData *string `json:"auth_data,omitempty"` AuthService string `json:"auth_service,omitempty"` }
func UserAuthFromJson ¶
type UserAutocomplete ¶
type UserAutocomplete struct { Users []*User `json:"users"` OutOfChannel []*User `json:"out_of_channel,omitempty"` }
func UserAutocompleteFromJson ¶
func UserAutocompleteFromJson(data io.Reader) *UserAutocomplete
func (*UserAutocomplete) ToJson ¶
func (o *UserAutocomplete) ToJson() string
type UserAutocompleteInChannel ¶
type UserAutocompleteInChannel struct { InChannel []*User `json:"in_channel"` OutOfChannel []*User `json:"out_of_channel"` }
func UserAutocompleteInChannelFromJson ¶
func UserAutocompleteInChannelFromJson(data io.Reader) *UserAutocompleteInChannel
func (*UserAutocompleteInChannel) ToJson ¶
func (o *UserAutocompleteInChannel) ToJson() string
type UserAutocompleteInTeam ¶
type UserAutocompleteInTeam struct {
InTeam []*User `json:"in_team"`
}
func UserAutocompleteInTeamFromJson ¶
func UserAutocompleteInTeamFromJson(data io.Reader) *UserAutocompleteInTeam
func (*UserAutocompleteInTeam) ToJson ¶
func (o *UserAutocompleteInTeam) ToJson() string
type UserChannelIDPair ¶
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 without a team WithoutTeam bool // Filters the inactive users Inactive bool // Filters for the given role Role string // Sorting option Sort string // Page Page int // Page size PerPage int }
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"` }
func UserPatchFromJson ¶
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"` AllowInactive bool `json:"allow_inactive"` WithoutTeam bool `json:"without_team"` Limit int `json:"limit"` Role string `json:"role"` }
UserSearch captures the parameters provided by a client for initiating a user search.
func UserSearchFromJson ¶
func UserSearchFromJson(data io.Reader) *UserSearch
UserSearchFromJson will decode the input and return a User
func (*UserSearch) ToJson ¶
func (u *UserSearch) ToJson() []byte
ToJson convert a User to a json string
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 // Limit limits the total number of results returned. Limit int // Filters for the given role Role string }
UserSearchOptions captures internal parameters derived from the user's permissions and a UserSearch request.
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 UserTermsOfServiceFromJson ¶
func UserTermsOfServiceFromJson(data io.Reader) *UserTermsOfService
func (*UserTermsOfService) IsValid ¶
func (ut *UserTermsOfService) IsValid() *AppError
func (*UserTermsOfService) PreSave ¶
func (ut *UserTermsOfService) PreSave()
func (*UserTermsOfService) ToJson ¶
func (ut *UserTermsOfService) ToJson() string
type UsersStats ¶
type UsersStats struct {
TotalUsersCount int64 `json:"total_users_count"`
}
func UsersStatsFromJson ¶
func UsersStatsFromJson(data io.Reader) *UsersStats
func (*UsersStats) ToJson ¶
func (o *UsersStats) ToJson() string
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 Sequence int64 // The ever-incrementing sequence attached to each WebSocket action PingTimeoutChannel chan bool // The channel used to signal ping timeouts EventChannel chan *WebSocketEvent ResponseChannel chan *WebSocketResponse ListenError *AppError // contains filtered or unexported fields }
func (*WebSocketClient) Close ¶
func (wsc *WebSocketClient) Close()
func (*WebSocketClient) Connect ¶
func (wsc *WebSocketClient) Connect() *AppError
func (*WebSocketClient) ConnectWithDialer ¶
func (wsc *WebSocketClient) ConnectWithDialer(dialer *websocket.Dialer) *AppError
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()
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 { Event string `json:"event"` Data map[string]interface{} `json:"data"` Broadcast *WebsocketBroadcast `json:"broadcast"` Sequence int64 `json:"seq"` // 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
func (*WebSocketEvent) Add ¶
func (m *WebSocketEvent) Add(key string, value interface{})
func (*WebSocketEvent) EventType ¶
func (o *WebSocketEvent) EventType() string
func (*WebSocketEvent) IsValid ¶
func (o *WebSocketEvent) IsValid() bool
func (*WebSocketEvent) PrecomputeJSON ¶
func (m *WebSocketEvent) PrecomputeJSON()
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) ToJson ¶
func (o *WebSocketEvent) ToJson() string
type WebSocketMessage ¶
type WebSocketRequest ¶
type WebSocketRequest struct { // Client-provided fields Seq int64 `json:"seq"` Action string `json:"action"` Data map[string]interface{} `json:"data"` // Server-provided fields Session Session `json:"-"` T goi18n.TranslateFunc `json:"-"` Locale string `json:"-"` }
func WebSocketRequestFromJson ¶
func WebSocketRequestFromJson(data io.Reader) *WebSocketRequest
func (*WebSocketRequest) ToJson ¶
func (o *WebSocketRequest) ToJson() string
type WebSocketResponse ¶
type WebSocketResponse struct { Status string `json:"status"` SeqReply int64 `json:"seq_reply,omitempty"` Data map[string]interface{} `json:"data,omitempty"` Error *AppError `json:"error,omitempty"` }
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
func (*WebSocketResponse) Add ¶
func (m *WebSocketResponse) Add(key string, value interface{})
func (*WebSocketResponse) EventType ¶
func (o *WebSocketResponse) EventType() string
func (*WebSocketResponse) IsValid ¶
func (o *WebSocketResponse) IsValid() bool
func (*WebSocketResponse) ToJson ¶
func (o *WebSocketResponse) ToJson() string
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:"-"` }
Source Files ¶
- access.go
- analytics_row.go
- audit.go
- audits.go
- authorize.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_stats.go
- channel_view.go
- client4.go
- cluster_discovery.go
- cluster_info.go
- cluster_message.go
- cluster_stats.go
- command.go
- command_args.go
- command_response.go
- command_webhook.go
- compliance.go
- compliance_post.go
- config.go
- data_retention_policy.go
- emoji.go
- emoji_data.go
- emoji_search.go
- file.go
- file_info.go
- gitlab.go
- group.go
- group_member.go
- group_syncable.go
- incoming_webhook.go
- initial_load.go
- integration_action.go
- job.go
- ldap.go
- license.go
- link_metadata.go
- manifest.go
- message_export.go
- mfa_secret.go
- migration.go
- oauth.go
- outgoing_webhook.go
- permission.go
- plugin_key_value.go
- plugin_status.go
- plugins_response.go
- post.go
- post_embed.go
- post_list.go
- post_metadata.go
- post_search_results.go
- preference.go
- preferences.go
- push_notification.go
- push_response.go
- reaction.go
- role.go
- saml.go
- scheduled_task.go
- scheme.go
- search_params.go
- security_bulletin.go
- session.go
- slack_attachment.go
- slack_compatibility.go
- status.go
- suggest_command.go
- switch_request.go
- system.go
- team.go
- team_member.go
- team_search.go
- team_stats.go
- terms_of_service.go
- token.go
- user.go
- user_access_token.go
- user_access_token_search.go
- user_autocomplete.go
- user_get.go
- user_search.go
- user_terms_of_service.go
- users_stats.go
- utils.go
- version.go
- websocket_client.go
- websocket_message.go
- websocket_request.go