feat: add docs
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user