output

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 7 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) GZIPGZIPJSONOK added in v0.0.19

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

GZIPJSONOK

func (*Output) GZIPJSON

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

GZIPJSON

func (*Output) GZIPJSONERROR

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

GZIPJSONERROR

func (*Output) GZIPJSONFail

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

GZIPJSONFail

func (*Output) GZIPJSONList

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

GZIPJSONList

func (*Output) GZIPJSONOK

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

JSONOK

func (*Output) GZIPJSONObject

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

GZIPJSONObject

func (*Output) GZIPJSONPager

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

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

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

JSONERROR

func (*Output) JSONFail

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

JSONFail

func (*Output) JSONList

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

JSONList

func (*Output) JSONObject

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

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

JSONPager

func (*Output) NotFound

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

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

SuccessGZipJSON 成功输出json

func (*Output) SuccessJSON

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

Success 成功输出json

func (*Output) Text

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