Documentation ¶
Index ¶
- func NewRouter(controller *ctrl.Controller, enableCors bool) *mux.Router
- type Context
- func (c *Context) Form(name string) string
- func (c *Context) Get(key string) interface{}
- func (c *Context) JSON(code int, v interface{}) error
- func (c *Context) JSONP(code int, callback string, v interface{}) error
- func (c *Context) Query(name string) string
- func (c *Context) Request() *http.Request
- func (c *Context) Response() *Response
- func (c *Context) Set(key string, v interface{})
- func (c *Context) WriteHeader(code int)
- type Dispatcher
- type Response
- func (r *Response) Flush()
- func (r *Response) Header() http.Header
- func (r *Response) SetWriter(w http.ResponseWriter)
- func (r *Response) Size() int64
- func (r *Response) Status() int
- func (r *Response) Write(b []byte) (int, error)
- func (r *Response) WriteHeader(code int)
- func (r *Response) Writer() http.ResponseWriter
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { context.Context ID string Controller *ctrl.Controller // contains filtered or unexported fields }
func NewContext ¶
func NewContext(w http.ResponseWriter, r *http.Request, controller *ctrl.Controller) *Context
func (*Context) WriteHeader ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func (*Dispatcher) ServeHTTP ¶
func (dispatcher *Dispatcher) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*Dispatcher) SetHandler ¶
func (dispatcher *Dispatcher) SetHandler(handler http.Handler)
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewResponse ¶
func NewResponse(w http.ResponseWriter) *Response
func (*Response) SetWriter ¶
func (r *Response) SetWriter(w http.ResponseWriter)
func (*Response) WriteHeader ¶
func (*Response) Writer ¶
func (r *Response) Writer() http.ResponseWriter
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenHosts ¶
func (*Server) SetHandler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.