httputils

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 9 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 GetRemoteAddr added in v0.9.6

func GetRemoteAddr(r *http.Request) string

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 InternalServiceTooEarly added in v0.9.0

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

InternalServiceTooEarly http response

func InternalServiceUnavailable added in v0.9.0

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

InternalServiceUnavailable 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