Documentation ¶
Index ¶
- func FFWriteJSON(w http.ResponseWriter, obj interface{}) error
- func IWriteJSON(w http.ResponseWriter, obj interface{}) error
- func WriteJSON(w http.ResponseWriter, obj interface{}) error
- func WriteMsgPack(w http.ResponseWriter, obj interface{}) error
- func WriteString(w http.ResponseWriter, format string, data []interface{})
- type AsciiJSON
- type Data
- type Delims
- type FFIndentedJSON
- type FFJSON
- type HTML
- type HTMLDebug
- type HTMLProduction
- type HTMLRender
- type IIndentedJSON
- type IJSON
- type ISecureJSON
- type ISecureJSONPrefix
- type IndentedJSON
- type JSON
- type JsonpJSON
- type MsgPack
- type Reader
- type Redirect
- type Render
- type SecureJSON
- type SecureJSONPrefix
- type String
- type XML
- type YAML
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FFWriteJSON ¶
func FFWriteJSON(w http.ResponseWriter, obj interface{}) error
func IWriteJSON ¶
func IWriteJSON(w http.ResponseWriter, obj interface{}) error
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, obj interface{}) error
func WriteMsgPack ¶
func WriteMsgPack(w http.ResponseWriter, obj interface{}) error
func WriteString ¶
func WriteString(w http.ResponseWriter, format string, data []interface{})
Types ¶
type AsciiJSON ¶
type AsciiJSON struct {
Data interface{}
}
func (AsciiJSON) WriteContentType ¶
func (r AsciiJSON) WriteContentType(w http.ResponseWriter)
type Data ¶
func (Data) Render ¶
func (r Data) Render(w http.ResponseWriter) (err error)
Render (Data) writes data with custom ContentType.
func (Data) WriteContentType ¶
func (r Data) WriteContentType(w http.ResponseWriter)
type FFIndentedJSON ¶
type FFIndentedJSON struct {
Data interface{}
}
func (FFIndentedJSON) Render ¶
func (r FFIndentedJSON) Render(w http.ResponseWriter) error
func (FFIndentedJSON) WriteContentType ¶
func (r FFIndentedJSON) WriteContentType(w http.ResponseWriter)
type FFJSON ¶
type FFJSON struct {
Data interface{}
}
func (FFJSON) WriteContentType ¶
func (r FFJSON) WriteContentType(w http.ResponseWriter)
type HTML ¶
func (HTML) WriteContentType ¶
func (r HTML) WriteContentType(w http.ResponseWriter)
type HTMLProduction ¶
func (HTMLProduction) Instance ¶
func (r HTMLProduction) Instance(name string, data interface{}) Render
type HTMLRender ¶
type IIndentedJSON ¶
type IIndentedJSON struct {
Data interface{}
}
func (IIndentedJSON) Render ¶
func (r IIndentedJSON) Render(w http.ResponseWriter) error
func (IIndentedJSON) WriteContentType ¶
func (r IIndentedJSON) WriteContentType(w http.ResponseWriter)
type IJSON ¶
type IJSON struct {
Data interface{}
}
func (IJSON) WriteContentType ¶
func (r IJSON) WriteContentType(w http.ResponseWriter)
type ISecureJSON ¶
type ISecureJSON struct { Prefix string Data interface{} }
func (ISecureJSON) Render ¶
func (r ISecureJSON) Render(w http.ResponseWriter) error
func (ISecureJSON) WriteContentType ¶
func (r ISecureJSON) WriteContentType(w http.ResponseWriter)
type ISecureJSONPrefix ¶
type ISecureJSONPrefix string
type IndentedJSON ¶
type IndentedJSON struct {
Data interface{}
}
func (IndentedJSON) Render ¶
func (r IndentedJSON) Render(w http.ResponseWriter) error
func (IndentedJSON) WriteContentType ¶
func (r IndentedJSON) WriteContentType(w http.ResponseWriter)
type JSON ¶
type JSON struct {
Data interface{}
}
func (JSON) WriteContentType ¶
func (r JSON) WriteContentType(w http.ResponseWriter)
type JsonpJSON ¶
type JsonpJSON struct { Callback string Data interface{} }
func (JsonpJSON) WriteContentType ¶
func (r JsonpJSON) WriteContentType(w http.ResponseWriter)
type MsgPack ¶
type MsgPack struct {
Data interface{}
}
func (MsgPack) WriteContentType ¶
func (r MsgPack) WriteContentType(w http.ResponseWriter)
type Reader ¶
type Reader struct { ContentType string ContentLength int64 Reader io.Reader Headers map[string]string }
func (Reader) Render ¶
func (r Reader) Render(w http.ResponseWriter) (err error)
Render (Reader) writes data with custom ContentType and headers.
func (Reader) WriteContentType ¶
func (r Reader) WriteContentType(w http.ResponseWriter)
type Redirect ¶
func (Redirect) WriteContentType ¶
func (r Redirect) WriteContentType(http.ResponseWriter)
type Render ¶
type Render interface { Render(http.ResponseWriter) error WriteContentType(w http.ResponseWriter) }
type SecureJSON ¶
type SecureJSON struct { Prefix string Data interface{} }
func (SecureJSON) Render ¶
func (r SecureJSON) Render(w http.ResponseWriter) error
func (SecureJSON) WriteContentType ¶
func (r SecureJSON) WriteContentType(w http.ResponseWriter)
type SecureJSONPrefix ¶
type SecureJSONPrefix string
type String ¶
type String struct { Format string Data []interface{} }
func (String) WriteContentType ¶
func (r String) WriteContentType(w http.ResponseWriter)
type XML ¶
type XML struct {
Data interface{}
}
func (XML) WriteContentType ¶
func (r XML) WriteContentType(w http.ResponseWriter)
type YAML ¶
type YAML struct {
Data interface{}
}
func (YAML) WriteContentType ¶
func (r YAML) WriteContentType(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.