Documentation ¶
Index ¶
- Constants
- func ApiCustomClaimsRequired(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler
- func ApiHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler
- func AppHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler
- func BindJson(data io.Reader, dest interface{}) error
- func Handle404(w http.ResponseWriter, r *http.Request)
- func HandleEtag(etag string, routeName string, w http.ResponseWriter, r *http.Request) bool
- func InitApi()
- func InitOauth()
- func InitRouter()
- func InitSystem()
- func InitUser()
- func IsApiCall(r *http.Request) bool
- func NewInvalidParamError(parameter string) *model.AppError
- func NewInvalidUrlParamError(parameter string) *model.AppError
- func RenderJson(w http.ResponseWriter, o interface{})
- func ReturnStatusOK(w http.ResponseWriter)
- type ApiParams
- type Context
- func (c *Context) CustomClaimsRequired()
- func (c *Context) GetSiteURLHeader() string
- func (c *Context) IsSystemAdmin() bool
- func (c *Context) LogDebug(err *model.AppError)
- func (c *Context) LogError(err *model.AppError)
- func (c *Context) RemoveCustomClaimsCookie(w http.ResponseWriter, r *http.Request)
- func (c *Context) RequireService() *Context
- func (c *Context) RequireUserId() *Context
- 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 Routes
Constants ¶
View Source
const ( PAGE_DEFAULT = 0 PER_PAGE_DEFAULT = 10 PER_PAGE_MAXIMUM = 200 )
Variables ¶
This section is empty.
Functions ¶
func ApiCustomClaimsRequired ¶
func ApiHandler ¶
func AppHandler ¶
func HandleEtag ¶
func InitRouter ¶
func InitRouter()
func InitSystem ¶
func InitSystem()
func NewInvalidParamError ¶
func NewInvalidUrlParamError ¶
func RenderJson ¶
func RenderJson(w http.ResponseWriter, o interface{})
func ReturnStatusOK ¶
func ReturnStatusOK(w http.ResponseWriter)
Types ¶
type ApiParams ¶
type ApiParams struct { UserId string Email string Username string Region string Term string Service string Mobile string Page int PerPage int }
func ApiParamsFromRequest ¶
type Context ¶
type Context struct { CustomClaims model.CustomClaims TokenString string Params *ApiParams Err *model.AppError T goi18n.TranslateFunc RequestId string IpAddress string Path string // contains filtered or unexported fields }
func (*Context) CustomClaimsRequired ¶
func (c *Context) CustomClaimsRequired()
func (*Context) GetSiteURLHeader ¶
func (*Context) IsSystemAdmin ¶
func (*Context) RemoveCustomClaimsCookie ¶
func (c *Context) RemoveCustomClaimsCookie(w http.ResponseWriter, r *http.Request)
func (*Context) RequireService ¶
func (*Context) RequireUserId ¶
func (*Context) SetInvalidParam ¶
func (*Context) SetInvalidUrlParam ¶
func (*Context) SetPermissionError ¶
func (c *Context) SetPermissionError(permission *model.Permission)
func (*Context) SetSiteURLHeader ¶
Click to show internal directories.
Click to hide internal directories.