Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Encoder ¶
An Encoder implements an encoding format of values to be sent as response to requests on the API endpoints.
type JsonEncoder ¶
type JsonEncoder struct{}
func (JsonEncoder) Encode ¶
func (_ JsonEncoder) Encode(v ...interface{}) ([]byte, error)
@todo test for slice of structure support
func (JsonEncoder) Render ¶
func (enc JsonEncoder) Render(v ...interface{}) []byte
type XmlEncoder ¶
type XmlEncoder struct{}
func (XmlEncoder) Encode ¶
func (_ XmlEncoder) Encode(v ...interface{}) ([]byte, error)
Since we don't use xml as a binding source, we don't need to use copyStruct here. Just Marshal.
func (XmlEncoder) Render ¶
func (enc XmlEncoder) Render(v ...interface{}) []byte
Click to show internal directories.
Click to hide internal directories.