Documentation
¶
Index ¶
- Variables
- func LoggerWrap(c *Context, handlers []Handler)
- type Context
- func (c *Context) Abort()
- func (c *Context) Aborted() bool
- func (c *Context) Async(fn func())
- func (c *Context) BindJSON(dest any) error
- func (c *Context) GetSession(key string) any
- func (c *Context) Header(key string) string
- func (c *Context) JSON(status int, data any)
- func (c *Context) MustPubsub() *pubsub.Engine
- func (c *Context) MustQueue() *queue.Engine
- func (c *Context) Next()
- func (c *Context) Parallel(funcs ...func())
- func (c *Context) Param(key string) string
- func (c *Context) Query(key string) string
- func (c *Context) SetPubsub(p *pubsub.Engine)
- func (c *Context) SetQueue(q *queue.Engine)
- func (c *Context) SetSession(key string, value any)
- func (c *Context) Text(code int, msg string)
- type EngineContext
- type Group
- func (g *Group) Add(methods []string, path string, h Handler, hs ...Handler) *Route
- func (g *Group) All(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Connect(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Delete(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Get(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Group(prefix string, handlers ...Handler) Router
- func (g *Group) Head(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Options(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Patch(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Post(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Put(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Route(path string) *Route
- func (g *Group) Trace(path string, h Handler, hs ...Handler) *Route
- func (g *Group) Use(args ...any) Router
- type Handler
- type LogLevel
- type Logger
- type Route
- type Router
- type RouterApp
Constants ¶
This section is empty.
Variables ¶
View Source
var DisableLogger bool
View Source
var Log = &Logger{Level: DEBUG} // default
Functions ¶
func LoggerWrap ¶
Types ¶
type Context ¶
type Context struct {
Ctx *fasthttp.RequestCtx
Cache *cache.Engine
Pubsub *pubsub.Engine
Queue *queue.Engine
// contains filtered or unexported fields
}
func NewContext ¶
func (*Context) Async ¶
func (c *Context) Async(fn func())
Async menjalankan fungsi dalam goroutine tanpa block
func (*Context) GetSession ¶
func (*Context) MustPubsub ¶
func (*Context) Parallel ¶
func (c *Context) Parallel(funcs ...func())
Parallel menjalankan banyak fungsi lalu menunggu semuanya selesai
func (*Context) SetSession ¶
type Route ¶
type Route struct {
Method string
Path string
Name string
Handlers []Handler
Options routeOptions
// contains filtered or unexported fields
}
type Router ¶
type Router interface {
Use(args ...any) Router
Get(path string, handler Handler, handlers ...Handler) *Route
Head(path string, handler Handler, handlers ...Handler) *Route
Post(path string, handler Handler, handlers ...Handler) *Route
Put(path string, handler Handler, handlers ...Handler) *Route
Delete(path string, handler Handler, handlers ...Handler) *Route
Connect(path string, handler Handler, handlers ...Handler) *Route
Options(path string, handler Handler, handlers ...Handler) *Route
Trace(path string, handler Handler, handlers ...Handler) *Route
Patch(path string, handler Handler, handlers ...Handler) *Route
Add(methods []string, path string, handler Handler, handlers ...Handler) *Route
All(path string, handler Handler, handlers ...Handler) *Route
Group(prefix string, handlers ...Handler) Router
Route(path string) *Route
}
Click to show internal directories.
Click to hide internal directories.