server

package
v0.0.0-...-33d6422 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(err error, w http.ResponseWriter)

func HTTP

func HTTP(handler http.Handler, addr string, timeout time.Duration) error

HTTP starts a server without TLS.

func HTTPS

func HTTPS(handler http.Handler, addr string, timeout time.Duration, host, certDir string) error

HTTPS starts a server with TLS.

func InternalServerError

func InternalServerError(err error, w http.ResponseWriter)

func ReadJSONBody

func ReadJSONBody(w http.ResponseWriter, r *http.Request, n int64, v interface{}) error

ReadJSONBody reads an HTTP body as JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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