render

package
v0.1.140 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

func (*Data) Content

func (d *Data) Content() []byte

func (*Data) ContentType

func (d *Data) ContentType() string

func (*Data) HttpCode

func (d *Data) HttpCode() int

func (*Data) SetHttpCode

func (d *Data) SetHttpCode(code int)

type Json

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

func (*Json) Content

func (j *Json) Content() []byte

func (*Json) ContentType

func (j *Json) ContentType() string

func (*Json) HttpCode

func (j *Json) HttpCode() int

func (*Json) SetHttpCode

func (j *Json) SetHttpCode(code int)

type Jsonp

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

func (*Jsonp) Content

func (j *Jsonp) Content() []byte

func (*Jsonp) ContentType

func (j *Jsonp) ContentType() string

func (*Jsonp) HttpCode

func (j *Jsonp) HttpCode() int

func (*Jsonp) SetHttpCode

func (j *Jsonp) SetHttpCode(code int)

type ProtoBuf

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

func (*ProtoBuf) Content

func (p *ProtoBuf) Content() []byte

func (*ProtoBuf) ContentType

func (p *ProtoBuf) ContentType() string

func (*ProtoBuf) HttpCode

func (p *ProtoBuf) HttpCode() int

func (*ProtoBuf) SetHttpCode

func (p *ProtoBuf) SetHttpCode(code int)

type Render

type Render interface {
	// Data() Data to be written
	Content() []byte
	// HttpCode The HTTP status code
	HttpCode() int
	// ContentType The HTTP Content-Type
	ContentType() string
	// SetHttpCode Set The HTTP status code
	SetHttpCode(code int)
}

func NewData

func NewData(data []byte) Render

func NewJson

func NewJson(data interface{}) Render

func NewJsonp

func NewJsonp(callback string, data interface{}) Render

func NewProtoBuf

func NewProtoBuf(data interface{}) Render

func NewXml

func NewXml(data interface{}) Render

type Xml

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

func (*Xml) Content

func (x *Xml) Content() []byte

func (*Xml) ContentType

func (x *Xml) ContentType() string

func (*Xml) HttpCode

func (x *Xml) HttpCode() int

func (*Xml) SetHttpCode

func (x *Xml) SetHttpCode(code int)

Jump to

Keyboard shortcuts

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