Documentation ¶
Index ¶
- func BasicAuth(username, password string) func(http.Handler) http.Handler
- func Cors(next http.Handler) http.Handler
- func LogRequest(handler http.HandlerFunc) http.HandlerFunc
- type Context
- func (c *Context) BindJSON(object interface{}) error
- func (c *Context) GetCookie(name string) (*http.Cookie, error)
- func (c *Context) Param(v string) string
- func (c *Context) Redirect(statuscode int, link string)
- func (c *Context) Return(statuscode int, a ...any) error
- func (c *Context) SetCookie(cookie *http.Cookie)
- func (c *Context) String(statuscode int, prompt string) error
- type Gonimbus
- func (g *Gonimbus) Delete(path string, handle HandlerFunc)
- func (g *Gonimbus) Get(path string, handle HandlerFunc)
- func (g *Gonimbus) Head(path string, handle HandlerFunc)
- func (g *Gonimbus) Patch(path string, handle HandlerFunc)
- func (g *Gonimbus) Post(path string, handle HandlerFunc)
- func (g *Gonimbus) Put(path string, handle HandlerFunc)
- func (g *Gonimbus) Serve(addr string) error
- func (g *Gonimbus) Use(middleware func(http.Handler) http.Handler)
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogRequest ¶
func LogRequest(handler http.HandlerFunc) http.HandlerFunc
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) GetCookie ¶
GetCookie retrieves the cookie with the specified name from the given request Returns the cookie or an error if the cookie is not found
func (*Context) Redirect ¶
Redirect redirects the client to the provided link with the provided status code.
type Gonimbus ¶
type Gonimbus struct {
// contains filtered or unexported fields
}
func (*Gonimbus) Delete ¶
func (g *Gonimbus) Delete(path string, handle HandlerFunc)
Delete registers a DELETE request route with the provided path and handler function.
func (*Gonimbus) Get ¶
func (g *Gonimbus) Get(path string, handle HandlerFunc)
func (*Gonimbus) Head ¶
func (g *Gonimbus) Head(path string, handle HandlerFunc)
Head registers a HEAD request route with the provided path and handler function.
func (*Gonimbus) Patch ¶
func (g *Gonimbus) Patch(path string, handle HandlerFunc)
Patch registers a patch request route with the given path and handler function
func (*Gonimbus) Post ¶
func (g *Gonimbus) Post(path string, handle HandlerFunc)
Post registers a POST request route with the provided path and handler function.
func (*Gonimbus) Put ¶
func (g *Gonimbus) Put(path string, handle HandlerFunc)
Put registers a PUT request route with the provided path and handler function.
type HandlerFunc ¶
type HandlerFunc func(c Context)
Click to show internal directories.
Click to hide internal directories.