Versions in this module Expand all Collapse all v5 v5.33.2 Jul 13, 2021 v5.33.1 Jul 13, 2021 v5.33.0 Jul 13, 2021 Changes in this version + const LimitDefault + const LimitMaximum + const LogsPerPageDefault + const LogsPerPageMaximum + const PageDefault + const PerPageDefault + const PerPageMaximum + func CheckClientCompatibility(agentString string) bool + func GetHandlerName(h func(*Context, http.ResponseWriter, *http.Request)) string + func Handle404(config configservice.ConfigService, w http.ResponseWriter, r *http.Request) + func IsApiCall(config configservice.ConfigService, r *http.Request) bool + func IsOAuthApiCall(config configservice.ConfigService, r *http.Request) bool + func IsWebhookCall(a app.AppIface, r *http.Request) bool + func NewInvalidParamError(parameter string) *model.AppError + func NewInvalidUrlParamError(parameter string) *model.AppError + func NewServerBusyError() *model.AppError + func ReturnStatusOK(w http.ResponseWriter) + type Browser struct + GetLatestString string + LogoSrc string + Src string + SupportedVersionString string + Title string + type Context struct + App app.AppIface + Err *model.AppError + Logger *mlog.Logger + Params *Params + func (c *Context) CloudKeyRequired() + func (c *Context) ExtendSessionExpiryIfNeeded(w http.ResponseWriter, r *http.Request) + func (c *Context) GetSiteURLHeader() string + func (c *Context) HandleEtag(etag string, routeName string, w http.ResponseWriter, r *http.Request) bool + func (c *Context) IsSystemAdmin() bool + func (c *Context) LogAudit(extraInfo string) + func (c *Context) LogAuditRec(rec *audit.Record) + func (c *Context) LogAuditRecWithLevel(rec *audit.Record, level mlog.LogLevel) + func (c *Context) LogAuditWithUserId(userId, extraInfo string) + func (c *Context) LogErrorByCode(err *model.AppError) + func (c *Context) MakeAuditRecord(event string, initialStatus string) *audit.Record + func (c *Context) MfaRequired() + func (c *Context) RemoveSessionCookie(w http.ResponseWriter, r *http.Request) + func (c *Context) RequireAppId() *Context + func (c *Context) RequireBotUserId() *Context + func (c *Context) RequireCategory() *Context + func (c *Context) RequireCategoryId() *Context + func (c *Context) RequireChannelId() *Context + func (c *Context) RequireChannelName() *Context + func (c *Context) RequireCommandId() *Context + func (c *Context) RequireEmojiId() *Context + func (c *Context) RequireEmojiName() *Context + func (c *Context) RequireFileId() *Context + func (c *Context) RequireFilename() *Context + func (c *Context) RequireGroupId() *Context + func (c *Context) RequireHookId() *Context + func (c *Context) RequireInviteId() *Context + func (c *Context) RequireInvoiceId() *Context + func (c *Context) RequireJobId() *Context + func (c *Context) RequireJobType() *Context + func (c *Context) RequirePluginId() *Context + func (c *Context) RequirePostId() *Context + func (c *Context) RequirePreferenceName() *Context + func (c *Context) RequireRemoteId() *Context + func (c *Context) RequireReportId() *Context + func (c *Context) RequireRoleId() *Context + func (c *Context) RequireRoleName() *Context + func (c *Context) RequireSchemeId() *Context + func (c *Context) RequireService() *Context + func (c *Context) RequireSyncableId() *Context + func (c *Context) RequireSyncableType() *Context + func (c *Context) RequireTeamId() *Context + func (c *Context) RequireTeamName() *Context + func (c *Context) RequireThreadId() *Context + func (c *Context) RequireTimestamp() *Context + func (c *Context) RequireTokenId() *Context + func (c *Context) RequireUploadId() *Context + func (c *Context) RequireUserId() *Context + func (c *Context) RequireUsername() *Context + func (c *Context) SanitizeEmail() *Context + func (c *Context) SessionRequired() + func (c *Context) SetCommandNotFoundError() + func (c *Context) SetInvalidParam(parameter string) + func (c *Context) SetInvalidUrlParam(parameter string) + func (c *Context) SetPermissionError(permissions ...*model.Permission) + func (c *Context) SetServerBusyError() + func (c *Context) SetSiteURLHeader(url string) + type Handler struct + DisableWhenBusy bool + GetGlobalAppOptions app.AppOptionCreator + HandleFunc func(*Context, http.ResponseWriter, *http.Request) + HandlerName string + IsLocal bool + IsStatic bool + RequireCloudKey bool + RequireMfa bool + RequireSession bool + TrustRequester bool + func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type MattermostApp struct + InstallGuide string + InstallGuideLink string + Label string + Link string + LogoSrc string + SupportedVersionString string + Title string + type Params struct + ActionId string + AppId string + BotUserId string + Category string + CategoryId string + ChannelId string + ChannelName string + CommandId string + Email string + EmojiId string + EmojiName string + ExcludeDefaultChannels bool + ExportName string + FileId string + Filename string + FilterAllowReference bool + FilterParentTeamPermitted bool + GroupIDs string + GroupId string + HookId string + IncludeDeleted bool + IncludeMemberCount bool + IncludeTotalCount bool + InviteId string + InvoiceId string + IsConfigured *bool + IsLinked *bool + JobId string + JobType string + LimitAfter int + LimitBefore int + LogsPerPage int + NotAssociatedToChannel string + NotAssociatedToGroup string + NotAssociatedToTeam string + Page int + Paginate *bool + PerPage int + Permanent bool + PluginId string + PostId string + PreferenceName string + Q string + RemoteId string + ReportId string + RoleId string + RoleName string + SchemeId string + Scope string + Service string + SyncableId string + SyncableType model.GroupSyncableType + TeamId string + TeamName string + ThreadId string + Timestamp int64 + TokenId string + UploadId string + UserId string + Username string + WarnMetricId string + func ParamsFromRequest(r *http.Request) *Params + type SystemBrowser struct + LabelOpen string + LinkMakeDefault string + LinkOpen string + LogoSrc string + MakeDefaultString string + OrString string + SupportedVersionString string + Title string + type Web struct + ConfigService configservice.ConfigService + GetGlobalAppOptions app.AppOptionCreator + MainRouter *mux.Router + func New(config configservice.ConfigService, globalOptions app.AppOptionCreator, ...) *Web + func (w *Web) ApiHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (w *Web) ApiHandlerTrustRequester(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (w *Web) ApiSessionRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (w *Web) InitOAuth() + func (w *Web) InitSaml() + func (w *Web) InitStatic() + func (w *Web) InitWebhooks() + func (w *Web) NewHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler + func (w *Web) NewStaticHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler