response

package
v0.26.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapter

func Adapter(h HandlerFunc) http.HandlerFunc

Types

type Context

type Context struct {
	Writer  http.ResponseWriter
	Request *http.Request
}

func FromRequest

func FromRequest(r *http.Request) *Context

func New

func (*Context) AbortWithJSON

func (c *Context) AbortWithJSON(status int, obj interface{})

func (*Context) AbortWithString

func (c *Context) AbortWithString(status int, s string)

func (*Context) Data

func (c *Context) Data(status int, contentType string, data []byte)

func (*Context) DefaultQuery

func (c *Context) DefaultQuery(key, def string) string

func (*Context) Flush

func (c *Context) Flush()

func (*Context) FormFile

func (c *Context) FormFile(key string) (*multipart.FileHeader, error)

func (*Context) GetHeader

func (c *Context) GetHeader(key string) string

func (*Context) GetString

func (c *Context) GetString(key string) string

func (*Context) Header

func (c *Context) Header(key, value string)

func (*Context) JSON

func (c *Context) JSON(status int, obj interface{})

func (*Context) Param

func (c *Context) Param(key string) string

func (*Context) PostForm

func (c *Context) PostForm(key string) string

func (*Context) Query

func (c *Context) Query(key string) string

func (*Context) Redirect

func (c *Context) Redirect(code int, url string)

func (*Context) Reset

func (c *Context) Reset()

func (*Context) SSEvent

func (c *Context) SSEvent(name string, data interface{})

func (*Context) ShouldBind

func (c *Context) ShouldBind(obj interface{}) error

func (*Context) ShouldBindJSON

func (c *Context) ShouldBindJSON(obj interface{}) error

func (*Context) ShouldBindQuery

func (c *Context) ShouldBindQuery(obj interface{}) error

func (*Context) Status

func (c *Context) Status(status int) *Context

func (*Context) String

func (c *Context) String(status int, s string)

type ContextKey

type ContextKey struct{}

type H

type H map[string]interface{}

type HandlerFunc

type HandlerFunc func(*Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL