Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapter ¶
func Adapter(h HandlerFunc) http.Handler
This will convert the Hyper HandlerFunc to native handler.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(http.ResponseWriter, *http.Request) HypergonError
HandlerFunc is a custom http handler that can return an error
func AdapterHandler ¶
func AdapterHandler(h http.Handler) HandlerFunc
Adapter for handling native implementation of standard handlers for Hyper.
func (HandlerFunc) ServeHTTP ¶
func (h HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Hyper ¶
type Hyper struct {
// contains filtered or unexported fields
}
Hyper act as a custom web router multiplexer that utilizes the standard library.
func (*Hyper) Action ¶
func (hy *Hyper) Action(pattern string, handler HandlerFunc)
The implemetation of custom http handler
func (*Hyper) Chain ¶
func (hy *Hyper) Chain(middlewares ...Middleware)
type HypergonError ¶
Custom http error type
func HttpError ¶
func HttpError(status int, message string) HypergonError
type Middleware ¶
type Middleware func(HandlerFunc) HandlerFunc
Middleware func type for easy middleware typing.
Click to show internal directories.
Click to hide internal directories.