Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKeys ¶
Types ¶
type ControllerInterface ¶
type Dispatcher ¶
type Dispatcher struct { Middleware []middlewares.Middleware // contains filtered or unexported fields }
func NewDispatcher ¶
func NewDispatcher() *Dispatcher
func (*Dispatcher) AddRoute ¶
func (h *Dispatcher) AddRoute(method string, path string, handleMethod string, handler interface{}) error
func (*Dispatcher) ServeHTTP ¶
func (h *Dispatcher) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type Node ¶
type Node struct { Children map[string]*Node Name string Parameter bool // if the parameter node, like /:id ParameterName string HasParameterNode bool PathEnd bool // the endpoint of path, ex: the C is the endpoint of path /a/b/C Value interface{} // controller that deal the bussiness logic HandleMethod string }
func CreateNode ¶
func (*Node) ParameterNode ¶
type RouteServe ¶
type RouteServe struct {
// contains filtered or unexported fields
}
func (*RouteServe) MiddlewareCall ¶
func (t *RouteServe) MiddlewareCall(mr *middlewares.MiddlewareResponse, r *http.Request)
Click to show internal directories.
Click to hide internal directories.