1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| BindWith(obj any, b binding.Binding) error reset() Copy() *gin.Context HandlerName() string HandlerNames() []string Handler() gin.HandlerFunc FullPath() string Next() IsAborted() bool Abort() AbortWithStatus(code int) AbortWithStatusJSON(code int, jsonObj any) AbortWithError(code int, err error) *gin.Error Error(err error) *gin.Error Set(key string, value any) Get(key string) (value any, exists bool) MustGet(key string) any GetString(key string) (s string) GetBool(key string) (b bool) GetInt(key string) (i int) GetInt64(key string) (i64 int64) GetUint(key string) (ui uint) GetUint64(key string) (ui64 uint64) GetFloat64(key string) (f64 float64) GetTime(key string) (t time.Time) GetDuration(key string) (d time.Duration) GetStringSlice(key string) (ss []string) GetStringMap(key string) (sm map[string]any) GetStringMapString(key string) (sms map[string]string) GetStringMapStringSlice(key string) (smss map[string][]string) Param(key string) string AddParam(key string, value string) Query(key string) (value string) DefaultQuery(key string, defaultValue string) string GetQuery(key string) (string, bool) QueryArray(key string) (values []string) initQueryCache() GetQueryArray(key string) (values []string, ok bool) QueryMap(key string) (dicts map[string]string) GetQueryMap(key string) (map[string]string, bool) PostForm(key string) (value string) DefaultPostForm(key string, defaultValue string) string GetPostForm(key string) (string, bool) PostFormArray(key string) (values []string) initFormCache() GetPostFormArray(key string) (values []string, ok bool) PostFormMap(key string) (dicts map[string]string) GetPostFormMap(key string) (map[string]string, bool) get(m map[string][]string, key string) (map[string]string, bool) FormFile(name string) (*multipart.FileHeader, error) MultipartForm() (*multipart.Form, error) SaveUploadedFile(file *multipart.FileHeader, dst string) error Bind(obj any) error BindJSON(obj any) error BindXML(obj any) error BindQuery(obj any) error BindYAML(obj any) error BindTOML(obj any) error BindHeader(obj any) error BindUri(obj any) error MustBindWith(obj any, b binding.Binding) error ShouldBind(obj any) error ShouldBindJSON(obj any) error ShouldBindXML(obj any) error ShouldBindQuery(obj any) error ShouldBindYAML(obj any) error ShouldBindTOML(obj any) error ShouldBindHeader(obj any) error ShouldBindUri(obj any) error ShouldBindWith(obj any, b binding.Binding) error ShouldBindBodyWith(obj any, bb binding.BindingBody) (err error) ClientIP() string RemoteIP() string ContentType() string IsWebsocket() bool requestHeader(key string) string Status(code int) Header(key string, value string) GetHeader(key string) string GetRawData() ([]byte, error) SetSameSite(samesite http.SameSite) SetCookie(name string, value string, maxAge int, path string, domain string, secure bool, httpOnly bool) Cookie(name string) (string, error) Render(code int, r render.Render) HTML(code int, name string, obj any) IndentedJSON(code int, obj any) SecureJSON(code int, obj any) JSONP(code int, obj any) JSON(code int, obj any) AsciiJSON(code int, obj any) PureJSON(code int, obj any) XML(code int, obj any) YAML(code int, obj any) TOML(code int, obj any) ProtoBuf(code int, obj any) String(code int, format string, values ...any) Redirect(code int, location string) Data(code int, contentType string, data []byte) DataFromReader(code int, contentLength int64, contentType string, reader io.Reader, extraHeaders map[string]string) File(filepath string) FileFromFS(filepath string, fs http.FileSystem) FileAttachment(filepath string, filename string) SSEvent(name string, message any) Stream(step func(w io.Writer) bool) bool Negotiate(code int, config gin.Negotiate) NegotiateFormat(offered ...string) string SetAccepted(formats ...string) hasRequestContext() bool Deadline() (deadline time.Time, ok bool) Done() <-chan struct{} Err() error Value(key any) any
|