Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface {
JSON(code int, obj any)
Bind(obj any) error
Param(key string) string
Query(key string) string
QueryParams() map[string][]string
BindJSON(obj any) error
SetHeader(key, value string)
Method() string
Path() string
SetStatus(code int)
Status() int
RemoteIP() string
Header(header string) string
Abort()
Next()
}
type HTTPEngine ¶
type HTTPEngine interface {
Init(port int) error
RegisterRoute(method string, path string, handler HandlerFunc)
Use(middleware MiddlewareFunc)
Start() error
}
type HandlerFunc ¶
type HandlerFunc func(ctx Context)
type MiddlewareFunc ¶
type MiddlewareFunc func(ctx Context)
Click to show internal directories.
Click to hide internal directories.