Documentation ¶
Index ¶
- Variables
- type Context
- func (c *Context) Abort(err Error)
- func (c *Context) AbortWithCode(code int, err Error)
- func (c *Context) AbortWithError(statusCode int, err Error)
- func (c *Context) BadRequest(err Error)
- func (c *Context) Conflict(err Error)
- func (c *Context) Created()
- func (c *Context) JSON(data interface{})
- func (c *Context) NotFound(err Error)
- func (c *Context) NotModified()
- func (c *Context) OK()
- func (c *Context) ParseBody(obj interface{}) error
- func (c *Context) Unauthorized(err Error)
- func (c *Context) Unprocessable(err Error)
- type ErrCode
- type Error
- type Group
- func (g *Group) Any(path string, handlers ...HandlerFunc)
- func (g *Group) DELETE(path string, handlers ...HandlerFunc)
- func (g *Group) GET(path string, handlers ...HandlerFunc)
- func (g *Group) Group(path string, handlers ...HandlerFunc) *Group
- func (g *Group) HEAD(path string, handlers ...HandlerFunc)
- func (g *Group) OPTIONS(path string, handlers ...HandlerFunc)
- func (g *Group) PATCH(path string, handlers ...HandlerFunc)
- func (g *Group) POST(path string, handlers ...HandlerFunc)
- func (g *Group) PUT(path string, handlers ...HandlerFunc)
- type HandlerFunc
- type Router
- func (r *Router) Any(path string, handlers ...HandlerFunc)
- func (r *Router) DELETE(path string, handlers ...HandlerFunc)
- func (r *Router) GET(path string, handlers ...HandlerFunc)
- func (r *Router) Group(path string, handlers ...HandlerFunc) *Group
- func (r *Router) HEAD(path string, handlers ...HandlerFunc)
- func (r *Router) Handle(method, path string, handlers ...HandlerFunc)
- func (r *Router) OPTIONS(path string, handlers ...HandlerFunc)
- func (r *Router) PATCH(path string, handlers ...HandlerFunc)
- func (r *Router) POST(path string, handlers ...HandlerFunc)
- func (r *Router) PUT(path string, handlers ...HandlerFunc)
- func (r *Router) Start(addr string) error
- func (r *Router) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFailedToStopServer = errors.New("failed to stop the server")
)
Functions ¶
This section is empty.
Types ¶
type Context ¶
func (*Context) AbortWithCode ¶ added in v0.12.0
func (*Context) AbortWithError ¶
func (*Context) BadRequest ¶
func (*Context) NotModified ¶ added in v0.16.0
func (c *Context) NotModified()
func (*Context) Unauthorized ¶ added in v0.16.0
func (*Context) Unprocessable ¶ added in v0.13.0
type Error ¶
type Group ¶
type Group struct {
*gin.RouterGroup
}
func (*Group) Any ¶
func (g *Group) Any(path string, handlers ...HandlerFunc)
func (*Group) DELETE ¶
func (g *Group) DELETE(path string, handlers ...HandlerFunc)
func (*Group) GET ¶
func (g *Group) GET(path string, handlers ...HandlerFunc)
func (*Group) HEAD ¶
func (g *Group) HEAD(path string, handlers ...HandlerFunc)
func (*Group) OPTIONS ¶
func (g *Group) OPTIONS(path string, handlers ...HandlerFunc)
func (*Group) PATCH ¶
func (g *Group) PATCH(path string, handlers ...HandlerFunc)
func (*Group) POST ¶
func (g *Group) POST(path string, handlers ...HandlerFunc)
func (*Group) PUT ¶
func (g *Group) PUT(path string, handlers ...HandlerFunc)
type HandlerFunc ¶
type HandlerFunc func(*Context)
type Router ¶
func (*Router) Any ¶
func (r *Router) Any(path string, handlers ...HandlerFunc)
func (*Router) DELETE ¶
func (r *Router) DELETE(path string, handlers ...HandlerFunc)
func (*Router) GET ¶
func (r *Router) GET(path string, handlers ...HandlerFunc)
func (*Router) HEAD ¶
func (r *Router) HEAD(path string, handlers ...HandlerFunc)
func (*Router) Handle ¶ added in v0.16.0
func (r *Router) Handle(method, path string, handlers ...HandlerFunc)
func (*Router) OPTIONS ¶
func (r *Router) OPTIONS(path string, handlers ...HandlerFunc)
func (*Router) PATCH ¶
func (r *Router) PATCH(path string, handlers ...HandlerFunc)
func (*Router) POST ¶
func (r *Router) POST(path string, handlers ...HandlerFunc)
func (*Router) PUT ¶
func (r *Router) PUT(path string, handlers ...HandlerFunc)
Click to show internal directories.
Click to hide internal directories.