mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
37 lines
857 B
Go
37 lines
857 B
Go
package response
|
|
|
|
type Common struct {
|
|
Code int `json:"code"`
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type Success struct {
|
|
Code int `json:"code"`
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
Data interface{} `json:"data"`
|
|
}
|
|
|
|
type Meta struct {
|
|
Page int `json:"page"`
|
|
Limit int `json:"limit"`
|
|
TotalPages int64 `json:"total_pages"`
|
|
TotalResults int64 `json:"total_results"`
|
|
}
|
|
|
|
type SuccessWithPaginate[T any] struct {
|
|
Code int `json:"code"`
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
Meta Meta `json:"meta"`
|
|
Data []T `json:"data"`
|
|
}
|
|
|
|
type ErrorDetails struct {
|
|
Code int `json:"code"`
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
Errors interface{} `json:"errors"`
|
|
}
|