Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func BadRequest(w http.ResponseWriter, err error)
func Error ¶
func Error(w http.ResponseWriter, err error)
func OK ¶
func OK(w http.ResponseWriter, data interface{})
func Result ¶
func Result(w http.ResponseWriter, b bool)
Types ¶
type Response ¶
type Response struct {
Code int `json:"code"`
Status bool `json:"status"`
Error string `json:"error"`
Data interface{} `json:"data"`
IsBanned *bool `json:"isBanned,omitempty"`
IsAdmin *bool `json:"isAdmin,omitempty"`
// contains filtered or unexported fields
}
make public so other packages can create custom responses.
Click to show internal directories.
Click to hide internal directories.