Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JSON ¶
type JSON struct {
Data interface{}
}
JSON contains the given interface object.
func (JSON) Render ¶
func (r JSON) Render(w http.ResponseWriter) (err error)
Render (JSON) writes data with custom ContentType.
func (JSON) WriteContentType ¶
func (r JSON) WriteContentType(w http.ResponseWriter)
WriteContentType (JSON) writes JSON ContentType.
type Renderer ¶
type Renderer interface { // Render writes data with custom ContentType. Render(http.ResponseWriter) error // WriteContentType writes custom ContentType. WriteContentType(w http.ResponseWriter) }
Renderer interface is to be implemented by JSON, XML, HTML, YAML and so on.
Click to show internal directories.
Click to hide internal directories.