Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalResponse ¶
func MarshalResponse(w http.ResponseWriter, status int, response interface{})
MarshalResponse to client.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
ErrorResponse struct.
func NewError ¶
func NewError(code int, msg string) ErrorResponse
NewError create new ErrorResponse.
type SuccessfulResponse ¶
type SuccessfulResponse struct {
Response interface{} `json:"response"`
}
SuccessfulResponse struct.
func NewSuccessfulResponse ¶
func NewSuccessfulResponse(response interface{}) SuccessfulResponse
NewSuccessfulResponse create new SuccessfulResponse.
Click to show internal directories.
Click to hide internal directories.