Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeError ¶
func EncodeError(w http.ResponseWriter, response error)
EncodeError encodes the error to JSON and writes it to the response writer
func EncodeResponse ¶
func EncodeResponse(w http.ResponseWriter, response interface{})
EncodeResponse encodes the response to JSON and writes it to the response writer
func StartHttpService ¶ added in v0.0.4
func StartHttpService(mhs MoshaHttpService) error
StartHttpService starts a Mosha HTTP service.
Types ¶
type IdResponse ¶ added in v0.0.2
type IdResponse struct {
ID string `json:"id"`
}
IdResponse represents a response with an id.
Click to show internal directories.
Click to hide internal directories.