gin: github.com/gin-gonic/gin/render Index | Files

package render

import "github.com/gin-gonic/gin/render"

Index

Package Files

data.go html.go json.go msgpack.go redirect.go render.go text.go xml.go yaml.go

func WriteJSON Uses

func WriteJSON(w http.ResponseWriter, obj interface{}) error

func WriteMsgPack Uses

func WriteMsgPack(w http.ResponseWriter, obj interface{}) error

func WriteString Uses

func WriteString(w http.ResponseWriter, format string, data []interface{})

type Data Uses

type Data struct {
    ContentType string
    Data        []byte
}

func (Data) Render Uses

func (r Data) Render(w http.ResponseWriter) (err error)

Render (Data) writes data with custom ContentType.

func (Data) WriteContentType Uses

func (r Data) WriteContentType(w http.ResponseWriter)

type Delims Uses

type Delims struct {
    Left  string
    Right string
}

type HTML Uses

type HTML struct {
    Template *template.Template
    Name     string
    Data     interface{}
}

func (HTML) Render Uses

func (r HTML) Render(w http.ResponseWriter) error

func (HTML) WriteContentType Uses

func (r HTML) WriteContentType(w http.ResponseWriter)

type HTMLDebug Uses

type HTMLDebug struct {
    Files   []string
    Glob    string
    Delims  Delims
    FuncMap template.FuncMap
}

func (HTMLDebug) Instance Uses

func (r HTMLDebug) Instance(name string, data interface{}) Render

type HTMLProduction Uses

type HTMLProduction struct {
    Template *template.Template
    Delims   Delims
}

func (HTMLProduction) Instance Uses

func (r HTMLProduction) Instance(name string, data interface{}) Render

type HTMLRender Uses

type HTMLRender interface {
    Instance(string, interface{}) Render
}

type IndentedJSON Uses

type IndentedJSON struct {
    Data interface{}
}

func (IndentedJSON) Render Uses

func (r IndentedJSON) Render(w http.ResponseWriter) error

func (IndentedJSON) WriteContentType Uses

func (r IndentedJSON) WriteContentType(w http.ResponseWriter)

type JSON Uses

type JSON struct {
    Data interface{}
}

func (JSON) Render Uses

func (r JSON) Render(w http.ResponseWriter) (err error)

func (JSON) WriteContentType Uses

func (r JSON) WriteContentType(w http.ResponseWriter)

type MsgPack Uses

type MsgPack struct {
    Data interface{}
}

func (MsgPack) Render Uses

func (r MsgPack) Render(w http.ResponseWriter) error

func (MsgPack) WriteContentType Uses

func (r MsgPack) WriteContentType(w http.ResponseWriter)

type Redirect Uses

type Redirect struct {
    Code     int
    Request  *http.Request
    Location string
}

func (Redirect) Render Uses

func (r Redirect) Render(w http.ResponseWriter) error

func (Redirect) WriteContentType Uses

func (r Redirect) WriteContentType(http.ResponseWriter)

type Render Uses

type Render interface {
    Render(http.ResponseWriter) error
    WriteContentType(w http.ResponseWriter)
}

type SecureJSON Uses

type SecureJSON struct {
    Prefix string
    Data   interface{}
}

func (SecureJSON) Render Uses

func (r SecureJSON) Render(w http.ResponseWriter) error

func (SecureJSON) WriteContentType Uses

func (r SecureJSON) WriteContentType(w http.ResponseWriter)

type SecureJSONPrefix Uses

type SecureJSONPrefix string

type String Uses

type String struct {
    Format string
    Data   []interface{}
}

func (String) Render Uses

func (r String) Render(w http.ResponseWriter) error

func (String) WriteContentType Uses

func (r String) WriteContentType(w http.ResponseWriter)

type XML Uses

type XML struct {
    Data interface{}
}

func (XML) Render Uses

func (r XML) Render(w http.ResponseWriter) error

func (XML) WriteContentType Uses

func (r XML) WriteContentType(w http.ResponseWriter)

type YAML Uses

type YAML struct {
    Data interface{}
}

func (YAML) Render Uses

func (r YAML) Render(w http.ResponseWriter) error

func (YAML) WriteContentType Uses

func (r YAML) WriteContentType(w http.ResponseWriter)

Package render imports 9 packages (graph) and is imported by 165 packages. Updated 2017-09-28. Refresh now. Tools for package owners.