Documentation
¶
Index ¶
- func WriteErrorResponse(rw http.ResponseWriter, status int, msg string)
- func WriteErrorResponseWithLog(rw http.ResponseWriter, status int, msg, endpoint string, logger log.Logger)
- func WriteResponse(rw io.Writer, v interface{})
- func WriteResponseWithLog(rw io.Writer, v interface{}, endpoint string, logger log.Logger)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteErrorResponse ¶
func WriteErrorResponse(rw http.ResponseWriter, status int, msg string)
WriteErrorResponse write error resp.
func WriteErrorResponseWithLog ¶
func WriteErrorResponseWithLog(rw http.ResponseWriter, status int, msg, endpoint string, logger log.Logger)
WriteErrorResponseWithLog write error response along with adding a error log.
func WriteResponse ¶
WriteResponse writes interface value to response.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"errMessage,omitempty"`
}
ErrorResponse to send error message in the response.
Click to show internal directories.
Click to hide internal directories.