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
Body(string)
Abort()
Next()
Set(key string, value any)
Get(key string) any
Request() *http.Request
}
type HTTPEngine ¶
type HTTPEngine interface {
Init(port int) error
RegisterRoute(method string, path string, handler HandlerFunc, entity any, isProtected bool)
Use(middleware MiddlewareFunc)
Start() error
Routes() []Route
}
type HandlerFunc ¶
type HandlerFunc func(ctx Context)
type MiddlewareFunc ¶
type MiddlewareFunc func(next HandlerFunc) HandlerFunc
Click to show internal directories.
Click to hide internal directories.