Documentation
¶
Index ¶
- Constants
- func SendBadRequest400Response(c *gin.Context, userErrMessage string)
- func SendBadRequestPlatform400Response(c *gin.Context, userErrMessage string)
- func SendCreated201Response(c *gin.Context, response interface{})
- func SendNoContent204Response(c *gin.Context)
- func SendNotFound404Response(c *gin.Context, userErrMessage string)
- func SendOK200Response(c *gin.Context, response interface{})
- func SendPaymentRequired402Response(c *gin.Context, response interface{})
- func SendResourceConflict409Response(c *gin.Context, userErrMessage string)
- func SendServerError500Response(c *gin.Context)
- func SendStatusProcessing(c *gin.Context, userErrMessage string)
- func SendUnauthorised401Response(c *gin.Context)
Constants ¶
const ServerError500ResponseString = "server failed to complete request. please try after some time."
Variables ¶
This section is empty.
Functions ¶
func SendBadRequest400Response ¶
SendBadRequest400Response sets a "bad request" (HTTP 400) on the gin context and send userErrMessage as a response message as msg. Finally it also aborts any other handlers in-line by calling Abort.
func SendBadRequestPlatform400Response ¶
SendBadRequestPlatform400Response sets a "bad request" (HTTP 400) on the gin context and send userErrMessage as a response message as res_str. Finally it also aborts any other handlers in-line by calling Abort.
func SendCreated201Response ¶
SendCreated201Response sets a ok status (HTTP 201) on the gin context and send responseBody parameter passed as JSON response. Finally it also aborts any other handlers in-line by calling Abort.
func SendNoContent204Response ¶
SendNoContent204Response sets a ok status (HTTP 204) on the gin context Finally it also aborts any other handlers in-line by calling Abort.
func SendNotFound404Response ¶
SendNotFound404Response sets a "resource not found" (HTTP 404) on the gin context and send userErrMessage to user. Finally it also aborts any other handlers in-line by calling Abort.
func SendOK200Response ¶
SendOK200Response sets a ok status (HTTP 200) on the gin context and send responseBody parameter passed as JSON response. Finally it also aborts any other handlers in-line by calling Abort.
func SendPaymentRequired402Response ¶
SendPaymentRequired402Response sets a ok status (HTTP 402) on the gin context Finally it also aborts any other handlers in-line by calling Abort.
func SendResourceConflict409Response ¶
SendResourceConflict409Response sets the response status code to Unauthorised (http 409) on the gin context and send userErrMessage to user. Finally it also aborts any other handlers in-line by calling Abort.
func SendServerError500Response ¶
SendServerError500Response sets the response status code to Unauthorised (http 500) on the gin context and send userErrMessage to user. Finally it also aborts any other handlers in-line by calling Abort.
func SendStatusProcessing ¶
SendStatusProcessing sets the response status code to Unauthorised (http 102) on the gin context and send userErrMessage to user. Finally it also aborts any other handlers in-line by calling Abort.
func SendUnauthorised401Response ¶
SendUnauthorised401Response sets the response status code to Unauthorised (http 401) on the gin context and send userErrMessage to user. Finally it also aborts any other handlers in-line by calling Abort.
Types ¶
This section is empty.