Documentation
ΒΆ
Index ΒΆ
- type Context
- func (c *Context) BindBody(data interface{}) error
- func (c *Context) Error(status int, err error)
- func (c *Context) GetPathValue(key string) string
- func (c *Context) GetQueryParam(key string) string
- func (c *Context) JSON(status int, data interface{})
- func (c *Context) Render(status int, template string, data interface{})
- func (c *Context) Status(status int)
- func (c *Context) Text(status int, text string)
- type Group
- func (g *Group) Delete(path string, handler HandlerFunc)
- func (g *Group) File(path string, file string)
- func (g *Group) Folder(path string, dir string)
- func (g *Group) Get(path string, handler HandlerFunc)
- func (g *Group) Patch(path string, handler HandlerFunc)
- func (g *Group) Post(path string, handler HandlerFunc)
- func (g *Group) Put(path string, handler HandlerFunc)
- type HandlerFunc
- type Middleware
- type Request
- type Response
- type Router
- func (r *Router) Delete(path string, handler func(c *Context))
- func (r *Router) File(path string, file string)
- func (r *Router) Folder(path string, dir string)
- func (r *Router) Get(path string, handler func(c *Context))
- func (r *Router) Patch(path string, handler func(c *Context))
- func (r *Router) Post(path string, handler func(c *Context))
- func (r *Router) Put(path string, handler func(c *Context))
- func (s *Router) Routes() *http.ServeMux
- func (r *Router) ServeHTTP(res http.ResponseWriter, req *http.Request)
- type SecureCookie
- func (sc *SecureCookie) ClearCookie(w http.ResponseWriter, name string)
- func (sc *SecureCookie) GetEncryptedCookie(req *http.Request, name string) (string, error)
- func (sc *SecureCookie) HasCookie(req *http.Request, name string) bool
- func (sc *SecureCookie) SetEncryptedCookie(w http.ResponseWriter, name, value string, expiry time.Duration) error
- type Server
- func (s *Server) Delete(path string, handler HandlerFunc)
- func (s *Server) File(path string, file string)
- func (s *Server) Folder(path string, dir string)
- func (s *Server) Get(path string, handler HandlerFunc)
- func (s *Server) Group(path string, group func(r *Group))
- func (s *Server) Patch(path string, handler HandlerFunc)
- func (s *Server) Post(path string, handler HandlerFunc)
- func (s *Server) Put(path string, handler HandlerFunc)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Start(port string)
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type Context ΒΆ
func NewContext ΒΆ
func NewContext(w http.ResponseWriter, r *http.Request) *Context
func (*Context) GetPathValue ΒΆ
func (*Context) GetQueryParam ΒΆ
type Group ΒΆ added in v0.0.6
type Group struct {
// contains filtered or unexported fields
}
func (*Group) Delete ΒΆ added in v0.0.6
func (g *Group) Delete(path string, handler HandlerFunc)
func (*Group) Get ΒΆ added in v0.0.6
func (g *Group) Get(path string, handler HandlerFunc)
func (*Group) Patch ΒΆ added in v0.0.6
func (g *Group) Patch(path string, handler HandlerFunc)
func (*Group) Post ΒΆ added in v0.0.6
func (g *Group) Post(path string, handler HandlerFunc)
func (*Group) Put ΒΆ added in v0.0.6
func (g *Group) Put(path string, handler HandlerFunc)
type HandlerFunc ΒΆ
type HandlerFunc func(c *Context)
func LoggingMiddleware ΒΆ
func LoggingMiddleware(next HandlerFunc) HandlerFunc
type Middleware ΒΆ
type Middleware func(HandlerFunc) HandlerFunc
type Response ΒΆ
type Response struct {
http.ResponseWriter
}
type SecureCookie ΒΆ
type SecureCookie struct {
// contains filtered or unexported fields
}
func NewSecureCookie ΒΆ
func NewSecureCookie(key string) *SecureCookie
func (*SecureCookie) ClearCookie ΒΆ
func (sc *SecureCookie) ClearCookie(w http.ResponseWriter, name string)
func (*SecureCookie) GetEncryptedCookie ΒΆ
func (*SecureCookie) HasCookie ΒΆ
func (sc *SecureCookie) HasCookie(req *http.Request, name string) bool
func (*SecureCookie) SetEncryptedCookie ΒΆ
func (sc *SecureCookie) SetEncryptedCookie(w http.ResponseWriter, name, value string, expiry time.Duration) error
type Server ΒΆ
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Delete ΒΆ
func (s *Server) Delete(path string, handler HandlerFunc)
func (*Server) Get ΒΆ
func (s *Server) Get(path string, handler HandlerFunc)
func (*Server) Patch ΒΆ added in v0.0.6
func (s *Server) Patch(path string, handler HandlerFunc)
func (*Server) Post ΒΆ
func (s *Server) Post(path string, handler HandlerFunc)
func (*Server) Put ΒΆ
func (s *Server) Put(path string, handler HandlerFunc)
Source Files
ΒΆ
Click to show internal directories.
Click to hide internal directories.