Versions in this module Expand all Collapse all v1 v1.0.0 Apr 18, 2018 Changes in this version + const MIME_FORM + const MIME_HTML + const MIME_JSON + const MIME_MULTIPART_FORM + const MIME_XML + const MIME_XML2 + var Methods = []string + func MethodNotAllowedHandler(c *Context) error + func NotFoundHandler(*Context) error + func ReadFormData(form map[string][]string, data interface{}) error + type Context struct + Request *http.Request + Response http.ResponseWriter + func NewContext(res http.ResponseWriter, req *http.Request, handlers ...Handler) *Context + func (c *Context) Abort() + func (c *Context) DelCookie(name string) + func (c *Context) Error(err error) + func (c *Context) Form(key string, defaultValue ...string) string + func (c *Context) Get(name string) interface{} + func (c *Context) GetCookieValue(name string) string + func (c *Context) HTML(content string) error + func (c *Context) IsAjax() bool + func (c *Context) IsGet() bool + func (c *Context) IsPost() bool + func (c *Context) JSON(data interface{}) (err error) + func (c *Context) Next() error + func (c *Context) Param(name string) string + func (c *Context) PostForm(key string, defaultValue ...string) string + func (c *Context) Query(name string, defaultValue ...string) string + func (c *Context) Read(data interface{}) error + func (c *Context) Redirect(uri string) + func (c *Context) Render(name string, data interface{}) error + func (c *Context) RenderFile(name string, data interface{}) error + func (c *Context) RequestBody() ([]byte, error) + func (c *Context) RequestIP() string + func (c *Context) Router() *Router + func (c *Context) Set(name string, value interface{}) + func (c *Context) SetCookieValue(name string, value string, expire time.Time) + func (c *Context) SetDataWriter(writer DataWriter) + func (c *Context) SetParam(name, value string) + func (c *Context) Text(content string) error + func (c *Context) URL(route string, pairs ...interface{}) string + func (c *Context) Write(data interface{}) error + type DataReader interface + Read func(*http.Request, interface{}) error + var DataReaders = map[string]DataReader{ ... } + var DefaultFormDataReader DataReader = &FormDataReader{} + type DataWriter interface + SetHeader func(http.ResponseWriter) + Write func(http.ResponseWriter, interface{}) error + var DefaultDataWriter DataWriter = &dataWriter{} + type ErrorHandler func(*Context, error) + type FormDataReader struct + func (r *FormDataReader) Read(req *http.Request, data interface{}) error + type HTTPError interface + StatusCode func() int + func NewHTTPError(status int, message ...string) HTTPError + type Handler func(*Context) error + func HTTPHandler(h http.Handler) Handler + func HTTPHandlerFunc(h http.HandlerFunc) Handler + func Logger(writer io.Writer) Handler + func Panic(writer io.Writer) Handler + type JSONDataReader struct + func (r *JSONDataReader) Read(req *http.Request, data interface{}) error + type LogResponseWriter struct + BytesWritten int64 + Status int + func (r *LogResponseWriter) Write(p []byte) (int, error) + func (r *LogResponseWriter) WriteHeader(status int) + type M map[string]interface + type Render interface + Init func() error + Render func(out io.Writer, name string, data interface{}) error + RenderFile func(out io.Writer, name string, data interface{}) error + type Route struct + func (r *Route) Connect(handlers ...Handler) *Route + func (r *Route) Delete(handlers ...Handler) *Route + func (r *Route) Get(handlers ...Handler) *Route + func (r *Route) Head(handlers ...Handler) *Route + func (r *Route) Method() string + func (r *Route) Name(name string) *Route + func (r *Route) Options(handlers ...Handler) *Route + func (r *Route) Patch(handlers ...Handler) *Route + func (r *Route) Path() string + func (r *Route) Post(handlers ...Handler) *Route + func (r *Route) Put(handlers ...Handler) *Route + func (r *Route) String() string + func (r *Route) Tag(value interface{}) *Route + func (r *Route) Tags() []interface{} + func (r *Route) To(methods string, handlers ...Handler) *Route + func (r *Route) Trace(handlers ...Handler) *Route + func (r *Route) URL(pairs ...interface{}) (s string) + type RouteGroup struct + func (rg *RouteGroup) Any(path string, handlers ...Handler) *Route + func (rg *RouteGroup) CONNECT(path string, handlers ...Handler) *Route + func (rg *RouteGroup) DELETE(path string, handlers ...Handler) *Route + func (rg *RouteGroup) File(path string, filePath string) *Route + func (rg *RouteGroup) GET(path string, handlers ...Handler) *Route + func (rg *RouteGroup) Group(prefix string, handlers ...Handler) *RouteGroup + func (rg *RouteGroup) HEAD(path string, handlers ...Handler) *Route + func (rg *RouteGroup) OPTIONS(path string, handlers ...Handler) *Route + func (rg *RouteGroup) PATCH(path string, handlers ...Handler) *Route + func (rg *RouteGroup) POST(path string, handlers ...Handler) *Route + func (rg *RouteGroup) PUT(path string, handlers ...Handler) *Route + func (rg *RouteGroup) Static(path string, dir string) *Route + func (rg *RouteGroup) TRACE(path string, handlers ...Handler) *Route + func (rg *RouteGroup) To(methods, path string, handlers ...Handler) *Route + func (rg *RouteGroup) Use(handlers ...Handler) + type Router struct + IgnoreTrailingSlash bool + OnError ErrorHandler + Render Render + func Default() *Router + func New() *Router + func (r *Router) NotFound(handlers ...Handler) + func (r *Router) Route(name string) *Route + func (r *Router) Routes() []*Route + func (r *Router) Run(addr string) error + func (r *Router) ServeHTTP(res http.ResponseWriter, req *http.Request) + func (r *Router) Use(handlers ...Handler) + type ViewRender struct + func NewViewRender(config ViewRenderConfig) *ViewRender + func (r *ViewRender) Init() error + func (r *ViewRender) Render(out io.Writer, name string, data interface{}) error + func (r *ViewRender) RenderFile(out io.Writer, name string, data interface{}) error + type ViewRenderConfig struct + DisableCache bool + DisableFilePartial bool + Extension string + Funcs template.FuncMap + Master string + Partials []string + Root string + type XMLDataReader struct + func (r *XMLDataReader) Read(req *http.Request, data interface{}) error