Documentation
¶
Index ¶
- Variables
- type Body
- type BodyInterface
- type Error
- type ErrorInterface
- type HandlerCaller
- type HandlerWrapper
- type Headers
- type HeadersInterface
- type IRouter
- type IRoutes
- type Middleware
- type MiddlewareFactory
- type Query
- type QueryInterface
- type Response
- type ResponseInterface
- type Router
- func (g *Router) Any(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) DELETE(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (r *Router) Engine() http.Handler
- func (g *Router) GET(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) Group(prefix string, _ ...*docs.PathDoc) IRouter
- func (g *Router) HEAD(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) Handle(method string, path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) OPTIONS(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) PATCH(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) POST(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) PUT(path string, handler interface{}, doc ...*docs.PathDoc) IRoutes
- func (g *Router) RawRouter() gin.IRouter
- func (r *Router) Run(addr string) error
- func (g *Router) Use(middleware Middleware) IRoutes
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFound = fmt.Errorf("resource not found")
Functions ¶
This section is empty.
Types ¶
type BodyInterface ¶
type BodyInterface interface {
BodyDocs()
}
type ErrorInterface ¶
type ErrorInterface interface {
ErrorDocs()
}
type HandlerCaller ¶
type HandlerCaller struct {
// contains filtered or unexported fields
}
func NewHandlerCaller ¶
func NewHandlerCaller(receiver reflect.Value) *HandlerCaller
type HandlerWrapper ¶
type HandlerWrapper struct {
// contains filtered or unexported fields
}
func WrapHandler ¶
func WrapHandler(method string, path string, middlewares []Middleware, documentation *docs.Docs, handler interface{}, doc ...*docs.PathDoc) *HandlerWrapper
type HeadersInterface ¶
type HeadersInterface interface {
HeadersDocs()
}
type IRoutes ¶
type IRoutes interface {
Use(Middleware) IRoutes
Handle(string, string, interface{}, ...*docs.PathDoc) IRoutes
Any(string, interface{}, ...*docs.PathDoc) IRoutes
GET(string, interface{}, ...*docs.PathDoc) IRoutes
POST(string, interface{}, ...*docs.PathDoc) IRoutes
DELETE(string, interface{}, ...*docs.PathDoc) IRoutes
PATCH(string, interface{}, ...*docs.PathDoc) IRoutes
PUT(string, interface{}, ...*docs.PathDoc) IRoutes
OPTIONS(string, interface{}, ...*docs.PathDoc) IRoutes
HEAD(string, interface{}, ...*docs.PathDoc) IRoutes
}
type Middleware ¶
type Middleware struct {
Before interface{}
After interface{}
}
type MiddlewareFactory ¶
type MiddlewareFactory func() Middleware
type QueryInterface ¶
type QueryInterface interface {
QueryDocs()
}
type Response ¶
type Response struct{}
func (Response) ResponseDocs ¶
func (m Response) ResponseDocs()
type ResponseInterface ¶
type ResponseInterface interface {
ResponseDocs()
}
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Use ¶
func (g *Router) Use(middleware Middleware) IRoutes
Source Files
¶
Click to show internal directories.
Click to hide internal directories.