type BinaryResult struct { Reader io.Reader Name string Length int64 Delivery ContentDisposition ModTime time.Time }
func (r *BinaryResult) Apply(req *Request, resp *Response)
type ContentDisposition string
var ( Attachment ContentDisposition = "attachment" Inline ContentDisposition = "inline" )
type ErrorResult struct { RenderArgs map[string]interface{} Error error }
This result handles all kinds of error codes (500, 404, ..). It renders the relevant error page (errors/CODE.format, e.g. errors/500.json). If RunMode is "dev", this results in a friendly error page.
func (r ErrorResult) Apply(req *Request, resp *Response)
type PlaintextErrorResult struct { Error error }
func (r PlaintextErrorResult) Apply(req *Request, resp *Response)
This method is used when the template loader or error template is not available.
type RedirectToActionResult struct {
// contains filtered or unexported fields
}
func (r *RedirectToActionResult) Apply(req *Request, resp *Response)
type RedirectToUrlResult struct {
// contains filtered or unexported fields
}
func (r *RedirectToUrlResult) Apply(req *Request, resp *Response)
type RenderHtmlResult struct {
// contains filtered or unexported fields
}
func (r RenderHtmlResult) Apply(req *Request, resp *Response)
type RenderJsonResult struct {
// contains filtered or unexported fields
}
func (r RenderJsonResult) Apply(req *Request, resp *Response)
type RenderTemplateResult struct { Template Template RenderArgs map[string]interface{} }
Action methods return this result to request a template be rendered.
func (r *RenderTemplateResult) Apply(req *Request, resp *Response)
type RenderTextResult struct {
// contains filtered or unexported fields
}
func (r RenderTextResult) Apply(req *Request, resp *Response)
type RenderXmlResult struct {
// contains filtered or unexported fields
}
func (r RenderXmlResult) Apply(req *Request, resp *Response)
type Result interface { Apply(req *Request, resp *Response) }