Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, v interface{})
JSON is a shorthand for serializing provided structure and writing it into the provided HTTP writer as JSON.
func JSONRPCError ¶
func JSONRPCError(w http.ResponseWriter, message string, code int)
JSONRPCError is a shorthand for creating an RPCResponse instance with specified error message and code.
func NewJSONRPCError ¶
func NewJSONRPCError(message string, code int) *jsonrpc.RPCResponse
func PrepareJSONWriter ¶
func PrepareJSONWriter(w http.ResponseWriter)
PrepareJSONWriter prepares HTTP response writer for JSON content-type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.