Documentation
¶
Index ¶
- func HTTP(rw http.ResponseWriter, req *http.Request)
- type Context
- func (c *Context) Call() (any, error)
- func (c *Context) CallSpecial() (any, error)
- func (c *Context) GetExtraResponse(k string) any
- func (c *Context) GetObject(typ string) any
- func (c *Context) GetParam(v string) any
- func (c *Context) GetParamTo(v string, obj any) bool
- func (c *Context) GetParams() any
- func (c *Context) GetPath() string
- func (c *Context) GetQuery(v string) any
- func (c *Context) GetQueryFull() map[string]any
- func (c *Context) NewRequest(target string) (*http.Request, error)
- func (c *Context) Response() (res *Response, err error)
- func (c *Context) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (c *Context) SetExtraResponse(k string, v any)
- func (c *Context) SetHttp(rw http.ResponseWriter, req *http.Request) error
- func (c *Context) SetParam(name string, v any)
- func (c *Context) SetParams(v map[string]any)
- func (c *Context) SetPath(p string)
- func (c *Context) Value(v any) any
- type Deletable
- type Response
- type Updatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
func (*Context) CallSpecial ¶
func (*Context) GetExtraResponse ¶ added in v0.0.6
func (*Context) GetQueryFull ¶ added in v0.0.8
func (*Context) NewRequest ¶
NewRequest returns a http request for this context (for example for forwarding, etc)
func (*Context) SetExtraResponse ¶ added in v0.0.6
type Response ¶
type Response struct {
Result string `json:"result"` // error|success|redirect
Error string `json:"error,omitempty"`
Code int `json:"code,omitempty"`
Time float64 `json:"time"`
Data any `json:"data"`
RedirectURL *url.URL `json:"redirect_url,omitempty"`
RedirectCode int `json:"redirect_code,omitempty"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.