Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorInfo ¶
type ErrorInfo struct {
StatusCode int `json:"status_code"`
Code string `json:"code"`
Message string `json:"message"`
Error string `json:"error"`
}
ErrorInfo holds error details.
type ErrorResponseBody ¶
type ErrorResponseBody struct {
Success bool `json:"success"`
Data any `json:"data"`
Error *ErrorInfo `json:"error"`
}
ErrorResponseBody is the error envelope returned by the custom error handler.
type MessageData ¶
type MessageData struct {
Message string `json:"message"`
}
MessageData is a simple message payload for Response[MessageData].
type Pageable ¶
type Pageable struct {
CurrentPage int `json:"current_page"`
Size int `json:"size"`
TotalPages int `json:"total_pages"`
TotalElements int64 `json:"total_elements"`
Empty bool `json:"empty"`
}
Pageable holds pagination metadata.
type PageableResponse ¶
type PageableResponse[T any] struct { Success bool `json:"success"` Data []T `json:"data"` Pageable Pageable `json:"pageable"` }
PageableResponse is the paginated API response envelope.
Click to show internal directories.
Click to hide internal directories.