Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface {
context.Context
WithValue(key string, value any)
EngineContext() any
Header(key, defaultValue string) string
Headers() http.Header
Method() string
Path() string
Secure() bool
Url() string
FullUrl() string
Ip() string
//Input Retrieve an input item from the request: /users/{id}
Params(key string) string
// Query Retrieve a query string item form the request: /users?id=1
Query(key, defaultValue string) string
// Form Retrieve a form string item form the post: /users POST:id=1
Form(key, defaultValue string) string
Bind(obj any) error
AbortWithStatus(code int)
Next() error
Cookies(key string, defaultValue ...string) string
Cookie(co *Cookie)
File
Request
Response
}
type Cookie ¶ added in v1.0.3
type Cookie struct {
Name string `json:"name"`
Value string `json:"value"`
Path string `json:"path"`
Domain string `json:"domain"`
MaxAge int `json:"max_age"`
Expires time.Time `json:"expires"`
Secure bool `json:"secure"`
HTTPOnly bool `json:"http_only"`
SameSite string `json:"same_site"`
SessionOnly bool `json:"session_only"`
}
type ErrorHandler ¶ added in v1.0.3
type FormRequest ¶
type HandlerFunc ¶
func (*HandlerFunc) ServeHTTP ¶ added in v1.0.5
func (h *HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Response ¶
type Response interface {
view.View
String(code int, format string, values ...any) error
Json(code int, obj any) error
SendFile(filepath string, compress ...bool) error
Download(filepath, filename string) error
StatusCode() int
SetHeader(key, value string) Context
Vary(key string, value ...string)
}
Click to show internal directories.
Click to hide internal directories.