Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDeleteResponse ¶
func CreateDeleteResponse[T any](w http.ResponseWriter, reason string, data *T)
func CreateErrorResponse ¶
func CreateErrorResponse(w http.ResponseWriter, code int, reason string, err error)
func CreateResponse ¶
func CreateResponse[T any](w http.ResponseWriter, reason string, data *T)
Types ¶
type ApiResponse ¶
type ApiResponse struct {
Status bool `json:"status"`
Message string `json:"message"`
StatusCode int `json:"statusCode"`
Response any `json:"data"`
}
func (*ApiResponse) ToJson ¶
func (api *ApiResponse) ToJson() []byte
Click to show internal directories.
Click to hide internal directories.