Documentation
¶
Index ¶
- func ContentResult(ctx *webing.RequestContext, data interface{}, args ...interface{}) webing.IActionResult
- func DataResult(ctx *webing.RequestContext, data interface{}, args ...interface{}) webing.IActionResult
- func HtmlResult(ctx *webing.RequestContext, tmpl string, args ...interface{}) webing.IActionResult
- func JsonResult(ctx *webing.RequestContext, data interface{}, args ...interface{}) webing.IActionResult
- func RedirectResult(ctx *webing.RequestContext, args ...string) webing.IActionResult
- type ActionResult
- func (result *ActionResult) Data(data []byte, args ...interface{})
- func (result *ActionResult) Error(msg string)
- func (result *ActionResult) File(filepath string)
- func (result *ActionResult) Html(template string, args ...interface{})
- func (result *ActionResult) Json(args ...interface{})
- func (result *ActionResult) Redirect(url string)
- func (result *ActionResult) Stream(step func(w io.Writer) bool)
- func (result *ActionResult) String(args ...interface{})
- func (result *ActionResult) Xml(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentResult ¶
func ContentResult(ctx *webing.RequestContext, data interface{}, args ...interface{}) webing.IActionResult
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * content * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func DataResult ¶
func DataResult(ctx *webing.RequestContext, data interface{}, args ...interface{}) webing.IActionResult
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * data * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func HtmlResult ¶
func HtmlResult(ctx *webing.RequestContext, tmpl string, args ...interface{}) webing.IActionResult
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * html * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func JsonResult ¶
func JsonResult(ctx *webing.RequestContext, data interface{}, args ...interface{}) webing.IActionResult
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * json * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func RedirectResult ¶
func RedirectResult(ctx *webing.RequestContext, args ...string) webing.IActionResult
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * redirect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Types ¶
type ActionResult ¶
type ActionResult struct {
Context *webing.RequestContext
ContentData interface{}
ContentType string
StatusCode int
IsAbort bool
}
================================================================================ * action result * author: 美丽的地球啊 - mliu * ================================================================================
func (*ActionResult) Data ¶
func (result *ActionResult) Data(data []byte, args ...interface{})
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering bytes * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) Error ¶
func (result *ActionResult) Error(msg string)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering error strings * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) File ¶
func (result *ActionResult) File(filepath string)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering disk file * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) Html ¶
func (result *ActionResult) Html(template string, args ...interface{})
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering Html templates * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) Json ¶
func (result *ActionResult) Json(args ...interface{})
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering json strings * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) Redirect ¶
func (result *ActionResult) Redirect(url string)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering redirect url * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) Stream ¶
func (result *ActionResult) Stream(step func(w io.Writer) bool)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering io stream * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) String ¶
func (result *ActionResult) String(args ...interface{})
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering text strings * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*ActionResult) Xml ¶
func (result *ActionResult) Xml(args ...interface{})
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * rendering xml strings * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++