httputils

package
v0.0.0-...-0593e73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeRemoteBaseURL

func NormalizeRemoteBaseURL(mattermostSiteURL, remoteURL string) (string, error)

func WriteBadRequestError

func WriteBadRequestError(w http.ResponseWriter, err error)

func WriteInternalServerError

func WriteInternalServerError(w http.ResponseWriter, err error)

func WriteJSONError

func WriteJSONError(w http.ResponseWriter, statusCode int, summary string, err error)

func WriteNotFoundError

func WriteNotFoundError(w http.ResponseWriter, err error)

func WriteUnauthorizedError

func WriteUnauthorizedError(w http.ResponseWriter, err error)

Types

type Handler

type Handler struct {
	*mux.Router
}

func NewHandler

func NewHandler() *Handler

type LimitReadCloser

type LimitReadCloser struct {
	ReadCloser io.ReadCloser
	TotalRead  types.ByteSize
	Limit      types.ByteSize
	OnClose    func(*LimitReadCloser) error
}

func (*LimitReadCloser) Close

func (r *LimitReadCloser) Close() error

func (*LimitReadCloser) Read

func (r *LimitReadCloser) Read(data []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL