Documentation
¶
Overview ¶
Package routes (and sub-packages) provides the API routes for the Ocular application.
Index ¶
- func Health() gin.HandlerFunc
- func MustParam(c *gin.Context, key string) (string, bool)
- func ServeStatic(content []byte, contentType string) gin.HandlerFunc
- func Version(version, buildTime, commit string) gin.HandlerFunc
- func WriteErr(c *gin.Context, err error)
- func WriteErrorResponse(c *gin.Context, code int, err schemas.ErrorMsg, response any)
- func WriteSuccessResponse(c *gin.Context, response any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Health ¶
func Health() gin.HandlerFunc
Health returns a handler function that responds with a success message.
func MustParam ¶
MustParam retrieves a parameter from the URL path and checks if it is empty. If it is empty, it writes an error response and returns false.
func ServeStatic ¶
func ServeStatic(content []byte, contentType string) gin.HandlerFunc
func Version ¶
func Version(version, buildTime, commit string) gin.HandlerFunc
func WriteErrorResponse ¶
func WriteSuccessResponse ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.