Documentation ¶
Index ¶
- Constants
- func CheckClientCompatability(agentString string) bool
- 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.App, r *http.Request) bool
- func NewInvalidParamError(parameter string) *model.AppError
- func NewInvalidUrlParamError(parameter string) *model.AppError
- func ReturnStatusOK(w http.ResponseWriter)
- type Context
- 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) LogAuditWithUserId(userId, extraInfo string)
- func (c *Context) LogDebug(err *model.AppError)
- func (c *Context) LogError(err *model.AppError)
- func (c *Context) LogInfo(err *model.AppError)
- func (c *Context) MfaRequired()
- func (c *Context) RemoveSessionCookie(w http.ResponseWriter, r *http.Request)
- func (c *Context) RequireActionId() *Context
- func (c *Context) RequireAppId() *Context
- func (c *Context) RequireBotUserId() *Context
- func (c *Context) RequireCategory() *Context
- func (c *Context) RequireChannelId() *Context
- func (c *Context) RequireChannelName() *Context
- func (c *Context) RequireCommandId() *Context
- func (c *Context) RequireEmail() *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) 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) RequireTaskId() *Context
- func (c *Context) RequireTeamId() *Context
- func (c *Context) RequireTeamName() *Context
- func (c *Context) RequireTokenId() *Context
- func (c *Context) RequireUserId() *Context
- func (c *Context) RequireUsername() *Context
- func (c *Context) SessionRequired()
- func (c *Context) SetInvalidParam(parameter string)
- func (c *Context) SetInvalidUrlParam(parameter string)
- func (c *Context) SetPermissionError(permission *model.Permission)
- func (c *Context) SetSiteURLHeader(url string)
- type Handler
- type Params
- type Web
Constants ¶
View Source
const ( PAGE_DEFAULT = 0 PER_PAGE_DEFAULT = 60 PER_PAGE_MAXIMUM = 200 LOGS_PER_PAGE_DEFAULT = 10000 LOGS_PER_PAGE_MAXIMUM = 10000 )
Variables ¶
This section is empty.
Functions ¶
func Handle404 ¶
func Handle404(config configservice.ConfigService, w http.ResponseWriter, r *http.Request)
func IsApiCall ¶
func IsApiCall(config configservice.ConfigService, r *http.Request) bool
func IsOAuthApiCall ¶
func IsOAuthApiCall(config configservice.ConfigService, r *http.Request) bool
func NewInvalidParamError ¶
func NewInvalidUrlParamError ¶
func ReturnStatusOK ¶
func ReturnStatusOK(w http.ResponseWriter)
Types ¶
type Context ¶
type Context struct { App *app.App Log *mlog.Logger Params *Params Err *model.AppError // contains filtered or unexported fields }
func (*Context) GetSiteURLHeader ¶
func (*Context) HandleEtag ¶
func (*Context) IsSystemAdmin ¶
func (*Context) LogAuditWithUserId ¶
func (*Context) MfaRequired ¶
func (c *Context) MfaRequired()
func (*Context) RemoveSessionCookie ¶
func (c *Context) RemoveSessionCookie(w http.ResponseWriter, r *http.Request)
func (*Context) RequireActionId ¶
func (*Context) RequireAppId ¶
func (*Context) RequireBotUserId ¶
func (*Context) RequireCategory ¶
func (*Context) RequireChannelId ¶
func (*Context) RequireChannelName ¶
func (*Context) RequireCommandId ¶
func (*Context) RequireEmail ¶
func (*Context) RequireEmojiId ¶
func (*Context) RequireEmojiName ¶
func (*Context) RequireFileId ¶
func (*Context) RequireFilename ¶
func (*Context) RequireGroupId ¶
func (*Context) RequireHookId ¶
func (*Context) RequireInviteId ¶
func (*Context) RequireJobId ¶
func (*Context) RequireJobType ¶
func (*Context) RequirePluginId ¶
func (*Context) RequirePostId ¶
func (*Context) RequirePreferenceName ¶
func (*Context) RequireRemoteId ¶
func (*Context) RequireReportId ¶
func (*Context) RequireRoleId ¶
func (*Context) RequireRoleName ¶
func (*Context) RequireSchemeId ¶
func (*Context) RequireService ¶
func (*Context) RequireSyncableId ¶
func (*Context) RequireSyncableType ¶
func (*Context) RequireTaskId ¶
func (*Context) RequireTeamId ¶
func (*Context) RequireTeamName ¶
func (*Context) RequireTokenId ¶
func (*Context) RequireUserId ¶
func (*Context) RequireUsername ¶
func (*Context) SessionRequired ¶
func (c *Context) SessionRequired()
func (*Context) SetInvalidParam ¶
func (*Context) SetInvalidUrlParam ¶
func (*Context) SetPermissionError ¶
func (c *Context) SetPermissionError(permission *model.Permission)
func (*Context) SetSiteURLHeader ¶
type Handler ¶
type Params ¶
type Params struct { UserId string TeamId string InviteId string TokenId string ChannelId string PostId string FileId string Filename string PluginId string CommandId string HookId string ReportId string EmojiId string AppId string Email string Username string TeamName string ChannelName string PreferenceName string EmojiName string Category string Service string JobId string JobType string ActionId string RoleId string RoleName string SchemeId string Scope string GroupId string Page int PerPage int LogsPerPage int Permanent bool RemoteId string SyncableId string SyncableType model.GroupSyncableType BotUserId string TaskId string Q string IsLinked *bool IsConfigured *bool NotAssociatedToTeam string NotAssociatedToChannel string Paginate *bool IncludeMemberCount bool NotAssociatedToGroup string ExcludeDefaultChannels bool GroupIDs string IncludeTotalCount bool }
func ParamsFromRequest ¶
type Web ¶
type Web struct { GetGlobalAppOptions app.AppOptionCreator ConfigService configservice.ConfigService MainRouter *mux.Router }
func New ¶
func New(config configservice.ConfigService, globalOptions app.AppOptionCreator, root *mux.Router) *Web
func (*Web) InitStatic ¶
func (w *Web) InitStatic()
func (*Web) InitWebhooks ¶
func (w *Web) InitWebhooks()
func (*Web) NewHandler ¶
func (*Web) NewStaticHandler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.