Documentation ¶
Index ¶
- Variables
- type Helper
- func (h Helper) Bind(c *gin.Context, obj interface{}) error
- func (h Helper) BindQuery(c *gin.Context, obj interface{}) error
- func (h Helper) BindSession(c *gin.Context) (result *cookie.Session)
- func (h Helper) BindURI(c *gin.Context, obj interface{}) (e error)
- func (h Helper) BindWith(c *gin.Context, obj interface{}, b binding.Binding) (e error)
- func (h Helper) CheckSession(c *gin.Context)
- func (h Helper) Compression() gin.HandlerFunc
- func (h Helper) JSON() jsoniter.API
- func (h Helper) NegotiateData(c *gin.Context, code int, data interface{})
- func (h Helper) NegotiateError(c *gin.Context, code int, e error)
- func (h Helper) NegotiateErrorString(c *gin.Context, code int, e string)
- func (h Helper) NegotiateFile(c *gin.Context, name string, modtime time.Time, obj interface{})
- func (h Helper) NegotiateFilesystem(c *gin.Context, fs http.FileSystem, path string)
- func (h Helper) ShouldBindSession(c *gin.Context) (session *cookie.Session, e error)
- func (h Helper) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*websocket.Conn, error)
- type IHelper
- type ReadSeeker
Constants ¶
This section is empty.
Variables ¶
View Source
var Offered = []string{ binding.MIMEJSON, binding.MIMEHTML, binding.MIMEXML, binding.MIMEYAML, }
Offered accept Offered
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct { }
Helper 輔助類型
func (Helper) BindSession ¶ added in v1.2.0
BindSession 返回 session 並響應錯誤
func (Helper) CheckSession ¶ added in v1.2.0
CheckSession 檢查是否具有 session
func (Helper) Compression ¶ added in v1.2.0
func (h Helper) Compression() gin.HandlerFunc
Compression .
func (Helper) NegotiateData ¶
NegotiateData .
func (Helper) NegotiateError ¶
NegotiateError .
func (Helper) NegotiateErrorString ¶
NegotiateErrorString .
func (Helper) NegotiateFile ¶ added in v1.2.0
NegotiateFile .
func (Helper) NegotiateFilesystem ¶ added in v1.2.0
NegotiateFilesystem .
func (Helper) ShouldBindSession ¶ added in v1.2.0
ShouldBindSession 返回session 不進行響應
type ReadSeeker ¶ added in v1.2.0
type ReadSeeker struct { Data interface{} Marshal func(in interface{}) (out []byte, err error) // contains filtered or unexported fields }
ReadSeeker .
func (*ReadSeeker) Read ¶ added in v1.2.0
func (r *ReadSeeker) Read(p []byte) (n int, err error)
Read .
Click to show internal directories.
Click to hide internal directories.