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 OKHttp
- func (l *OKHttp) DELETE(relativePath string, handlers ...HandlerFunc)
- func (l *OKHttp) GET(relativePath string, handlers ...HandlerFunc)
- func (l *OKHttp) GetGinRoute() *gin.Engine
- func (l *OKHttp) Group(relativePath string, handlers ...HandlerFunc)
- func (l *OKHttp) LMHttpHandler(handlerFunc HandlerFunc) gin.HandlerFunc
- func (l *OKHttp) POST(relativePath string, handlers ...HandlerFunc)
- func (l *OKHttp) Run(addr ...string) error
- func (l *OKHttp) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (l *OKHttp) Static(relativePath string, root string)
- func (l *OKHttp) 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 OKHttp ¶
type OKHttp struct {
// contains filtered or unexported fields
}
func (*OKHttp) DELETE ¶
func (l *OKHttp) DELETE(relativePath string, handlers ...HandlerFunc)
DELETE DELETE
func (*OKHttp) Group ¶
func (l *OKHttp) Group(relativePath string, handlers ...HandlerFunc)
Group Group
func (*OKHttp) LMHttpHandler ¶
func (l *OKHttp) LMHttpHandler(handlerFunc HandlerFunc) gin.HandlerFunc
LMHttpHandler LMHttpHandler
Click to show internal directories.
Click to hide internal directories.