
The highest tagged major version is
v2.
package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Mar 7, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Created responds with 201 and the data wrapped in a success envelope.
Error responds with the given status code and an error message.
Paginated responds with 200, data, and pagination metadata.
Success responds with 200 and the data wrapped in a success envelope.
type APIResponse struct {
Success bool `json:"success"`
Data interface{} `json:"data,omitempty"`
Error string `json:"error,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
APIResponse is the standard JSON envelope for all API responses.
type Meta struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
Total int64 `json:"total"`
TotalPages int `json:"total_pages"`
}
Meta holds pagination metadata.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.