package
Version:
v0.0.0-...-fefde71
Opens a new window with list of versions in this module.
Published: Nov 10, 2024
License: GPL-3.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
AddErrorHandlingMiddleware is used to add error handling middleware.
Err is a function that returns a response with status code 500.
OK is a function that returns a response with status code 200.
WithCode is a function that returns a response with the specified status code.
type Response struct {
Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Data any `json:"data,omitempty"`
}
Response is a struct that represents the response of the API.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.