Documentation ¶
Overview ¶
Package dto is for data transfer objects.
Index ¶
- func DoJSONArray(strs []string) string
- func FromGOB(data []byte, dto interface{})
- func FromJSON(bytes []byte, dto interface{})
- func FromJSONStr(str string, dto interface{})
- func JSONArray(strs ...string) string
- func ToGOB(dto interface{}) []byte
- func ToJSON(dto interface{}) string
- func ToJSONBytes(dto interface{}) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoJSONArray ¶
DoJSONArray returns a JSON array in string from strings given.
func FromGOB ¶
func FromGOB(data []byte, dto interface{})
FromGOB reads object from bytes. Remember pass a pointer to preallocated object of the right type.
p := &PSM{} dto.FromGOB(d, p) return p
func FromJSON ¶
func FromJSON(bytes []byte, dto interface{})
FromJSON is a helper to convert byte JSON to a data object.
func FromJSONStr ¶
func FromJSONStr(str string, dto interface{})
FromJSONStr is a helper to convert object from a JSON string.
func ToJSONBytes ¶
func ToJSONBytes(dto interface{}) []byte
ToJSONBytes is a helper to convert dto to JSON byte data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.