Documentation ¶
Index ¶
- type Context
- func (c *Context) CopyRequestHeader(request *http.Request) map[string]string
- func (c *Context) Forward(url string)
- func (c *Context) ForwardWithBody(url string, body []byte)
- func (c *Context) ResponseData(status int, data interface{})
- func (c *Context) ResponseError(err error)
- func (c *Context) ResponseOK()
- func (c *Context) ResponseOKWithData(data interface{})
- func (c *Context) ResponseStatus(status int)
- type HandlerFunc
- type WKHttp
- func (l *WKHttp) DELETE(relativePath string, handlers ...HandlerFunc)
- func (l *WKHttp) GET(relativePath string, handlers ...HandlerFunc)
- func (l *WKHttp) GetGinRoute() *gin.Engine
- func (l *WKHttp) Group(relativePath string, handlers ...HandlerFunc)
- func (l *WKHttp) LMHttpHandler(handlerFunc HandlerFunc) gin.HandlerFunc
- func (l *WKHttp) POST(relativePath string, handlers ...HandlerFunc)
- func (l *WKHttp) Run(addr ...string) error
- func (l *WKHttp) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (l *WKHttp) Static(relativePath string, root string)
- func (l *WKHttp) Use(handlers ...HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
func (*Context) CopyRequestHeader ¶
CopyRequestHeader 复制request的header参数
func (*Context) ForwardWithBody ¶
ForwardWithBody 转发请求
func (*Context) ResponseData ¶
ResponseData 返回状态和数据
func (*Context) ResponseError ¶
ResponseError ResponseError
func (*Context) ResponseOKWithData ¶
func (c *Context) ResponseOKWithData(data interface{})
ResponseOKWithData 返回正确并并携带数据
type WKHttp ¶
type WKHttp struct {
// contains filtered or unexported fields
}
func (*WKHttp) DELETE ¶
func (l *WKHttp) DELETE(relativePath string, handlers ...HandlerFunc)
DELETE DELETE
func (*WKHttp) Group ¶
func (l *WKHttp) Group(relativePath string, handlers ...HandlerFunc)
Group Group
func (*WKHttp) LMHttpHandler ¶
func (l *WKHttp) LMHttpHandler(handlerFunc HandlerFunc) gin.HandlerFunc
LMHttpHandler LMHttpHandler
Click to show internal directories.
Click to hide internal directories.