httpx

package
v0.3.0-UX Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CredentialsVerifier

func CredentialsVerifier(db *sql.DB) oauth.CredentialsVerifier

func LogInternalError

func LogInternalError(w http.ResponseWriter, code string, err error)

Will log an error, and send an HTTP response with status 500 and default text

func LogNotFound

func LogNotFound(w http.ResponseWriter, code string, id any)

Will log a debug message, and send an HTTP response with status 404 and default text

func LogStatus

func LogStatus(w http.ResponseWriter, status int, level log.Level, code string)

Will log an error code at the given level, and send an HTTP response with status and default text

func LogStatusMsg

func LogStatusMsg(w http.ResponseWriter, status int, level log.Level, code string, msg string, args ...any)

Will log an error code and message at the given level, and send an HTTP response with the given status and formatted message

Types

type ResponseBuffer

type ResponseBuffer interface {
	http.ResponseWriter
	Status() int
	Body() []byte
	Flush(w http.ResponseWriter) error
}

func NewResponseBuffer

func NewResponseBuffer() ResponseBuffer

Jump to

Keyboard shortcuts

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