httputils

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequestServerError

func BadRequestServerError(l *zap.Logger, w http.ResponseWriter, r *http.Request, err error)

BadRequestServerError http response

func GetRequestDomain added in v0.2.0

func GetRequestDomain(r *http.Request) string

GetRequestDomain returns the request's domain

func GetRequestHost added in v0.2.0

func GetRequestHost(r *http.Request) string

GetRequestHost returns the request's host

func HashBasicAuthPassword added in v0.2.0

func HashBasicAuthPassword(v []byte) ([]byte, error)

func InternalServerError

func InternalServerError(l *zap.Logger, w http.ResponseWriter, r *http.Request, err error)

InternalServerError http response

func NotFoundServerError

func NotFoundServerError(l *zap.Logger, w http.ResponseWriter, r *http.Request, err error)

NotFoundServerError http response

func ServerError

func ServerError(l *zap.Logger, w http.ResponseWriter, r *http.Request, code int, err error)

ServerError http response

func UnauthorizedServerError

func UnauthorizedServerError(l *zap.Logger, w http.ResponseWriter, r *http.Request, err error)

UnauthorizedServerError http response

Types

This section is empty.

Jump to

Keyboard shortcuts

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