go-zero/rest/httpx/router.go

12 lines
290 B
Go
Raw Normal View History

2020-07-31 12:13:30 +08:00
package httpx
import "net/http"
2021-03-01 19:15:35 +08:00
// Router interface represents a http router that handles http requests.
2020-07-31 12:13:30 +08:00
type Router interface {
http.Handler
Handle(method, path string, handler http.Handler) error
2020-07-31 12:13:30 +08:00
SetNotFoundHandler(handler http.Handler)
2020-10-21 14:10:29 +08:00
SetNotAllowedHandler(handler http.Handler)
2020-07-31 12:13:30 +08:00
}