Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpResponse ¶
func HttpResponse(ctx *fasthttp.RequestCtx, response []byte, statusCode ...int) error
func JsonResponse ¶
func JsonResponse(ctx *fasthttp.RequestCtx, response interface{}, statusCode ...int) error
Types ¶
type Atreugo ¶
type Atreugo struct {
// contains filtered or unexported fields
}
Atreugo struct for make up a server
func (*Atreugo) ListenAndServe ¶
ListenAndServe start Atreugo server according to the configuration
func (*Atreugo) UseMiddleware ¶
func (s *Atreugo) UseMiddleware(fns ...Middleware)
UseMiddleware register middleware functions that viewHandler will use
type Config ¶
type Config struct { Host string Port int LogLevel string Compress bool TLSEnable bool CertKey string CertFile string GracefulEnable bool }
Config config for Atreugo
type Middleware ¶ added in v2.0.1
type Middleware func(ctx *fasthttp.RequestCtx) (int, error)
Middleware must process all incoming requests before defined views.
type View ¶ added in v2.0.1
type View func(ctx *fasthttp.RequestCtx) error
View must process incoming requests.
Click to show internal directories.
Click to hide internal directories.