app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: LGPL-2.1 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderContentType = "Content-Type"

	MimeApplicationJSON = "application/json"
)

Variables

This section is empty.

Functions

func IsDevAppServer

func IsDevAppServer() bool

func RootHandler

func RootHandler() http.HandlerFunc

Types

type Error

type Error struct {
	Error   error
	Message string
	Code    int
}

func Errorf

func Errorf(err error, format string, v ...interface{}) *Error

func JsonUnmarshalFromRequest

func JsonUnmarshalFromRequest(r *http.Request, dst interface{}) *Error

type Handler

type Handler func(http.ResponseWriter, *http.Request) (interface{}, *Error)

func (Handler) ServeHTTP

func (fn Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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