Documentation ¶
Index ¶
- type Context
- func (c *Context) Abort()
- func (c *Context) AbortWithError(code int, err error) error
- func (c *Context) AbortWithStatus(code int)
- func (c *Context) AbortWithStatusJSON(code int, jsonObj any)
- func (c *Context) AddParam(key, value string)
- func (c *Context) Bind(obj any) error
- func (c *Context) BindHeader(obj any) error
- func (c *Context) BindJSON(obj any) error
- func (c *Context) BindQuery(obj any) error
- func (c *Context) BindTOML(obj any) error
- func (c *Context) BindUri(obj any) error
- func (c *Context) BindXML(obj any) error
- func (c *Context) BindYAML(obj any) error
- func (c *Context) ContentType() string
- func (c *Context) Context() context.Context
- func (c *Context) Cookie(name string) (string, error)
- func (c *Context) Copy() *Context
- func (c *Context) DefaultPostForm(key, defaultValue string) string
- func (c *Context) DefaultQuery(key, defaultValue string) string
- func (c *Context) Error(err error) error
- func (c *Context) FormFile(name string) (*multipart.FileHeader, error)
- func (c *Context) Get(key string) (value any, exists bool)
- func (c *Context) GetBool(key string) (b bool)
- func (c *Context) GetDuration(key string) (d time.Duration)
- func (c *Context) GetFloat64(key string) (f64 float64)
- func (c *Context) GetInt(key string) (i int)
- func (c *Context) GetInt64(key string) (i64 int64)
- func (c *Context) GetPostForm(key string) (string, bool)
- func (c *Context) GetPostFormArray(key string) (values []string, ok bool)
- func (c *Context) GetPostFormMap(key string) (map[string]string, bool)
- func (c *Context) GetQuery(key string) (string, bool)
- func (c *Context) GetQueryArray(key string) (values []string, ok bool)
- func (c *Context) GetQueryMap(key string) (map[string]string, bool)
- func (c *Context) GetString(key string) (s string)
- func (c *Context) GetStringMap(key string) (sm map[string]any)
- func (c *Context) GetStringMapString(key string) (sms map[string]string)
- func (c *Context) GetStringMapStringSlice(key string) (smss map[string][]string)
- func (c *Context) GetStringSlice(key string) (ss []string)
- func (c *Context) GetTime(key string) (t time.Time)
- func (c *Context) GetUint(key string) (ui uint)
- func (c *Context) GetUint64(key string) (ui64 uint64)
- func (c *Context) Header(key, value string)
- func (c *Context) IsWebsocket() bool
- func (c *Context) JSON(code int, obj any)
- func (c *Context) MultipartForm() (*multipart.Form, error)
- func (c *Context) MustBindWith(obj any, b binding.Binding) error
- func (c *Context) MustGet(key string) any
- func (c *Context) Param(key string) string
- func (c *Context) PostForm(key string) (value string)
- func (c *Context) PostFormArray(key string) (values []string)
- func (c *Context) PostFormMap(key string) (dicts map[string]string)
- func (c *Context) Query(key string) (value string)
- func (c *Context) QueryMap(key string) (dicts map[string]string)
- func (c *Context) Render(code int, r render.Render)
- func (c *Context) SaveUploadedFile(file *multipart.FileHeader, dst string) error
- func (c *Context) Set(key string, value any)
- func (c *Context) SetCookie(name, value string, maxAge int, path, domain string, secure, httpOnly bool)
- func (c *Context) SetSameSite(samesite http.SameSite)
- func (c *Context) ShouldBind(obj any) error
- func (c *Context) ShouldBindHeader(obj any) error
- func (c *Context) ShouldBindJSON(obj any) error
- func (c *Context) ShouldBindQuery(obj any) error
- func (c *Context) ShouldBindTOML(obj any) error
- func (c *Context) ShouldBindUri(obj any) error
- func (c *Context) ShouldBindWith(obj any, b binding.Binding) error
- func (c *Context) ShouldBindXML(obj any) error
- func (c *Context) ShouldBindYAML(obj any) error
- func (c *Context) Status(code int)
- type Param
- type Params
- type ResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Request *http.Request Params Params Keys map[string]any MaxMultipartMemory int64 // contains filtered or unexported fields }
func (*Context) AbortWithStatus ¶
func (*Context) AbortWithStatusJSON ¶
func (*Context) BindHeader ¶
BindHeader is a shortcut for c.MustBindWith(obj, binding.Header).
func (*Context) ContentType ¶
func (*Context) DefaultPostForm ¶
func (*Context) DefaultQuery ¶
func (*Context) GetFloat64 ¶
func (*Context) GetPostFormArray ¶
func (*Context) GetPostFormMap ¶
func (*Context) GetQueryArray ¶
func (*Context) GetStringMapString ¶
func (*Context) GetStringMapStringSlice ¶
func (*Context) GetStringSlice ¶
func (*Context) IsWebsocket ¶
func (*Context) PostFormArray ¶
func (*Context) SaveUploadedFile ¶
func (c *Context) SaveUploadedFile(file *multipart.FileHeader, dst string) error
func (*Context) SetSameSite ¶
func (*Context) ShouldBind ¶
func (*Context) ShouldBindHeader ¶
ShouldBindHeader is a shortcut for c.ShouldBindWith(obj, binding.Header).
func (*Context) ShouldBindJSON ¶
ShouldBindJSON is a shortcut for c.ShouldBindWith(obj, binding.JSON).
func (*Context) ShouldBindQuery ¶
ShouldBindQuery is a shortcut for c.ShouldBindWith(obj, binding.Query).
func (*Context) ShouldBindTOML ¶
ShouldBindTOML is a shortcut for c.ShouldBindWith(obj, binding.TOML).
func (*Context) ShouldBindUri ¶
ShouldBindUri binds the passed struct pointer using the specified binding engine.
func (*Context) ShouldBindXML ¶
ShouldBindXML is a shortcut for c.ShouldBindWith(obj, binding.XML).
func (*Context) ShouldBindYAML ¶
ShouldBindYAML is a shortcut for c.ShouldBindWith(obj, binding.YAML).
type ResponseWriter ¶
type ResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter) *ResponseWriter
func (*ResponseWriter) Size ¶
func (w *ResponseWriter) Size() int
func (*ResponseWriter) Status ¶
func (w *ResponseWriter) Status() int
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(code int)
func (*ResponseWriter) WriteHeaderNow ¶
func (w *ResponseWriter) WriteHeaderNow()
func (*ResponseWriter) Written ¶
func (w *ResponseWriter) Written() bool
Click to show internal directories.
Click to hide internal directories.