Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() interfaces.IRouter
Types ¶
type Function ¶
type Function struct { // route function name. Name string // route method, also is HTTP method, // 'MethodType' defined in method.go. Method MethodType // url of route. Url string // receiver of the Controller method. Recv reflect.Value // dto will be automatically instantiated according to the body // in json format. Dto reflect.Value }
Function is used to register route
type MethodType ¶
type MethodType int
const ( Unknown MethodType = iota GET POST PUT DELETE PATCH OPTIONS HEAD )
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) AddControllers ¶
func (r *Router) AddControllers(controllers []interface{})
func (*Router) Handle ¶
func (r *Router) Handle(c interfaces.IContext, i interfaces.IInjector)
Click to show internal directories.
Click to hide internal directories.