_responses

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoNotCacheResponse

type DoNotCacheResponse struct {
	Payload interface{}
}

type DownloadResponse

type DownloadResponse struct {
	ContentType       string
	Filename          string
	SizeBytes         int64
	Data              io.ReadCloser
	TargetDisposition string
}

func MakeQuarantinedImageResponse

func MakeQuarantinedImageResponse(stream io.ReadCloser) *DownloadResponse

type EmptyResponse

type EmptyResponse struct{}

type ErrorResponse

type ErrorResponse struct {
	Code         string `json:"errcode"`
	Message      string `json:"error"`
	InternalCode string `json:"mr_errcode"`
}

func AuthFailed

func AuthFailed() *ErrorResponse

func BadGatewayError

func BadGatewayError(message string) *ErrorResponse

func BadRequest

func BadRequest(message string) *ErrorResponse

func GuestAuthFailed

func GuestAuthFailed() *ErrorResponse

func InternalServerError

func InternalServerError(message string) *ErrorResponse

func MediaBlocked

func MediaBlocked() *ErrorResponse

func MethodNotAllowed

func MethodNotAllowed() *ErrorResponse

func NotFoundError

func NotFoundError() *ErrorResponse

func NotYetUploaded

func NotYetUploaded() *ErrorResponse

func QuotaExceeded

func QuotaExceeded() *ErrorResponse

func RateLimitReached

func RateLimitReached() *ErrorResponse

func RequestTooLarge

func RequestTooLarge() *ErrorResponse

func RequestTooSmall

func RequestTooSmall() *ErrorResponse

type HtmlResponse

type HtmlResponse struct {
	HTML string
}

type RedirectResponse

type RedirectResponse struct {
	ToUrl string
}

func Redirect

func Redirect(url string) *RedirectResponse

type StreamDataResponse

type StreamDataResponse struct {
	Stream io.Reader
}

Jump to

Keyboard shortcuts

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