Documentation ¶
Index ¶
- func GetBuffer() *bytes.Buffer
- func NewStaticHandler() http.HandlerFunc
- func PutBuffer(buf *bytes.Buffer)
- func SetMaxMultipartMemory(max int64)
- type Context
- func (own *Context) GetFormValue(key string) string
- func (own *Context) GetHeader(key string) string
- func (own *Context) GetMethod() string
- func (own *Context) GetMultipartFormValue(key string) string
- func (own *Context) GetPathValue(name string) string
- func (own *Context) GetPostFormValue(key string) string
- func (own *Context) GetQueryValue(key string) string
- func (own *Context) GetRequest() *http.Request
- func (own *Context) GetResponse() http.ResponseWriter
- func (own *Context) GetURL() *url.URL
- func (own *Context) ReadJson(data any) error
- func (own *Context) ResponseFile(filename string)
- func (own *Context) ResponseHTML(filename, tmplname string, data any)
- func (own *Context) ResponseJSON(code int, data any)
- func (own *Context) ResponseSSE(sse func() <-chan []byte)
- func (own *Context) ResponseUpgrade(upgrade func(conn net.Conn))
- func (own *Context) WithContext(ctx context.Context) *Context
- func (own *Context) WithHeader(key, value string) *Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStaticHandler ¶
func NewStaticHandler() http.HandlerFunc
func SetMaxMultipartMemory ¶
func SetMaxMultipartMemory(max int64)
Types ¶
type Context ¶
type Context struct { StatusCode int // contains filtered or unexported fields }
func NewContext ¶
func NewContext(resp http.ResponseWriter, req *http.Request) *Context
func (*Context) GetFormValue ¶
func (*Context) GetMultipartFormValue ¶
func (*Context) GetPathValue ¶
func (*Context) GetPostFormValue ¶
func (*Context) GetQueryValue ¶
func (*Context) GetRequest ¶
func (*Context) GetResponse ¶
func (own *Context) GetResponse() http.ResponseWriter
func (*Context) ResponseFile ¶
func (*Context) ResponseHTML ¶
func (*Context) ResponseJSON ¶
func (*Context) ResponseSSE ¶
func (*Context) ResponseUpgrade ¶
func (*Context) WithHeader ¶
Click to show internal directories.
Click to hide internal directories.