output

package
v0.0.48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output struct {
	// contains filtered or unexported fields
}

Output

func NewOutput

func NewOutput() *Output

NewInput 新建一个input

func (*Output) HTML

func (o *Output) HTML(code int, name string, value interface{}) error

HTML

func (*Output) HasOutput added in v0.0.4

func (o *Output) HasOutput() bool

HasOutput 是否输出了 true已经输出 false 未输出

func (*Output) Header

func (o *Output) Header(key, value string)

Header 设置头

func (*Output) Init

func (o *Output) Init(writer http.ResponseWriter, in *input.Input, templ *template.Template)

Init 初始化

func (*Output) JSON

func (o *Output) JSON(code int, value interface{}) error

JSON

func (*Output) JSONP

func (o *Output) JSONP(code int, value interface{}) error

JSONP

func (*Output) NotFound added in v0.0.4

func (o *Output) NotFound()

NotFound 404

func (*Output) Redirect

func (o *Output) Redirect(code int, location string)

Redirect 跳转

func (*Output) Render

func (o *Output) Render(code int, value interface{}, bind binding.Rendering) error

Render

func (*Output) Text added in v0.0.7

func (o *Output) Text(code int, value interface{}) error

Text

func (*Output) XML

func (o *Output) XML(code int, value interface{}) error

XML

func (*Output) YAML

func (o *Output) YAML(code int, value interface{}) error

YAML

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL