render

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, err error)

func NewBadRequestError

func NewBadRequestError(msg string) error

func NewForbiddenError

func NewForbiddenError(msg string) error

func NewNotFoundError

func NewNotFoundError(msg string) error

func Response

func Response(w http.ResponseWriter, data interface{})

func WrapBadRequestError

func WrapBadRequestError(err error, msg string) error

func WrapForbiddenError

func WrapForbiddenError(err error, msg string) error

func WrapNotFoundError

func WrapNotFoundError(err error, msg string) error

Types

type ErrorResponse

type ErrorResponse struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
}

type StackTracer

type StackTracer interface {
	StackTrace() errors.StackTrace
}

type StateError

type StateError interface {
	error
	Code() int
	StackTracer
}

Jump to

Keyboard shortcuts

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