Documentation
¶
Index ¶
- func BadRequest(w http.ResponseWriter, err error)
- func Forbidden(w http.ResponseWriter, err error)
- func InternalServerError(w http.ResponseWriter, err error)
- func NotAutorized(w http.ResponseWriter)
- func Ok(w http.ResponseWriter, data any)
- func Paged(w http.ResponseWriter, data any, p request.Pager)
- func SessionExpired(w http.ResponseWriter)
- type Detail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func BadRequest(w http.ResponseWriter, err error)
func InternalServerError ¶
func InternalServerError(w http.ResponseWriter, err error)
func NotAutorized ¶
func NotAutorized(w http.ResponseWriter)
func SessionExpired ¶
func SessionExpired(w http.ResponseWriter)
Types ¶
type Detail ¶
type Detail struct { // Data of api response // // it will nil in case of error Data any `json:"data"` // Error if any occurred during api call Error *string `json:"error,omitempty"` // Pager is used for paged data response Pager *request.Pager `json:"pager,omitempty"` }
Detail of api response
Click to show internal directories.
Click to hide internal directories.