Documentation
¶
Index ¶
- Constants
- type Dragon
- func (d *Dragon) Body(v interface{}) error
- func (d *Dragon) GetContext(key interface{}) interface{}
- func (d *Dragon) Next() error
- func (d *Dragon) ResponseJSON(statusCode int, v interface{}) error
- func (d *Dragon) ResponseStatus(statusCode int)
- func (d *Dragon) ResponseXML(statusCode int, v interface{}) error
- func (d *Dragon) SetContext(key interface{}, val interface{})
- type HandlerFunc
- type Router
Constants ¶
View Source
const ( PageNotFound = "page not found" MethodNotAllowed = "method not allowed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dragon ¶
type Dragon struct {
ResponseWriter http.ResponseWriter
Request *http.Request
Context context.Context
Params map[string]string
RequestHeader http.Header
ResponseHeader http.Header
Path string
Query url.Values
RemoteAddress string
}
func (*Dragon) GetContext ¶
func (d *Dragon) GetContext(key interface{}) interface{}
func (*Dragon) ResponseJSON ¶
func (*Dragon) ResponseStatus ¶
func (*Dragon) ResponseXML ¶
func (*Dragon) SetContext ¶
func (d *Dragon) SetContext(key interface{}, val interface{})
type HandlerFunc ¶
type Router ¶
type Router interface {
GET(address string, handlerFunc HandlerFunc)
POST(address string, handlerFunc HandlerFunc)
Run(address string) error
Group(address string) router
Use(middleware ...HandlerFunc)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.