output

package
v0.2.38 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 6 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) GZIPJSON added in v0.2.13

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

GZIPJSON

func (*Output) GZIPJSONERROR added in v0.2.14

func (o *Output) GZIPJSONERROR(code int, message, subCode string) error

GZIPJSONERROR

func (*Output) GZIPJSONFail added in v0.2.14

func (o *Output) GZIPJSONFail(code int, message string) error

GZIPJSONFail

func (*Output) GZIPJSONList added in v0.2.14

func (o *Output) GZIPJSONList(code int, list interface{}) error

GZIPJSONList

func (*Output) GZIPJSONOK added in v0.2.14

func (o *Output) GZIPJSONOK(code int, message string) error

GZIPJSONOK

func (*Output) GZIPJSONObject added in v0.2.14

func (o *Output) GZIPJSONObject(code int, info interface{}) error

GZIPJSONObject

func (*Output) GZIPJSONPager added in v0.2.14

func (o *Output) GZIPJSONPager(code int, list interface{}, pager interface{}) error

GZIPJSONPager

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) JSONERROR added in v0.0.55

func (o *Output) JSONERROR(code int, message, subCode string) error

JSONERROR

func (*Output) JSONFail added in v0.0.70

func (o *Output) JSONFail(code int, message string) error

JSONFail

func (*Output) JSONList added in v0.0.55

func (o *Output) JSONList(code int, list interface{}) error

JSONList

func (*Output) JSONOK added in v0.0.55

func (o *Output) JSONOK(code int, message string) error

JSONOK

func (*Output) JSONObject added in v0.0.55

func (o *Output) JSONObject(code int, info interface{}) error

JSONObject

func (*Output) JSONP

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

JSONP

func (*Output) JSONPager added in v0.0.55

func (o *Output) JSONPager(code int, list interface{}, pager interface{}) error

JSONPager

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) SuccessGZipJSON added in v0.2.12

func (o *Output) SuccessGZipJSON(data lib.InRow) error

SuccessGZipJSON 成功输出json

func (*Output) SuccessJSON added in v0.0.92

func (o *Output) SuccessJSON(data lib.InRow) error

Success 成功输出json

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