Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseHelper ¶
type ResponseHelper struct { Status int `json:"status"` Msg string `json:"message"` Data interface{} `json:"data,omitempty"` // contains filtered or unexported fields }
func NewResponseHelper ¶
func NewResponseHelper(ctx *iris.Context, logFunc func(...interface{})) *ResponseHelper
func (*ResponseHelper) ErrorLog ¶
func (h *ResponseHelper) ErrorLog(errLabel string, err error)
func (*ResponseHelper) IsFailed ¶
func (h *ResponseHelper) IsFailed(err error, status int, resMsg string) (isFailed bool)
func (*ResponseHelper) Response ¶
func (h *ResponseHelper) Response(contentType string, errLabel string)
func (*ResponseHelper) ResponseJSON ¶
func (h *ResponseHelper) ResponseJSON(errLabel string)
Click to show internal directories.
Click to hide internal directories.