response.go 343 B

123456789101112131415161718
  1. package client
  2. type MsgResponse struct {
  3. Success bool `json:"success"`
  4. ErrCode int `json:"errCode"`
  5. Msg string `json:"msg"`
  6. }
  7. type InfosResponse[T any] struct {
  8. MsgResponse
  9. InfosData[T]
  10. }
  11. type InfosData[T any] struct {
  12. Infos []T `json:"infos"`
  13. TotalCount int64 `json:"totalCount"`
  14. PageNo int `json:"pageNo"`
  15. }