2022-11-23 04:06:29 -08:00
|
|
|
// The response package defines the success and error response type.
|
|
|
|
package response
|
2022-11-17 07:37:29 -08:00
|
|
|
|
2022-11-23 04:06:29 -08:00
|
|
|
// ResponsePagination definition.
|
2022-11-17 07:37:29 -08:00
|
|
|
type ResponsePagination struct {
|
|
|
|
Next string `json:"next"`
|
|
|
|
}
|
|
|
|
|
2022-11-23 04:06:29 -08:00
|
|
|
// Response represent a success API response.
|
2022-11-17 07:37:29 -08:00
|
|
|
type Response[T any] struct {
|
|
|
|
Data T `json:"data"`
|
|
|
|
Pagination ResponsePagination `json:"pagination"`
|
|
|
|
}
|