Documentation
¶
Index ¶
- type Config
- type Context
- func (c *Context) Abort()
- func (c *Context) Cookie(name string) (string, error)
- func (c *Context) Deadline() (deadline time.Time, ok bool)
- func (c *Context) Done() <-chan struct{}
- func (c *Context) Err() error
- func (c *Context) FormFileHeader(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) GetFloat64(key string) (f64 float64)
- func (c *Context) GetHeader(key string) string
- func (c *Context) GetInt(key string) (i int)
- func (c *Context) GetInt64(key string) (i64 int64)
- func (c *Context) GetString(key string) (s string)
- func (c *Context) Header(key, value string)
- func (c *Context) IsAbort() bool
- func (c *Context) Json(data any) error
- func (c *Context) JsonBinding(d any) error
- func (c *Context) Param(key string) string
- func (c *Context) ParamBool(key string) bool
- func (c *Context) ParamFloat64(key string) float64
- func (c *Context) ParamInt(key string) int
- func (c *Context) ParamInt64(key string) int64
- func (c *Context) PostForm(key string) (string, bool)
- func (c *Context) PostFormArray(key string) (values []string, ok bool)
- func (c *Context) PostFormBool(key string) bool
- func (c *Context) PostFormFloat64(key string) float64
- func (c *Context) PostFormInt(key string) int
- func (c *Context) PostFormInt64(key string) int64
- func (c *Context) PostFormString(key string) string
- func (c *Context) Query(key string) (string, bool)
- func (c *Context) QueryArray(key string) (values []string, ok bool)
- func (c *Context) QueryBool(key string) bool
- func (c *Context) QueryFloat64(key string) float64
- func (c *Context) QueryInt(key string) int
- func (c *Context) QueryInt64(key string) int64
- func (c *Context) QueryString(key string) string
- func (c *Context) Request() *http.Request
- func (c *Context) Response(data []byte) error
- func (c *Context) ResponseWithStatus(code int, data []byte) 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) Status(code int)
- func (c *Context) Value(key any) any
- type Handler
- type Option
- type Server
- func (r Server) Connect(path string, f Handler)
- func (r Server) Delete(path string, f Handler)
- func (r Server) Get(path string, f Handler)
- func (r Server) Head(path string, f Handler)
- func (r Server) HostPrefix(host string) *router
- func (r Server) Options(path string, f Handler)
- func (r Server) Patch(path string, f Handler)
- func (r Server) PathPrefix(prefix string) *router
- func (r Server) Post(path string, f Handler)
- func (r Server) Put(path string, f Handler)
- func (s *Server) Run() error
- func (s *Server) Shutdown() error
- func (r Server) Trace(path string, f Handler)
- func (r Server) Use(fs ...Handler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) FormFileHeader ¶
func (c *Context) FormFileHeader(name string) (*multipart.FileHeader, error)
func (*Context) GetFloat64 ¶
func (*Context) JsonBinding ¶
func (*Context) ParamFloat64 ¶
func (*Context) ParamInt64 ¶
func (*Context) PostFormArray ¶
func (*Context) PostFormBool ¶
func (*Context) PostFormFloat64 ¶
func (*Context) PostFormInt ¶
func (*Context) PostFormInt64 ¶
func (*Context) PostFormString ¶
func (*Context) QueryFloat64 ¶
func (*Context) QueryInt64 ¶
func (*Context) QueryString ¶
func (*Context) ResponseWithStatus ¶
type Option ¶
type Option struct { Config MaxHeaderBytes int MaxMultipartMemory int64 ConnState func(net.Conn, http.ConnState) TLSConfig *tls.Config TLSNextProto map[string]func(*http.Server, *tls.Conn, http.Handler) ErrorLog *log.Logger BaseContext func(net.Listener) context.Context ConnContext func(ctx context.Context, c net.Conn) context.Context }
type Server ¶
type Server struct { Option // contains filtered or unexported fields }
func (Server) HostPrefix ¶
func (r Server) HostPrefix(host string) *router
func (Server) PathPrefix ¶
func (r Server) PathPrefix(prefix string) *router
Click to show internal directories.
Click to hide internal directories.