Documentation ¶
Index ¶
- type DefaultRouterBuilder
- func (router *DefaultRouterBuilder) Any(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) CONNECT(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) DELETE(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) GET(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) GetConfiguration() abstractions.IConfiguration
- func (router *DefaultRouterBuilder) GetMvcBuilder() *mvc.ControllerBuilder
- func (router *DefaultRouterBuilder) Group(name string, routerBuilderFunc func(router *RouterGroup))
- func (router *DefaultRouterBuilder) HEAD(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) IsMvc() bool
- func (router *DefaultRouterBuilder) Map(method string, path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) MapSet(method, path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) OPTIONS(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) PATCH(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) POST(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) PUT(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) Search(ctx *context.HttpContext, components []string, params url.Values) func(ctx *context.HttpContext)
- func (router *DefaultRouterBuilder) SetConfiguration(config abstractions.IConfiguration)
- func (router *DefaultRouterBuilder) TRACE(path string, handler func(ctx *context.HttpContext))
- func (router *DefaultRouterBuilder) UseMvc(used bool)
- type EndPointRouterHandler
- type IRouterBuilder
- type RouterGroup
- func (group *RouterGroup) Any(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) CONNECT(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) DELETE(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) GET(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) HEAD(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) Map(method string, path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) OPTIONS(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) PATCH(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) POST(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) PUT(path string, handler func(ctx *context.HttpContext))
- func (group *RouterGroup) TRACE(path string, handler func(ctx *context.HttpContext))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultRouterBuilder ¶
type DefaultRouterBuilder struct {
// contains filtered or unexported fields
}
func (*DefaultRouterBuilder) Any ¶
func (router *DefaultRouterBuilder) Any(path string, handler func(ctx *context.HttpContext))
Any register any method handler
func (*DefaultRouterBuilder) CONNECT ¶
func (router *DefaultRouterBuilder) CONNECT(path string, handler func(ctx *context.HttpContext))
CONNECT register CONNECT request handler
func (*DefaultRouterBuilder) DELETE ¶
func (router *DefaultRouterBuilder) DELETE(path string, handler func(ctx *context.HttpContext))
DELETE register DELETE request handler
func (*DefaultRouterBuilder) GET ¶
func (router *DefaultRouterBuilder) GET(path string, handler func(ctx *context.HttpContext))
GET register GET request handler
func (*DefaultRouterBuilder) GetConfiguration ¶
func (router *DefaultRouterBuilder) GetConfiguration() abstractions.IConfiguration
func (*DefaultRouterBuilder) GetMvcBuilder ¶
func (router *DefaultRouterBuilder) GetMvcBuilder() *mvc.ControllerBuilder
func (*DefaultRouterBuilder) Group ¶
func (router *DefaultRouterBuilder) Group(name string, routerBuilderFunc func(router *RouterGroup))
func (*DefaultRouterBuilder) HEAD ¶
func (router *DefaultRouterBuilder) HEAD(path string, handler func(ctx *context.HttpContext))
HEAD register HEAD request handler
func (*DefaultRouterBuilder) IsMvc ¶
func (router *DefaultRouterBuilder) IsMvc() bool
func (*DefaultRouterBuilder) Map ¶
func (router *DefaultRouterBuilder) Map(method string, path string, handler func(ctx *context.HttpContext))
func (*DefaultRouterBuilder) MapSet ¶
func (router *DefaultRouterBuilder) MapSet(method, path string, handler func(ctx *context.HttpContext))
func (*DefaultRouterBuilder) OPTIONS ¶
func (router *DefaultRouterBuilder) OPTIONS(path string, handler func(ctx *context.HttpContext))
OPTIONS register OPTIONS request handler
func (*DefaultRouterBuilder) PATCH ¶
func (router *DefaultRouterBuilder) PATCH(path string, handler func(ctx *context.HttpContext))
PATCH register PATCH request HandlerFunc
func (*DefaultRouterBuilder) POST ¶
func (router *DefaultRouterBuilder) POST(path string, handler func(ctx *context.HttpContext))
POST register POST request handler
func (*DefaultRouterBuilder) PUT ¶
func (router *DefaultRouterBuilder) PUT(path string, handler func(ctx *context.HttpContext))
PUT register PUT request handler
func (*DefaultRouterBuilder) Search ¶
func (router *DefaultRouterBuilder) Search(ctx *context.HttpContext, components []string, params url.Values) func(ctx *context.HttpContext)
func (*DefaultRouterBuilder) SetConfiguration ¶
func (router *DefaultRouterBuilder) SetConfiguration(config abstractions.IConfiguration)
func (*DefaultRouterBuilder) TRACE ¶
func (router *DefaultRouterBuilder) TRACE(path string, handler func(ctx *context.HttpContext))
TRACE register TRACE request handler
func (*DefaultRouterBuilder) UseMvc ¶
func (router *DefaultRouterBuilder) UseMvc(used bool)
type EndPointRouterHandler ¶
type EndPointRouterHandler struct { Component string Methods map[string]func(ctx *context.HttpContext) // contains filtered or unexported fields }
EndPointRouterHandler node.
func (*EndPointRouterHandler) Insert ¶
func (t *EndPointRouterHandler) Insert(method, path string, handler func(ctx *context.HttpContext))
Insert a node into the tree.
func (*EndPointRouterHandler) Invoke ¶
func (endPoint *EndPointRouterHandler) Invoke(ctx *context.HttpContext, pathComponents []string) func(ctx *context.HttpContext)
type IRouterBuilder ¶
type IRouterBuilder interface { IsMvc() bool UseMvc(used bool) GetMvcBuilder() *mvc.ControllerBuilder Map(method string, path string, handler func(ctx *context.HttpContext)) Search(ctx *context.HttpContext, components []string, params url.Values) func(ctx *context.HttpContext) // GET register GET request handler GET(path string, handler func(ctx *context.HttpContext)) // HEAD register HEAD request handler HEAD(path string, handler func(ctx *context.HttpContext)) // OPTIONS register OPTIONS request handler OPTIONS(path string, handler func(ctx *context.HttpContext)) // POST register POST request handler POST(path string, handler func(ctx *context.HttpContext)) // PUT register PUT request handler PUT(path string, handler func(ctx *context.HttpContext)) // PATCH register PATCH request HandlerFunc PATCH(path string, handler func(ctx *context.HttpContext)) // DELETE register DELETE request handler DELETE(path string, handler func(ctx *context.HttpContext)) // CONNECT register CONNECT request handler CONNECT(path string, handler func(ctx *context.HttpContext)) // TRACE register TRACE request handler TRACE(path string, handler func(ctx *context.HttpContext)) // Any register any method handler Any(path string, handler func(ctx *context.HttpContext)) Group(name string, routerBuilderFunc func(router *RouterGroup)) SetConfiguration(config abstractions.IConfiguration) GetConfiguration() abstractions.IConfiguration }
func NewRouterBuilder ¶
func NewRouterBuilder() IRouterBuilder
type RouterGroup ¶
type RouterGroup struct { Name string RouterHandler IRouterBuilder }
func (*RouterGroup) Any ¶
func (group *RouterGroup) Any(path string, handler func(ctx *context.HttpContext))
Any register any method handler
func (*RouterGroup) CONNECT ¶
func (group *RouterGroup) CONNECT(path string, handler func(ctx *context.HttpContext))
CONNECT register CONNECT request handler
func (*RouterGroup) DELETE ¶
func (group *RouterGroup) DELETE(path string, handler func(ctx *context.HttpContext))
DELETE register DELETE request handler
func (*RouterGroup) GET ¶
func (group *RouterGroup) GET(path string, handler func(ctx *context.HttpContext))
GET register GET request handler
func (*RouterGroup) HEAD ¶
func (group *RouterGroup) HEAD(path string, handler func(ctx *context.HttpContext))
HEAD register HEAD request handler
func (*RouterGroup) Map ¶
func (group *RouterGroup) Map(method string, path string, handler func(ctx *context.HttpContext))
func (*RouterGroup) OPTIONS ¶
func (group *RouterGroup) OPTIONS(path string, handler func(ctx *context.HttpContext))
OPTIONS register OPTIONS request handler
func (*RouterGroup) PATCH ¶
func (group *RouterGroup) PATCH(path string, handler func(ctx *context.HttpContext))
PATCH register PATCH request HandlerFunc
func (*RouterGroup) POST ¶
func (group *RouterGroup) POST(path string, handler func(ctx *context.HttpContext))
POST register POST request handler
func (*RouterGroup) PUT ¶
func (group *RouterGroup) PUT(path string, handler func(ctx *context.HttpContext))
PUT register PUT request handler
func (*RouterGroup) TRACE ¶
func (group *RouterGroup) TRACE(path string, handler func(ctx *context.HttpContext))
TRACE register TRACE request handler