routes

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package routes (and sub-packages) provides the API routes for the Ocular application.

Index

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

func MustParam(c *gin.Context, key string) (string, bool)

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 WriteErr

func WriteErr(c *gin.Context, err error)

func WriteErrorResponse

func WriteErrorResponse(c *gin.Context, code int, err schemas.ErrorMsg, response any)

func WriteSuccessResponse

func WriteSuccessResponse(c *gin.Context, response any)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL