Versions in this module Expand all Collapse all v0 v0.1.0 Jun 21, 2015 Changes in this version + const AbortIndex + const AuthUserKey + const DebugMode + const ENV_GIN_MODE + const MIMEHTML + const MIMEJSON + const MIMEMultipartPOSTForm + const MIMEPOSTForm + const MIMEPlain + const MIMEXML + const MIMEXML2 + const ReleaseMode + const TestMode + const Version + var DefaultWriter io.Writer = colorable.NewColorableStdout() + func Dir(root string, listDirectory bool) http.FileSystem + func DisableBindValidation() + func IsDebugging() bool + func Mode() string + func SetMode(value string) + type Accounts map[string]string + type Context struct + Accepted []string + Errors errorMsgs + Keys map[string]interface{} + Params Params + Request *http.Request + Writer ResponseWriter + func (c *Context) Abort() + func (c *Context) AbortWithError(code int, err error) *Error + func (c *Context) AbortWithStatus(code int) + func (c *Context) Bind(obj interface{}) error + func (c *Context) BindJSON(obj interface{}) error + func (c *Context) BindWith(obj interface{}, b binding.Binding) error + func (c *Context) ClientIP() string + func (c *Context) ContentType() string + func (c *Context) Copy() *Context + func (c *Context) Data(code int, contentType string, data []byte) + func (c *Context) Deadline() (deadline time.Time, ok bool) + func (c *Context) DefaultPostForm(key, defaultValue string) string + func (c *Context) DefaultQuery(key, defaultValue string) string + func (c *Context) Done() <-chan struct{} + func (c *Context) Err() error + func (c *Context) Error(err error) *Error + func (c *Context) File(filepath string) + func (c *Context) Get(key string) (value interface{}, exists bool) + func (c *Context) HTML(code int, name string, obj interface{}) + func (c *Context) Header(key, value string) + func (c *Context) IndentedJSON(code int, obj interface{}) + func (c *Context) IsAborted() bool + func (c *Context) JSON(code int, obj interface{}) + func (c *Context) MustGet(key string) interface{} + func (c *Context) Negotiate(code int, config Negotiate) + func (c *Context) NegotiateFormat(offered ...string) string + func (c *Context) Next() + func (c *Context) Param(key string) string + func (c *Context) PostForm(key string) (va string) + func (c *Context) Query(key string) (va string) + func (c *Context) Redirect(code int, location string) + func (c *Context) Render(code int, r render.Render) + func (c *Context) SSEvent(name string, message interface{}) + func (c *Context) Set(key string, value interface{}) + func (c *Context) SetAccepted(formats ...string) + func (c *Context) Stream(step func(w io.Writer) bool) + func (c *Context) String(code int, format string, values ...interface{}) + func (c *Context) Value(key interface{}) interface{} + func (c *Context) XML(code int, obj interface{}) + type Engine struct + ForwardedByClientIP bool + HTMLRender render.HTMLRender + HandleMethodNotAllowed bool + RedirectFixedPath bool + RedirectTrailingSlash bool + func Default() *Engine + func New() *Engine + func (engine *Engine) LoadHTMLFiles(files ...string) + func (engine *Engine) LoadHTMLGlob(pattern string) + func (engine *Engine) NoMethod(handlers ...HandlerFunc) + func (engine *Engine) NoRoute(handlers ...HandlerFunc) + func (engine *Engine) Run(addr string) (err error) + func (engine *Engine) RunTLS(addr string, certFile string, keyFile string) (err error) + func (engine *Engine) RunUnix(file string) (err error) + func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (engine *Engine) SetHTMLTemplate(templ *template.Template) + func (engine *Engine) Use(middlewares ...HandlerFunc) + type Error struct + Err error + Meta interface{} + Type ErrorType + func (msg *Error) Error() string + func (msg *Error) JSON() interface{} + func (msg *Error) MarshalJSON() ([]byte, error) + func (msg *Error) SetMeta(data interface{}) *Error + func (msg *Error) SetType(flags ErrorType) *Error + type ErrorType uint64 + const ErrorTypeAny + const ErrorTypeBind + const ErrorTypeNu + const ErrorTypePrivate + const ErrorTypePublic + const ErrorTypeRender + type H map[string]interface + func (h H) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type HandlerFunc func(*Context) + func BasicAuth(accounts Accounts) HandlerFunc + func BasicAuthForRealm(accounts Accounts, realm string) HandlerFunc + func ErrorLogger() HandlerFunc + func ErrorLoggerT(typ ErrorType) HandlerFunc + func Logger() HandlerFunc + func LoggerWithWriter(out io.Writer) HandlerFunc + func Recovery() HandlerFunc + func RecoveryWithWriter(out io.Writer) HandlerFunc + func WrapF(f http.HandlerFunc) HandlerFunc + func WrapH(h http.Handler) HandlerFunc + type HandlersChain []HandlerFunc + type Negotiate struct + Data interface{} + HTMLData interface{} + HTMLName string + JSONData interface{} + Offered []string + XMLData interface{} + type Param struct + Key string + Value string + type Params []Param + func (ps Params) ByName(name string) (va string) + func (ps Params) Get(name string) (string, bool) + type ResponseWriter interface + Size func() int + Status func() int + WriteHeaderNow func() + WriteString func(string) (int, error) + Written func() bool + type RouterGroup struct + BasePath string + Handlers HandlersChain + func (group *RouterGroup) Any(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) DELETE(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) GET(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *RouterGroup + func (group *RouterGroup) HEAD(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) OPTIONS(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) PATCH(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) POST(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) PUT(relativePath string, handlers ...HandlerFunc) + func (group *RouterGroup) Static(relativePath, root string) + func (group *RouterGroup) StaticFS(relativePath string, fs http.FileSystem) + func (group *RouterGroup) StaticFile(relativePath, filepath string) + func (group *RouterGroup) Use(middlewares ...HandlerFunc)