Documentation ¶
Index ¶
- func BinaryCsv(w http.ResponseWriter, filename string, b *bytes.Buffer)
- func BinaryExcel(w http.ResponseWriter, filename string, b *bytes.Buffer)
- func BinaryPdf(w http.ResponseWriter, filename string, b *bytes.Buffer)
- func Error(w http.ResponseWriter, err error)
- func OK(w http.ResponseWriter, data interface{})
- func Paging(w http.ResponseWriter, data interface{}, page int, limit int, cnt int64)
- func UnauthorizedError(w http.ResponseWriter)
- type ErrorResponse
- type JsonResponse
- type PagingResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryExcel ¶
func BinaryExcel(w http.ResponseWriter, filename string, b *bytes.Buffer)
func Error ¶
func Error(w http.ResponseWriter, err error)
func OK ¶
func OK(w http.ResponseWriter, data interface{})
func UnauthorizedError ¶
func UnauthorizedError(w http.ResponseWriter)
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Code constant.InternalCode `json:"code"` Status int `json:"status"` Message string `json:"message"` Details []string `json:"details"` }
type JsonResponse ¶
type JsonResponse struct { Success bool `json:"success"` Paging *PagingResponse `json:"paging"` Data interface{} `json:"data"` Error *ErrorResponse `json:"error"` }
Click to show internal directories.
Click to hide internal directories.