Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
Data renders byte array
func (Data) ContentType ¶
ContentType returns contentType for renderer
type JSON ¶
type JSON struct {
Data interface{}
}
JSON renders data as JSON content type
func (JSON) ContentType ¶
ContentType returns contentType for renderer
type Reader ¶
Reader renders content from io.Reader to response writer
func (Reader) ContentType ¶
ContentType returns contentType for renderer
type Renderer ¶
type Renderer interface { // Render writes data to io.Writer Render(io.Writer) error //ContentType returns renderer content type ContentType() []string }
Renderer defines rendering interface for different content types
type Text ¶
type Text struct {
Data string
}
Text renders content to Text format
func (Text) ContentType ¶
ContentType returns contentType for renderer
Click to show internal directories.
Click to hide internal directories.