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 ¶
type Middleware func(ctx *fasthttp.RequestCtx) (int, error)
Middleware must process all incoming requests before defined views.
Click to show internal directories.
Click to hide internal directories.