Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetResultData ¶
type GetResultData struct { // Contains query param passed by client. // To cross check if server accept the correct param from client. Param interface{} `json:"http_param"` // Defines the current API response generated. GeneratedDate string `json:"generated_date"` // Describes total number of data generated by current request. TotalData string `json:"total_data"` // Request result data. Data interface{} `json:"data"` }
GetResultData is the default response result data format. For method GET.
type PostResultData ¶
type PostResultData struct { // Contains json body passed by client. // To cross check if server accept the correct param from client. Param interface{} `json:"http_param"` // Defines the current API request execution time. ExecutedDate string `json:"executed_date"` // Describes total number of data is affected by current request. RowsAffected int `json:"rows_affected"` }
PostResultData is the default response result data format. For method PUT, PATCH, POST, DELETE.
type Response ¶
type Response struct { // Describes api status or response code. Code string `json:"api_code"` // Describes status message that should be shown to user. DisplayMsg string `json:"api_display_message"` // Describes server real error message that should not be shown to user. RawMsg string `json:"api_raw_message"` // Used for debugging. // It uses client request `X-Request-ID` header. // If empty, generated by server instead. RequestID string `json:"trace_id"` // Describes current api generated result data. ResultData interface{} `json:"api_result_data"` }
Response is the default response format.
func GetDefaultResponse ¶
func GetDefaultResponse(c echo.Context) Response
GetDefaultResponse is the default response for http get request
func GetSuccessResponse ¶
GetSuccessResponse is the success response for http get request
func PostDefaultResponse ¶
func PostDefaultResponse(c echo.Context) Response
PostDefaultResponse is the default response for http post request
func PostSuccessResponse ¶
PostSuccessResponse is the success response for http post request
Click to show internal directories.
Click to hide internal directories.