1234567891011121314151617181920212223 |
- package response
- type JSONResult[T any] struct {
- Code int `json:"code"`
- Msg string `json:"message"`
- Data T `json:"data"`
- }
- type ListResponse[T any] struct {
- List []*T `json:"list"`
- }
- type PaginateResponse[T any] struct {
- List []*T `json:"list"`
- Total int `json:"total"`
- }
- type OffsetResponse[T any] struct {
- List []*T `json:"list"`
- Offset any `json:"offset"`
- }
- type OffsetTotalResponse[T any] struct {
- List []*T `json:"list"`
- Total int64 `json:"total"`
- Offset any `json:"offset"`
- }
|