Documentation
¶
Index ¶
- func MarshalResponse(r *http.Request, v interface{}) ([]byte, error)
- func MarshalToMimeType(v interface{}, mimeType string) ([]byte, error)
- func ReadFromWebSocket(ws *websocket.Conn, processMsg func([]byte)) error
- func Unmarshal(data []byte, dest interface{}) error
- func UnmarshalRequest(r *http.Request, dest interface{}) error
- type Marshaller
- type Unmarshaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalResponse ¶
MarshalResponse acts as a universal Marshaller trying to give the client of an http request what it wants by checking the accept and content-type headers before defaulting to JSON
func MarshalToMimeType ¶
func UnmarshalRequest ¶
UnmarshalRequest determines the content type of the body of a request by first checking the content-type header and then falling back to scanning the body to unmarshal into dest
Types ¶
type Marshaller ¶
type Unmarshaller ¶
Click to show internal directories.
Click to hide internal directories.