Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPResponseJSON ¶
func HTTPResponseJSON(w http.ResponseWriter, result *Result, code int, message string)
HTTPResponseJSON is a function
Types ¶
type HTTPResult ¶
type HTTPResult struct {
Success bool `json:"success" xml:"success"`
Data interface{} `json:"data" xml:"data"`
Message string `json:"message" xml:"message"`
Code int `json:"code" xml:"code"`
Meta *PartialMeta `json:"meta,omitempty" xml:"meta,omitempty"`
}
HTTPResult property
type PartialMeta ¶
type PartialMeta struct {
TotalDataOnAppear int `json:"totalDataOnPage" xml:"totalDataOnPage"`
TotalDataAtAll int `json:"totalData" xml:"totalData"`
TotalPart int `json:"totalPage" xml:"totalPage"`
OnPart int `json:"page" xml:"page"`
}
PartialMeta property
type Result ¶
type Result struct {
Err error
Data interface{}
Message string
PartialMeta *PartialMeta
}
Result property
func FindOneErrorResult ¶
FindOneErrorResult will return one error of variadic, if the result is nil it means no error
Click to show internal directories.
Click to hide internal directories.