router

package
v0.0.0-...-0aa8bca Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RouterPath = "router-path"

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPRouter

type HTTPRouter interface {
	GET(path string, handler HandlerFunc)
	POST(path string, handler HandlerFunc)
	PUT(path string, handler HandlerFunc)
	OPTIONS(path string, handler HandlerFunc)
}

func New

func New(prefix string, router Registrator) HTTPRouter

type HandlerFunc

type HandlerFunc func(w http.ResponseWriter, r *http.Request) response.HTTPResponse

type Registrator

type Registrator interface {
	AddMiddlewareWrapper(wrapper ...middleware.Wrapper) Registrator
	Register(method, path string, handler HandlerFunc)
	ServeHTTP(http.ResponseWriter, *http.Request)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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