router

package
v0.0.0-...-d1346dc Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitMutating

func CommitMutating(t *testing.T, r *http.Request, execute HTTPImplementer, token string, affectedRows int64)

func Handle

func Handle(endpoint string, m Methods)

func HandleCORSPreflight

func HandleCORSPreflight(w io.Writer, r *http.Request) *logging.StatusError

func HandleMethod

func HandleMethod(m HTTPImplementer, w http.ResponseWriter, r *http.Request)

func HandleWebsocket

func HandleWebsocket(endpoint string, method WebSocketEstablisher)

func ReturnMethodNotAllowed

func ReturnMethodNotAllowed(w io.Writer, r *http.Request) *logging.StatusError

Types

type HTTPImplementer

type HTTPImplementer = func(io.Writer, *http.Request) *logging.StatusError

type Methods

type Methods struct {
	GET    HTTPImplementer
	POST   HTTPImplementer
	PUT    HTTPImplementer
	DELETE HTTPImplementer
}

type WebSocketEstablisher

type WebSocketEstablisher = func(http.ResponseWriter, *http.Request) *logging.StatusError

Jump to

Keyboard shortcuts

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