http

package
v0.0.0-...-f3a9913 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeResponse

func EncodeResponse(w http.ResponseWriter, data interface{})

func GetRouteVariable

func GetRouteVariable(r *http.Request, key string) string

Types

type Listener

type Listener interface {
	RegisterEndpoints(router RouterInterface)
}

type Router

type Router struct {
	// contains filtered or unexported fields
}

func (*Router) HandleFunc

func (r *Router) HandleFunc(path string, method string, f func(http.ResponseWriter, *http.Request))

func (*Router) Handler

func (r *Router) Handler() http.Handler

type RouterInterface

type RouterInterface interface {
	Handler() http.Handler
	HandleFunc(path string, method string, fn func(w http.ResponseWriter, r *http.Request))
}

func NewRouter

func NewRouter() RouterInterface

Jump to

Keyboard shortcuts

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