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)
Request() Request
Response() Response
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
File(name string) (File, error)
AbortWithStatus(code int)
Next() error
Cookies(key string, defaultValue ...string) string
Cookie(co *Cookie)
}
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 {
String(code int, format string, values ...any) error
Json(code int, obj any) error
File(filepath string, compress ...bool) error
Download(filepath, filename string) error
Success() ResponseSuccess
StatusCode() int
Header(key, value string) Response
Vary(key string, value ...string)
}
Click to show internal directories.
Click to hide internal directories.