feat: add docs

This commit is contained in:
2025-11-02 22:29:24 -03:00
parent 3b1b05d5a6
commit 92f13fba22
7 changed files with 1070 additions and 8 deletions

View File

@@ -6,15 +6,22 @@ import (
)
type APIResponse struct {
Success bool `json:"success"`
Data any `json:"data,omitempty"`
Errors []APIError `json:"errors,omitempty"`
Message string `json:"message,omitempty"`
// Indicates if the request was successful
Success bool `json:"success"`
// The response data
Data any `json:"data,omitempty"`
// List of errors if any occurred
Errors []APIError `json:"errors,omitempty"`
// Optional message
Message string `json:"message,omitempty"`
}
type APIError struct {
Code int `json:"code"`
// Error code
Code int `json:"code"`
// Human-readable error message
Message string `json:"message"`
// Additional error details
Details string `json:"details,omitempty"`
}