Documentation
¶
Index ¶
- Constants
- func CheckAuthorized(mm *pluginapi.Client, ...) http.HandlerFunc
- func LimitReadAll(in io.Reader, limit int64) ([]byte, error)
- func NormalizeRemoteBaseURL(mattermostSiteURL, remoteURL string) (string, error)
- func ProcessResponseError(w http.ResponseWriter, resp *http.Response, err error) bool
- func ReadAndClose(in io.ReadCloser) ([]byte, error)
- func WriteError(w http.ResponseWriter, err error)
- func WriteJSON(w http.ResponseWriter, v interface{})
- func WriteJSONStatus(w http.ResponseWriter, statusCode int, v interface{})
- type Handler
- type LimitReadCloser
Constants ¶
View Source
const InLimit = 10 * (1 << 20)
Variables ¶
This section is empty.
Functions ¶
func CheckAuthorized ¶ added in v0.3.0
func CheckAuthorized(mm *pluginapi.Client, f func(_ http.ResponseWriter, _ *http.Request, sessionID, actingUserID string)) http.HandlerFunc
func NormalizeRemoteBaseURL ¶
func ProcessResponseError ¶ added in v0.2.0
func ReadAndClose ¶ added in v0.2.0
func ReadAndClose(in io.ReadCloser) ([]byte, error)
func WriteError ¶ added in v0.2.0
func WriteError(w http.ResponseWriter, err error)
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, v interface{})
func WriteJSONStatus ¶
func WriteJSONStatus(w http.ResponseWriter, statusCode int, v interface{})
Types ¶
type LimitReadCloser ¶
type LimitReadCloser struct { ReadCloser io.ReadCloser TotalRead utils.ByteSize Limit utils.ByteSize OnClose func(*LimitReadCloser) error }
func (*LimitReadCloser) Close ¶
func (r *LimitReadCloser) Close() error
Click to show internal directories.
Click to hide internal directories.