httpserver

package
v0.1.46 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindJson added in v0.1.43

func BindJson[T any](r *http.Request, v T) error

func Json added in v0.1.43

func Json[T any](status int, w http.ResponseWriter, v T) error

func ListenAndServe

func ListenAndServe(callback func(*ApiServer) error) <-chan int

func ShouldBindJson added in v0.1.43

func ShouldBindJson[T any](r *http.Request, v T) error

func Status added in v0.1.43

func Status(status int, w http.ResponseWriter)

Types

type ApiServer

type ApiServer struct {
	HttpPort uint16
	Engine   *http.ServeMux
	// contains filtered or unexported fields
}

type H added in v0.1.45

type H map[string]any

Jump to

Keyboard shortcuts

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